folders
create
Create folder
Creates a folder in the space.
Permissions required: Permission to view the corresponding space. Permission to create a folder in the space.
POST /folders
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
Example:
cf folders createcreate-property
Create content property for folder
Creates a new content property for a folder.
Permissions required: Permission to update the folder.
POST /folders/{id}/properties
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the folder to create a property for. |
Example:
cf folders create-property --id <id>delete
Delete folder
Delete a folder by id.
Deleting a folder moves the folder to the trash, where it can be restored later
Permissions required: Permission to view the folder and its corresponding space. Permission to delete folders in the space.
DELETE /folders/{id}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the folder to be deleted. |
Example:
cf folders delete --id <id>delete-property-by-id
Delete content property for folder by id
Deletes a content property for a folder by its id.
Permissions required: Permission to edit the folder.
DELETE /folders/{folder-id}/properties/{property-id}
| Flag | Type | Required | Description |
|---|---|---|---|
--folder-id | string | Yes | The ID of the folder the property belongs to. |
--property-id | string | Yes | The ID of the property to be deleted. |
Example:
cf folders delete-property-by-id --folder-id <folder-id> --property-id <property-id>get-ancestors
Get all ancestors of folder
Returns all ancestors for a given folder by ID in top-to-bottom order (that is, the highest ancestor is the first item in the response payload). The number of results is limited by the limit parameter and additional results (if available) will be available by calling this endpoint with the ID of first ancestor in the response payload.
This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such as Get folder by id.
Permissions required: Permission to access the Confluence site ('Can use' global permission). Permission to view the folder and its corresponding space
GET /folders/{id}/ancestors
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the folder. |
--limit | string | No | Maximum number of items per result to return. If more results exist, call the endpoint with the highest ancestor's ID to fetch the next set of results. |
Example:
cf folders get-ancestors --id <id>get-by-id
Get folder by id
Returns a specific folder.
Permissions required: Permission to view the folder and its corresponding space.
GET /folders/{id}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the folder to be returned. |
--include-collaborators | string | No | Includes collaborators on the folder. |
--include-direct-children | string | No | Includes direct children of the folder, as defined in the ChildrenResponse object. |
--include-operations | string | No | Includes operations associated with this folder 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-properties | string | No | Includes content properties associated with this folder 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. |
Example:
cf folders get-by-id --id <id>get-content-properties
Get content properties for folder
Retrieves Content Properties tied to a specified folder.
Permissions required: Permission to view the folder.
GET /folders/{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. |
--id | string | Yes | The ID of the folder for which content properties should be returned. |
--key | string | No | Filters the response to return a specific content property with matching key (case sensitive). |
--limit | string | No | Maximum 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. |
--sort | string | No | Used to sort the result by a particular field. |
Example:
cf folders get-content-properties --id <id>get-content-properties-by-id
Get content property for folder by id
Retrieves a specific Content Property by ID that is attached to a specified folder.
Permissions required: Permission to view the folder.
GET /folders/{folder-id}/properties/{property-id}
| Flag | Type | Required | Description |
|---|---|---|---|
--folder-id | string | Yes | The ID of the folder for which content properties should be returned. |
--property-id | string | Yes | The ID of the content property being requested. |
Example:
cf folders get-content-properties-by-id --folder-id <folder-id> --property-id <property-id>get-descendants
Get descendants of folder
Returns descendants in the content tree for a given folder by ID in top-to-bottom order (that is, the highest descendant is the first item in the response payload). The number of results is limited by the limit parameter and additional results (if available) will be available by calling this endpoint with the cursor in the response payload. There is also a depth parameter specifying depth of descendants to be fetched.
The following types of content will be returned:
- Database
- Embed
- Folder
- Page
- Whiteboard
This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based on the content type, such as:
Permissions required: Permission to access the Confluence site ('Can use' global permission). Permission to view the and its corresponding space
GET /folders/{id}/descendants
| 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. |
--depth | string | No | Maximum depth of descendants to return. If more results are required, use the endpoint corresponding to the content type of the deepest descendant to fetch more descendants. |
--id | string | Yes | The ID of the folder. |
--limit | string | No | Maximum number of items per result to return. If more results exist, call the endpoint with the cursor to fetch the next set of results. |
Example:
cf folders get-descendants --id <id>get-direct-children
Get direct children of a folder
Returns all children for given folder id in the content tree. 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.
The following types of content will be returned:
- Database
- Embed
- Folder
- Page
- Whiteboard
This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on the content type, such as:
Permissions required: Permission to access the Confluence site ('Can use' global permission). Only content that the user has permission to view will be returned.
GET /folders/{id}/direct-children
| 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 parent folder. |
--limit | string | No | Maximum number of items 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:
cf folders get-direct-children --id <id>get-operations
Get permitted operations for a folder
Returns the permitted operations on specific folder.
Permissions required: Permission to view the folder and its corresponding space.
GET /folders/{id}/operations
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the folder for which operations should be returned. |
Example:
cf folders get-operations --id <id>update-property-by-id
Update content property for folder by id
Update a content property for a folder by its id.
Permissions required: Permission to edit the folder.
PUT /folders/{folder-id}/properties/{property-id}
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--folder-id | string | Yes | The ID of the folder the property belongs to. |
--property-id | string | Yes | The ID of the property to be updated. |
Example:
cf folders update-property-by-id --folder-id <folder-id> --property-id <property-id>