Skip to content

spaces

create

Create space

Creates a Space as specified in the payload.

Available as part of the Role-Based Access Controls Beta.

Permissions required: Permission to create spaces.

POST /spaces

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)

Example:

bash
cf spaces create

create-property

Create space property in space

Creates a new space property.

Permissions required: Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.

POST /spaces/{space-id}/properties

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--space-idstringYesThe ID of the space for which space properties should be returned.

Example:

bash
cf spaces create-property --space-id <space-id>

delete-default-classification-level

Delete space default classification level

Returns the default classification level for a specific space.

Permissions required: 'Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.

DELETE /spaces/{id}/classification-level/default

FlagTypeRequiredDescription
--idstringYesThe ID of the space for which default classification level should be deleted.

Example:

bash
cf spaces delete-default-classification-level --id <id>

delete-property-by-id

Delete space property by id

Deletes a space property by its id.

Permissions required: Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.

DELETE /spaces/{space-id}/properties/{property-id}

FlagTypeRequiredDescription
--property-idstringYesThe ID of the property to be deleted.
--space-idstringYesThe ID of the space the property belongs to.

Example:

bash
cf spaces delete-property-by-id --property-id <property-id> --space-id <space-id>

get

List spaces (or look up a specific space by key)

GET /spaces

FlagTypeRequiredDescription
--keystringNoResolve space key to ID and return that space (e.g. ENG)

Example:

bash
cf spaces get

get

Get spaces

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: Permission to access the Confluence site ('Can use' global permission). Only spaces that the user has permission to view will be returned.

GET /spaces

FlagTypeRequiredDescription
--cursorstringNoUsed 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.
--description-formatstringNoThe content format type to be returned in the description field of the response. If available, the representation will be available under a response field of the same name under the description field.
--favorited-bystringNoFilter the results to spaces favorited by the user with the specified account ID.
--idsstringNoFilter the results to spaces based on their IDs. Multiple IDs can be specified as a comma-separated list.
--include-iconstringNoIf the icon for the space should be fetched or not.
--keysstringNoFilter the results to spaces based on their keys. Multiple keys can be specified as a comma-separated list.
--labelsstringNoFilter the results to spaces based on their labels. Multiple labels can be specified as a comma-separated list.
--limitstringNoMaximum 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.
--not-favorited-bystringNoFilter the results to spaces NOT favorited by the user with the specified account ID.
--sortstringNoUsed to sort the result by a particular field.
--statusstringNoFilter the results to spaces based on their status.
--typestringNoFilter the results to spaces based on their type.

Example:

bash
cf spaces get

get-blog-posts-in

Get blog posts in space

Returns all blog posts in a space. 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: Permission to access the Confluence site ('Can use' global permission) and view the space. Only blog posts that the user has permission to view will be returned.

GET /spaces/{id}/blogposts

FlagTypeRequiredDescription
--body-formatstringNoThe content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.
--cursorstringNoUsed 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.
--idstringYesThe ID of the space for which blog posts should be returned.
--limitstringNoMaximum number of blog posts per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.
--sortstringNoUsed to sort the result by a particular field.
--statusstringNoFilter the results to blog posts based on their status. By default, current is used.
--titlestringNoFilter the results to blog posts based on their title.

Example:

bash
cf spaces get-blog-posts-in --id <id>

get-by-id

Get space by id

Returns a specific space.

Permissions required: Permission to view the space.

GET /spaces/{id}

