Skip to content

custom-content

create-custom-content

Create custom content with storage format body

POST /custom-content

FlagTypeRequiredDescription
--bodystringNoCustom content body in storage format XML (required)
--space-idstringNoSpace ID to create custom content in (required)
--titlestringNoCustom content title (required)
--typestringNoCustom content type (required, e.g. ac:app:type)

Example:

bash
cf custom-content create-custom-content

create-custom-content-property

Create content property for custom content

Creates a new content property for a piece of custom content.

Permissions required: Permission to update the custom content.

POST /custom-content/{custom-content-id}/properties

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--custom-content-idstringYesThe ID of the custom content to create a property for.

Example:

bash
cf custom-content create-custom-content-property --custom-content-id <custom-content-id>

delete-custom-content

Delete custom content (moves to trash)

DELETE /custom-content/{id}

FlagTypeRequiredDescription
--idstringNoCustom content ID to delete (required)

Example:

bash
cf custom-content delete-custom-content

delete-custom-content-property-by-id

Delete content property for custom content by id

Deletes a content property for a piece of custom content by its id.

Permissions required: Permission to edit the custom content.

DELETE /custom-content/{custom-content-id}/properties/{property-id}

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

Example:

bash
cf custom-content delete-custom-content-property-by-id --custom-content-id <custom-content-id> --property-id <property-id>

get-child-custom-content

Get child custom content

Returns all child custom content for given custom content id. 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 custom content that the user has permission to view will be returned.

GET /custom-content/{id}/children

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 parent custom content. If you don't know the custom content ID, use Get custom-content and filter the results.
--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.

Example:

bash
cf custom-content get-child-custom-content --id <id>

get-custom-content-attachments

Get attachments for custom content

Returns the attachments of specific custom content. 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 content of the custom content and its corresponding space.

GET /custom-content/{id}/attachments

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.
--filenamestringNoFilters on the file-name of attachments. Only one may be specified.
--idstringYesThe ID of the custom content for which attachments should be returned.
--limitstringNoMaximum number of attachments 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.
--mediaTypestringNoFilters on the mediaType of attachments. Only one may be specified.
--sortstringNoUsed to sort the result by a particular field.
--statusstringNoFilter the results to attachments based on their status. By default, current and archived are used.

Example:

bash
cf custom-content get-custom-content-attachments --id <id>

get-custom-content-by-id

Get custom content by ID with storage body

GET /custom-content/{id}

FlagTypeRequiredDescription
--body-formatstringNoBody format (default: storage)
--idstringNoCustom content ID (required)

Example:

bash
cf custom-content get-custom-content-by-id

get-custom-content-by-type

Get custom content by type

GET /custom-content

FlagTypeRequiredDescription
--space-idstringNoFilter by space ID
--typestringNoCustom content type (required, e.g. ac:app:type)

Example:

bash
cf custom-content get-custom-content-by-type

get-custom-content-comments

Get custom content comments

Returns the comments of the specific custom content. 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 its corresponding containers.

GET /custom-content/{id}/footer-comments

FlagTypeRequiredDescription
--body-formatstringNoThe content format type 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 custom content for which comments should be returned.
--limitstringNoMaximum number of comments 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.

Example:

bash
cf custom-content get-custom-content-comments --id <id>

get-custom-content-content-properties

Get content properties for custom content

Retrieves Content Properties tied to a specified custom content.

Permissions required: Permission to view the custom content.

GET /custom-content/{custom-content-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.
--custom-content-idstringYesThe ID of the custom content for which content properties should be returned.
--keystringNoFilters the response to return a specific content property with matching key (case sensitive).
--limitstringNoMaximum number of attachments 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.

Example:

bash
cf custom-content get-custom-content-content-properties --custom-content-id <custom-content-id>

get-custom-content-content-properties-by-id

Get content property for custom content by id

Retrieves a specific Content Property by ID that is attached to a specified custom content.

Permissions required: Permission to view the page.

GET /custom-content/{custom-content-id}/properties/{property-id}

FlagTypeRequiredDescription
--custom-content-idstringYesThe ID of the custom content for which content properties should be returned.
--property-idstringYesThe ID of the content property being requested.

Example:

bash
cf custom-content get-custom-content-content-properties-by-id --custom-content-id <custom-content-id> --property-id <property-id>

get-custom-content-labels

Get labels for custom content

Returns the labels for a specific piece of custom content. 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 its corresponding space. Only labels that the user has permission to view will be returned.

GET /custom-content/{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 custom content 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 custom-content get-custom-content-labels --id <id>

get-custom-content-operations

Get permitted operations for custom content

Returns the permitted operations on specific custom content.

Permissions required: Permission to view the parent content of the custom content and its corresponding space.

GET /custom-content/{id}/operations

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

Example:

bash
cf custom-content get-custom-content-operations --id <id>

get-custom-content-version-details

Get version details for custom content version

Retrieves version details for the specified custom content and version number.

Permissions required: Permission to view the page.

GET /custom-content/{custom-content-id}/versions/{version-number}

FlagTypeRequiredDescription
--custom-content-idstringYesThe ID of the custom content for which version details should be returned.
--version-numberstringYesThe version number of the custom content to be returned.

Example:

bash
cf custom-content get-custom-content-version-details --custom-content-id <custom-content-id> --version-number <version-number>

get-custom-content-versions

Get custom content versions

Returns the versions of specific custom content.

Permissions required: Permission to view the custom content and its corresponding page and space.

GET /custom-content/{custom-content-id}/versions

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. | | --custom-content-id | string | Yes | The ID of the custom content to be queried for its versions. If you don't know the custom content ID, use Get custom-content by type and filter the results. | | --limit | string | No | Maximum number of versions 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. |

Example:

bash
cf custom-content get-custom-content-versions --custom-content-id <custom-content-id>

update-custom-content

Update custom content with automatic version increment

PUT /custom-content/{id}

FlagTypeRequiredDescription
--bodystringNoCustom content body in storage format XML (required)
--idstringNoCustom content ID to update (required)
--titlestringNoCustom content title (required)
--typestringNoCustom content type (optional; auto-detected from existing item if omitted)

Example:

bash
cf custom-content update-custom-content

update-custom-content-property-by-id

Update content property for custom content by id

Update a content property for a piece of custom content by its id.

Permissions required: Permission to edit the custom content.

PUT /custom-content/{custom-content-id}/properties/{property-id}

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

Example:

bash
cf custom-content update-custom-content-property-by-id --custom-content-id <custom-content-id> --property-id <property-id>