labels
add
Add labels to a page (uses v1 API)
| Flag | Type | Required | Description |
|---|---|---|---|
--label | stringSlice | No | Label name to add (repeatable, e.g. --label foo --label bar) |
--page-id | string | No | Page ID to add labels to (required) |
Example:
cf labels addget
Get labels
Returns all labels. 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 labels that the user has permission to view will be returned.
GET /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. |
--label-id | string | No | Filters on label ID. Multiple IDs can be specified as a comma-separated list. |
--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 | Filters on label prefix. Multiple IDs can be specified as a comma-separated list. |
--sort | string | No | Used to sort the result by a particular field. |
Example:
cf labels getget-attachments
Get attachments for label
Returns the attachments of specified label. 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 attachment and its corresponding space.
GET /labels/{id}/attachments
| 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 label for which attachments 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. |
Example:
cf labels get-attachments --id <id>get-blog-posts
Get blog posts for label
Returns the blogposts of specified label. 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 page and its corresponding space.
GET /labels/{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 label 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. |
--space-id | string | No | Filter the results based on space ids. Multiple space ids can be specified as a comma-separated list. |
Example:
cf labels get-blog-posts --id <id>get-pages
Get pages for label
Returns the pages of specified label. 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 page and its corresponding space.
GET /labels/{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. |
--id | string | Yes | The ID of the label 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. |
--space-id | string | No | Filter the results based on space ids. Multiple space ids can be specified as a comma-separated list. |
Example:
cf labels get-pages --id <id>list
List labels on a page
| Flag | Type | Required | Description |
|---|---|---|---|
--page-id | string | No | Page ID to list labels for (required) |
Example:
cf labels listremove
Remove a label from a page (uses v1 API)
| Flag | Type | Required | Description |
|---|---|---|---|
--label | string | No | Label name to remove (required) |
--page-id | string | No | Page ID to remove label from (required) |
Example:
cf labels remove