FlagTypeRequiredDescription
--description-formatstringNoThe content format type to be returned in the description field of the response. If available, the representation will be available under a response field of the same name under the description field.
--idstringYesThe ID of the space to be returned.
--include-iconstringNoIf the icon for the space should be fetched or not.
--include-labelsstringNoIncludes labels associated with this space in the response.
The number of results will be limited to 50 and sorted in the default sort order.
A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.
--include-operationsstringNoIncludes operations associated with this space in the response, as defined in the Operation object.
The number of results will be limited to 50 and sorted in the default sort order.
A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.
--include-permissionsstringNoIncludes space permissions associated with this space in the response.
The number of results will be limited to 50 and sorted in the default sort order.
A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.
--include-propertiesstringNoIncludes space properties associated with this space in the response.
The number of results will be limited to 50 and sorted in the default sort order.
A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.
--include-role-assignmentsstringNoIncludes role assignments associated with this space in the response. This parameter is only accepted for EAP sites.
The number of results will be limited to 50 and sorted in the default sort order.
A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

Example:

bash
cf spaces get-by-id --id <id>

get-by-id

Get space by ID or key

GET /spaces/{id}

FlagTypeRequiredDescription
--idstringNoSpace ID or key (required)

Example:

bash
cf spaces get-by-id

get-content-labels

Get labels for space content

Returns the labels of space content (pages, blogposts etc). 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: Permission to view the space. Only labels that the user has permission to view will be returned.

GET /spaces/{id}/content/labels

FlagTypeRequiredDescription
--cursorstringNoUsed 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.
--idstringYesThe ID of the space for which labels should be returned.
--limitstringNoMaximum number of labels per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.
--prefixstringNoFilter the results to labels based on their prefix.
--sortstringNoUsed to sort the result by a particular field.

Example:

bash
cf spaces get-content-labels --id <id>

get-custom-content-by-type-in

Get custom content by type in space

Returns all custom content for a given type within a given space. 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: Permission to view the custom content and the corresponding space.

GET /spaces/{id}/custom-content

FlagTypeRequiredDescription
--body-formatstringNoThe content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

Note: If the custom content body type is storage, the storage and atlas_doc_format body formats are able to be returned. If the custom content body type is raw, only the raw body format is able to be returned. | | --cursor | string | No | Used 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. | | --id | string | Yes | The ID of the space for which custom content should be returned. | | --limit | string | No | Maximum number of pages per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results. | | --type | string | No | The type of custom content being requested. See: https://developer.atlassian.com/cloud/confluence/custom-content/ for additional details on custom content. |

Example:

bash
cf spaces get-custom-content-by-type-in --id <id>

get-default-classification-level

Get space default classification level

Returns the default classification level for a specific space.

Permissions required: 'Permission to access the Confluence site ('Can use' global permission) and permission to view the space.

GET /spaces/{id}/classification-level/default

FlagTypeRequiredDescription
--idstringYesThe ID of the space for which default classification level should be returned.

Example:

bash
cf spaces get-default-classification-level --id <id>

get-labels

Get labels for space

Returns the labels of specific space. 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: Permission to view the space. Only labels that the user has permission to view will be returned.

GET /spaces/{id}/labels

FlagTypeRequiredDescription
--cursorstringNoUsed 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.
--idstringYesThe ID of the space for which labels should be returned.
--limitstringNoMaximum number of labels per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.
--prefixstringNoFilter the results to labels based on their prefix.
--sortstringNoUsed to sort the result by a particular field.

Example:

bash
cf spaces get-labels --id <id>

get-operations

Get permitted operations for space

Returns the permitted operations on specific space.

Permissions required: Permission to view the corresponding space.

GET /spaces/{id}/operations

FlagTypeRequiredDescription
--idstringYesThe ID of the space for which operations should be returned.

Example:

bash
cf spaces get-operations --id <id>

get-pages-in

Get pages in space

Returns all pages in a space. 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: Permission to access the Confluence site ('Can use' global permission) and 'View' permission for the space. Only pages that the user has permission to view will be returned.

GET /spaces/{id}/pages

FlagTypeRequiredDescription
--body-formatstringNoThe content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.
--cursorstringNoUsed 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.
--depthstringNoFilter the results to pages at the root level of the space or to all pages in the space.
--idstringYesThe ID of the space for which pages should be returned.
--limitstringNoMaximum number of pages per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.
--sortstringNoUsed to sort the result by a particular field.
--statusstringNoFilter the results to pages based on their status. By default, current and archived are used.
--titlestringNoFilter the results to pages based on their title.

