Confluence Cloud icon

Confluence Cloud

Access to the Confluence Cloud REST API - Auto-generated from OpenAPI

Overview

The "Get Attachment Labels" operation in the Confluence Cloud node retrieves labels associated with a specific attachment in Confluence. This is useful when you want to programmatically access metadata tags (labels) assigned to attachments, which can help in categorizing, filtering, or managing attachments within Confluence spaces.

Common scenarios include:

  • Automating reports or audits of attachments by their labels.
  • Filtering attachments based on label prefixes or sorting criteria.
  • Integrating attachment metadata into workflows for content management or collaboration tools.

For example, you might use this operation to fetch all labels tagged as "team" for a particular attachment to understand its relevance or ownership within your organization.

Properties

Name Meaning
Id The ID of the attachment for which labels should be returned.
Return All Whether to return all results or only up to a given limit.
Limit Maximum number of results to return (API limit: 250).
Additional Fields Optional filters and sorting options:
- Prefix: Filter labels by prefix ("My", "Team", "Global", "System").
- Sort: Sort results by a specified field.

Output

The output JSON contains a list of label objects associated with the specified attachment. The main data is under the results property, which holds an array of label details. Each label typically includes properties such as the label name, prefix, and other metadata.

If multiple labels exist, pagination is supported, and the node respects the Return All and Limit parameters to control how many labels are fetched.

No binary data output is involved in this operation.

Dependencies

  • Requires an authenticated connection to Confluence Cloud via an API key credential.
  • The node uses the Confluence Cloud REST API endpoint /wiki/api/v2/attachments/{id}/labels.
  • Proper permissions are required to view the parent content of the attachment and its corresponding space.

Troubleshooting

  • Permission Errors: If the user lacks permission to view the attachment or its parent content, the API will return an authorization error. Ensure the API key has sufficient rights.
  • Invalid Attachment ID: Providing an incorrect or non-existent attachment ID will result in errors or empty results. Verify the attachment ID before use.
  • Limit Exceeded: The API limits the maximum number of labels returned per request to 250. Use the "Return All" option to paginate through all labels if more exist.
  • Filtering Issues: Using invalid prefix values in additional fields may cause no results to be returned. Use one of the allowed prefix options: "my", "team", "global", or "system".

Links and References


This summary is based on static analysis of the node's configuration and bundled source code related to the "Label" resource and "Get Attachment Labels" operation.

Discussion