Skip to content

Function: getDataPolicySpaces()

ts
function getDataPolicySpaces(client, parameters?): Promise<{
[key: string]: unknown;
  _links?: {
   [key: string]: unknown;
     base?: string;
     byOperation?: string;
     collection?: string;
     context?: string;
     download?: string;
     editui?: string;
     edituiv2?: string;
     next?: string;
     prev?: string;
     self?: string;
     tinyui?: string;
     webui?: string;
  };
  results?: object[];
}>;

Defined in: src/v2/api/dataPolicies.ts:31

Returns all spaces. The results will be sorted by id ascending. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

Permissions required: Only apps can make this request. Permission to access the Confluence site ('Can use' global permission). Only spaces that the app has permission to view will be returned.

Parameters

ParameterTypeDescription
clientClient-
parameters?{ cursor?: string; ids?: number[]; keys?: string[]; limit?: number; sort?: "name" | "key" | "id" | "-id" | "-key" | "-name"; }-
parameters.cursor?stringUsed for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.
parameters.ids?number[]Filter the results to spaces based on their IDs. Multiple IDs can be specified as a comma-separated list.
parameters.keys?string[]Filter the results to spaces based on their keys. Multiple keys can be specified as a comma-separated list.
parameters.limit?numberMaximum number of spaces per result to return. If more results exist, use the Link response header to retrieve a relative URL that will return the next set of results.
parameters.sort?"name" | "key" | "id" | "-id" | "-key" | "-name"Used to sort the result by a particular field.

Returns

Promise&lt;{ [key: string]: unknown; _links?: { [key: string]: unknown; base?: string; byOperation?: string; collection?: string; context?: string; download?: string; editui?: string; edituiv2?: string; next?: string; prev?: string; self?: string; tinyui?: string; webui?: string; }; results?: object[]; }>