Attachments
Retrieves metadata for attachments stored in Confluence, such as file names, sizes, and related content pages.
Table Specific Information
Select
The add-in will use the Confluence API to process WHERE clause conditions built with the following column and operator. The rest of the filter is executed client side within the add-in. You can also search for Attachments using CQL (Confluence Query Language).
- Id supports the '=,!=,IN,NOT IN' comparisons.
- Type supports the '=,!=,IN,NOT IN' comparisons.
- Title supports the '=,!=,LIKE,NOT LIKE,IN,NOT IN' comparisons.
- SpaceKey supports the '=,!=,IN,NOT IN' comparisons.
- SpaceType supports the '=,!=,IN,NOT IN' comparisons.
- CreatedByUserName supports the '=,!=,IN,NOT IN' comparisons.
- CreatedDate supports the '=,!=,>,>=,<,<=' comparisons.
- LastUpdatedDatetime supports the '=,!=,>,>=,<,<=' comparisons.
For example, the following queries are processed server side:
SQL
SELECT * FROM Attachments WHERE Id = '1234'
SELECT * FROM Attachments WHERE Id IN ('1234', '2345')
SELECT * FROM Attachments WHERE Id = '294922' OR Type = 'attachment'
SELECT * FROM Attachments WHERE CreatedDate <= '2019/03/29 15:00' AND Id IN ('1234', '2345')
Additionally Id, Type, Title, CreatedDate, CreatedByUserName, AND LastUpdatedDatetime columns can be used in the ORDER BY clause, as following:
SELECT * FROM Attachments ORDER BY Id DESC SELECT * FROM Attachments ORDER BY CreatedByUserName ASC
CQL
Note: Filtering with CQL has the highest priority and all the other filters except "Excerpt" will be ignored when CQL filter is present in the query.
SELECT * FROM Attachments WHERE CQL = 'creator = currentUser() AND content = "1234" OR space.type = "global"'
Columns
| Name | Type | References | SupportedOperators | Description |
| Id [KEY] | String | =,!=,IN,NOT_IN | Unique identifier of the attachment within Confluence. Used to reference the attachment in related views or operations. | |
| Type | String | =,!=,IN,NOT_IN | Indicates the content type of the attachment, such as document, image, or other media file. | |
| Title | String | =,!=,IN,NOT_IN,LIKE | The display title of the attachment, typically matching the file name or user-defined label. | |
| Status | String | Indicates the current state of the attachment, such as current, archived, or deleted. | ||
| SpaceKey | String |
Spaces.Key | =,!=,IN,NOT_IN | The unique key of the space where the attachment resides. This identifies the space context for the file. |
| SpaceType | String |
Spaces.Type | =,!=,IN,NOT_IN | Specifies the type of space that contains the attachment, such as global, personal, or archived. |
| Position | String | Defines the attachment's position or ordering within the page or content hierarchy. | ||
| URL | String | The full URL used to access the attachment directly through the Confluence interface or API. | ||
| Excerpt | String | A brief summary or snippet of text associated with the attachment, providing quick reference information. | ||
| IsLatest | Boolean | If the value is 'true', the attachment record represents the most recent version. If the value is 'false', it refers to an older revision. | ||
| CreatedByUserName | String | =,!=,IN,NOT_IN | The username of the user who originally uploaded or created the attachment. | |
| CreatedByUserType | String | Indicates the type of account that created the attachment, such as internal, external, or system. | ||
| CreatedDate | Datetime | =,>,>=,<,<= | The date and time when the attachment was first created in Confluence. | |
| LastUpdatedDatetime | Datetime | =,>,>=,<,<= | The date and time when the attachment was last updated or replaced by a newer version. | |
| LastUpdatedMessage | String | The comment or message entered by the user when the attachment was last updated. | ||
| LastUpdatedNumber | Integer | The version number corresponding to the latest update of the attachment. | ||
| LastUpdatedUserName | String | The username of the user who performed the latest update to the attachment. | ||
| LastUpdatedUserType | String | Specifies the type of user who made the latest update, such as internal user or automated process. | ||
| LastUpdatedIsMinorEdit | Boolean | If the value is 'true', the most recent update was a minor edit that did not significantly alter the attachment. If the value is 'false', it represents a major revision. | ||
| LastUpdatedIsHidden | Boolean | If the value is 'true', the most recent version of the attachment is hidden from general users. If the value is 'false', it is visible. | ||
| PreviousVersionUserName | String | The username of the user who created or edited the previous version of the attachment. | ||
| PreviousVersionUserType | String | The type of user who modified the previous version of the attachment, such as internal or system user. | ||
| PreviousVersionDatetime | Datetime | The date and time when the previous version of the attachment was last modified. | ||
| PreviousVersionMessage | String | The user's message or comment describing changes in the previous version. | ||
| PreviousVersionNumber | String | The version number assigned to the previous revision of the attachment. | ||
| PreviousVersionIsMinorEdit | Boolean | If the value is 'true', the previous version was marked as a minor edit. If the value is 'false', it represented a major revision. | ||
| PreviousVersionIsHidden | Boolean | If the value is 'true', the previous version of the attachment is hidden from general users. If the value is 'false', it remains visible. | ||
| LinksEditui | String | The URL of the edit interface for the attachment, allowing users to modify or replace the file. | ||
| LinksSelf | String | The self-reference URL of the attachment resource, used for API access or direct retrieval. | ||
| LinksTinyui | String | The shortened URL (TinyUI) that provides a compact link to the attachment for easy sharing. | ||
| LinksWebui | String | The standard web interface URL (WebUI) of the attachment, used for navigation within the Confluence site. | ||
| ItemURL | String | The complete URL reference to the attachment as it appears in the Confluence user interface. | ||
| ContainerId | String | The unique identifier of the container (page or content item) that holds the attachment. | ||
| MediaType | String | Specifies the Multipurpose Internet Mail Extensions (MIME) media type of the attachment, which defines how the file is handled and displayed. | ||
| DownloadLink | String | The direct download URL for the attachment file, allowing users or systems to retrieve its content. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description | |
| CQL | String | Represents a Confluence Query Language (CQL) expression used to build structured queries for filtering or searching attachments. |