Example:

bash
cf spaces get-pages-in --id <id>

get-permissions-assignments

Get space permissions assignments

Returns space permission assignments for a specific space.

Permissions required: Permission to view the space.

GET /spaces/{id}/permissions

FlagTypeRequiredDescription
--cursorstringNoUsed 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.
--idstringYesThe ID of the space to be returned.
--limitstringNoMaximum number of assignments to return. If more results exist, use the Link response header to retrieve a relative URL that will return the next set of results.

Example:

bash
cf spaces get-permissions-assignments --id <id>

get-properties

Get space properties in space

Returns all properties for the given space. Space properties are a key-value storage associated with a space. The limit parameter specifies the maximum number of results returned in a single response. Use the link response header to paginate through additional results.

Permissions required: Permission to access the Confluence site ('Can use' global permission) and 'View' permission for the space.

GET /spaces/{space-id}/properties

FlagTypeRequiredDescription
--cursorstringNoUsed 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.
--keystringNoThe key of the space property to retrieve. This should be used when a user knows the key of their property, but needs to retrieve the id for use in other methods.
--limitstringNoMaximum number of pages per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.
--space-idstringYesThe ID of the space for which space properties should be returned.

Example:

bash
cf spaces get-properties --space-id <space-id>

get-property-by-id

Get space property by id

Retrieve a space property by its id.

Permissions required: Permission to access the Confluence site ('Can use' global permission) and 'View' permission for the space.

GET /spaces/{space-id}/properties/{property-id}

FlagTypeRequiredDescription
--property-idstringYesThe ID of the property to be retrieved.
--space-idstringYesThe ID of the space the property belongs to.

Example:

bash
cf spaces get-property-by-id --property-id <property-id> --space-id <space-id>

get-role-assignments

Get space role assignments

Retrieves the space role assignments.

Available as part of the Role-Based Access Controls Beta.

Permissions required: Permission to view the space.

GET /spaces/{id}/role-assignments

FlagTypeRequiredDescription
--cursorstringNoUsed 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.
--idstringYesThe ID of the space for which to retrieve assignments.
--limitstringNoMaximum number of space roles to return. If more results exist, use the Link response header to retrieve a relative URL that will return the next set of results.
--principal-idstringNoFilters the returned role assignments to the provided principal id. If specified, a principal-type must also be specified. Paired with a principal-type of ACCESS_CLASS, valid values include [anonymous-users, jsm-project-admins, authenticated-users, all-licensed-users, all-product-admins]
--principal-typestringNoFilters the returned role assignments to the provided principal type. If specified, a principal-id must also be specified.
--role-idstringNoFilters the returned role assignments to the provided role ID.
--role-typestringNoFilters the returned role assignments to the provided role type.

Example:

bash
cf spaces get-role-assignments --id <id>

put-default-classification-level

Update space default classification level

Update the default classification level for a specific space.

Permissions required: 'Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.

PUT /spaces/{id}/classification-level/default

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--idstringYesThe ID of the space for which default classification level should be updated.

Example:

bash
cf spaces put-default-classification-level --id <id>

set-role-assignments

Set space role assignments

Sets space role assignments as specified in the payload.

Available as part of the Role-Based Access Controls Beta.

Permissions required: Permission to manage roles in the space.

POST /spaces/{id}/role-assignments

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--idstringYesThe ID of the space for which to retrieve assignments.

Example:

bash
cf spaces set-role-assignments --id <id>

update-property-by-id

Update space property by id

Update a space property by its id.

Permissions required: Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.

PUT /spaces/{space-id}/properties/{property-id}

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--property-idstringYesThe ID of the property to be updated.
--space-idstringYesThe ID of the space the property belongs to.

Example:

bash
cf spaces update-property-by-id --property-id <property-id> --space-id <space-id>