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
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
Example:
cf spaces createcreate-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
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--space-id | string | Yes | The ID of the space for which space properties should be returned. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the space for which default classification level should be deleted. |
Example:
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}
| Flag | Type | Required | Description |
|---|---|---|---|
--property-id | string | Yes | The ID of the property to be deleted. |
--space-id | string | Yes | The ID of the space the property belongs to. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--key | string | No | Resolve space key to ID and return that space (e.g. ENG) |
Example:
cf spaces getget
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
| Flag | Type | Required | Description |
|---|---|---|---|
--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. |
--description-format | string | No | The 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-by | string | No | Filter the results to spaces favorited by the user with the specified account ID. |
--ids | string | No | Filter the results to spaces based on their IDs. Multiple IDs can be specified as a comma-separated list. |
--include-icon | string | No | If the icon for the space should be fetched or not. |
--keys | string | No | Filter the results to spaces based on their keys. Multiple keys can be specified as a comma-separated list. |
--labels | string | No | Filter the results to spaces based on their labels. Multiple labels can be specified as a comma-separated list. |
--limit | string | No | Maximum 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-by | string | No | Filter the results to spaces NOT favorited by the user with the specified account ID. |
--sort | string | No | Used to sort the result by a particular field. |
--status | string | No | Filter the results to spaces based on their status. |
--type | string | No | Filter the results to spaces based on their type. |
Example:
cf spaces getget-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
| Flag | Type | Required | Description |
|---|---|---|---|
--body-format | string | No | The 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. |
--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 blog posts should be returned. |
--limit | string | No | Maximum 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. |
--sort | string | No | Used to sort the result by a particular field. |
--status | string | No | Filter the results to blog posts based on their status. By default, current is used. |
--title | string | No | Filter the results to blog posts based on their title. |
Example:
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}
| Flag | Type | Required | Description |
|---|---|---|---|
--description-format | string | No | The 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. |
--id | string | Yes | The ID of the space to be returned. |
--include-icon | string | No | If the icon for the space should be fetched or not. |
--include-labels | string | No | Includes 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-operations | string | No | Includes 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-permissions | string | No | Includes 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-properties | string | No | Includes 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-assignments | string | No | Includes 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:
cf spaces get-by-id --id <id>get-by-id
Get space by ID or key
GET /spaces/{id}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | No | Space ID or key (required) |
Example:
cf spaces get-by-idget-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
| Flag | Type | Required | Description |
|---|---|---|---|
--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 labels should be returned. |
--limit | string | No | Maximum 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. |
--prefix | string | No | Filter the results to labels based on their prefix. |
--sort | string | No | Used to sort the result by a particular field. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--body-format | string | No | The 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:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the space for which default classification level should be returned. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--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 labels should be returned. |
--limit | string | No | Maximum 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. |
--prefix | string | No | Filter the results to labels based on their prefix. |
--sort | string | No | Used to sort the result by a particular field. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the space for which operations should be returned. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--body-format | string | No | The 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. |
--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. |
--depth | string | No | Filter the results to pages at the root level of the space or to all pages in the space. |
--id | string | Yes | The ID of the space for which pages 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. |
--sort | string | No | Used to sort the result by a particular field. |
--status | string | No | Filter the results to pages based on their status. By default, current and archived are used. |
--title | string | No | Filter the results to pages based on their title. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--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 to be returned. |
--limit | string | No | Maximum 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:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--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. |
--key | string | No | The 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. |
--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. |
--space-id | string | Yes | The ID of the space for which space properties should be returned. |
Example:
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}
| Flag | Type | Required | Description |
|---|---|---|---|
--property-id | string | Yes | The ID of the property to be retrieved. |
--space-id | string | Yes | The ID of the space the property belongs to. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--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 to retrieve assignments. |
--limit | string | No | Maximum 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-id | string | No | Filters 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-type | string | No | Filters the returned role assignments to the provided principal type. If specified, a principal-id must also be specified. |
--role-id | string | No | Filters the returned role assignments to the provided role ID. |
--role-type | string | No | Filters the returned role assignments to the provided role type. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the space for which default classification level should be updated. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the space for which to retrieve assignments. |
Example:
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}
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--property-id | string | Yes | The ID of the property to be updated. |
--space-id | string | Yes | The ID of the space the property belongs to. |
Example:
cf spaces update-property-by-id --property-id <property-id> --space-id <space-id>