listNotesWithHttpInfo method
List notes across connected accounts.
Fan-out list. Returns every note visible to the caller across every connected notes provider, paginated by limit / offset. Pass ?accountId= or ?provider= to scope to a single source.
Note: This method returns the HTTP Response.
Parameters:
-
String accountId: Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with
provider. If omitted on a list endpoint the call fans out across every connected account. -
String provider: Provider id (e.g.
native-notes,notion). Selects every connected account for the provider. Mutually exclusive withaccountId. -
String xWorkspaceID: Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
-
bool archived: When
true, return archived notes instead of active ones. -
String parentId: Filter to notes nested under this parent note id.
-
List<String> tags: Repeatable. Filter to notes carrying every tag listed.
-
int limit: Max items to return. Defaults to 50.
-
int offset: Number of items to skip.
-
String sortBy: Sort field. Provider-dependent; the native provider supports
updated_at,created_at,title. -
String sortOrder:
Implementation
Future<Response> listNotesWithHttpInfo({ String? accountId, String? provider, String? xWorkspaceID, bool? archived, String? parentId, List<String>? tags, int? limit, int? offset, String? sortBy, String? sortOrder, }) async {
// ignore: prefer_const_declarations
final path = r'/v1/notes';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (accountId != null) {
queryParams.addAll(_queryParams('', 'accountId', accountId));
}
if (provider != null) {
queryParams.addAll(_queryParams('', 'provider', provider));
}
if (archived != null) {
queryParams.addAll(_queryParams('', 'archived', archived));
}
if (parentId != null) {
queryParams.addAll(_queryParams('', 'parent_id', parentId));
}
if (tags != null) {
queryParams.addAll(_queryParams('multi', 'tags', tags));
}
if (limit != null) {
queryParams.addAll(_queryParams('', 'limit', limit));
}
if (offset != null) {
queryParams.addAll(_queryParams('', 'offset', offset));
}
if (sortBy != null) {
queryParams.addAll(_queryParams('', 'sort_by', sortBy));
}
if (sortOrder != null) {
queryParams.addAll(_queryParams('', 'sort_order', sortOrder));
}
if (xWorkspaceID != null) {
headerParams[r'X-Workspace-ID'] = parameterToString(xWorkspaceID);
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}