For the complete documentation index, see llms.txt. This page is also available as Markdown.

Attachments

Find attachments

get

Returns attachments matching the given search criteria. Only parameters that are specified in this request and have not null values are used for filtering. All other parameters are ignored. The returned attachments satisfy all constraints that are specified in this search criteria. By default a result containing 1000 attachments is returned.

Authorizations
AuthorizationstringRequired
Query parameters
offsetinteger · int32Optional

The first result to retrieve. If not set (offset = 0), results will be retrieved starting from row 0.

Default: 0
limitinteger · int32Optional

The maximum number of results to retrieve. If not set (limit = 0), the default limit will be used. The maximum allowed limit is 1000.

Default: 0
countLimitinteger · int32Optional

Allows to limit the number of elements that will be counted. -1 will count everything and 0 will cause the count to be skipped

Default: -1
fileNamestringOptional

The name of the file representing searched attachment.

fileContentTypestringOptional

The type of the content of the file representing searched attachment.

uploadDateinteger · int64Optional

The date of attachment upload. It is the timestamp (in UTC time standard).

userIdstring · uuidOptional

The ID of the user who uploaded the attachment.

baseResourceIdstring · uuidOptional

The ID of the resource the attachment refers to.

sortFieldstring · enumOptional

The field that should be used as reference for sorting.

Default: LAST_MODIFIEDPossible values:
sortOrderstring · enumOptional

The order of sorting.

Default: DESCPossible values:
Responses
200

OK - The request has succeeded.

application/json
totalinteger · int64Optional

The total number of results.

Example: 1000
offsetinteger · int64Optional

The offset for the results.

Example: 10
limitinteger · int64Optional

The maximum number of results to be returned.

Example: 100
get/attachments
GET /rest/2.0/attachments HTTP/1.1
Authorization: Basic username:password
Accept: */*
{
  "total": 1000,
  "offset": 10,
  "limit": 100,
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
      "createdOn": 1475503010320,
      "lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
      "lastModifiedOn": 1476703764163,
      "system": true,
      "baseResource": {
        "id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
        "resourceDiscriminator": "Community"
      },
      "file": {
        "id": "5d140075-f72e-4f79-81ed-ce5551dca008",
        "name": "text",
        "contentType": "text/csv"
      }
    }
  ]
}

Add attachment

post

Adds new attachment.

Authorizations
AuthorizationstringRequired
Body
filestring · binaryOptional

the file - attachment content

fileNamestringOptional

the display name of the file of this attachment

resourceTypestring · enumOptional

the type of the resource the attachment should refer to. An attachment can be added on those resource types: User, Community, Domain, Asset. This parameter is deprecated, please use resourceDiscriminator instead.

Possible values:
resourceDiscriminatorstringOptional

the discriminator of the resource the attachment should refer to. Following discriminators are valid for attachments : User, Community, Domain, Asset.

resourceIdstring · uuidOptional

the id of the resource the attachment should refer to

Responses
201

Created - The request has been fulfilled and resulted in a new resource being created.

application/json
idstring · uuidRequired

The id of the represented object (entity).

createdBystring · uuidOptional

The id of the user that created this resource.

Example: 4d250cc5-e583-4640-9874-b93d82c7a6cb
createdOninteger · int64Optional

The timestamp (in UTC time standard) of the creation of this resource.

Example: 1475503010320
lastModifiedBystring · uuidOptional

The id of the user who modified this resource the last time.

Example: a073ff90-e7bc-4b35-ba90-c4d475f642fe
lastModifiedOninteger · int64Optional

The timestamp (in UTC time standard) of the last modification of this resource.

Example: 1476703764163
systembooleanOptional

Whether this is a system resource or not.

resourceTypestring · enumRequiredDeprecated

The type of the resource, e.g. [Community, Asset, Domain, Attribute, Relation, WorkflowInstance, ...]. This property is deprecated and will be removed in the future. To stay backwards compatible while still allowing new types of resources to be introduced, a resource discriminator property (of type String) has been added to the subtypes of Resource where it adds value, e.g. assignedResourceDiscriminator on AssignedResource, or attributeDiscriminator on Attribute. A discriminator is only added on subtypes whose declared return type can represent more than one kind of resource; it is omitted where the return type can only ever be a single kind, as it would then always hold the same value and carry no additional information. For new types of resource that didn't exist before this change, the resourceType will be BaseDataType.

Possible values:
post/attachments
POST /rest/2.0/attachments HTTP/1.1
Authorization: Basic username:password
Content-Type: multipart/form-data
Accept: */*
Content-Length: 140

{
  "file": "binary",
  "fileName": "text",
  "resourceType": "View",
  "resourceDiscriminator": "text",
  "resourceId": "123e4567-e89b-12d3-a456-426614174000"
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
  "createdOn": 1475503010320,
  "lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
  "lastModifiedOn": 1476703764163,
  "system": true,
  "baseResource": {
    "id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
    "resourceDiscriminator": "Community"
  },
  "file": {
    "id": "5d140075-f72e-4f79-81ed-ce5551dca008",
    "name": "text",
    "contentType": "text/csv"
  }
}

Get attachment

get

Returns information about the attachment identified by id.

Authorizations
AuthorizationstringRequired
Path parameters
attachmentIdstring · uuidRequired

the id of the attachment

Responses
200

OK - The request has succeeded.

application/json
idstring · uuidRequired

The id of the represented object (entity).

createdBystring · uuidOptional

The id of the user that created this resource.

Example: 4d250cc5-e583-4640-9874-b93d82c7a6cb
createdOninteger · int64Optional

The timestamp (in UTC time standard) of the creation of this resource.

Example: 1475503010320
lastModifiedBystring · uuidOptional

The id of the user who modified this resource the last time.

Example: a073ff90-e7bc-4b35-ba90-c4d475f642fe
lastModifiedOninteger · int64Optional

The timestamp (in UTC time standard) of the last modification of this resource.

Example: 1476703764163
systembooleanOptional

Whether this is a system resource or not.

resourceTypestring · enumRequiredDeprecated

The type of the resource, e.g. [Community, Asset, Domain, Attribute, Relation, WorkflowInstance, ...]. This property is deprecated and will be removed in the future. To stay backwards compatible while still allowing new types of resources to be introduced, a resource discriminator property (of type String) has been added to the subtypes of Resource where it adds value, e.g. assignedResourceDiscriminator on AssignedResource, or attributeDiscriminator on Attribute. A discriminator is only added on subtypes whose declared return type can represent more than one kind of resource; it is omitted where the return type can only ever be a single kind, as it would then always hold the same value and carry no additional information. For new types of resource that didn't exist before this change, the resourceType will be BaseDataType.

Possible values:
get/attachments/{attachmentId}
GET /rest/2.0/attachments/{attachmentId} HTTP/1.1
Authorization: Basic username:password
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
  "createdOn": 1475503010320,
  "lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
  "lastModifiedOn": 1476703764163,
  "system": true,
  "baseResource": {
    "id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
    "resourceDiscriminator": "Community"
  },
  "file": {
    "id": "5d140075-f72e-4f79-81ed-ce5551dca008",
    "name": "text",
    "contentType": "text/csv"
  }
}

Remove attachment

delete

Removes attachment identified by given id.

Authorizations
AuthorizationstringRequired
Path parameters
attachmentIdstring · uuidRequired

the id of the attachment

Responses
204

No Content - The server has fulfilled the request but does not need to return an entity-body.

No content

delete/attachments/{attachmentId}
DELETE /rest/2.0/attachments/{attachmentId} HTTP/1.1
Authorization: Basic username:password
Accept: */*

No content

Get attachment content

get

Returns content of the attachment identified by given id.

Authorizations
AuthorizationstringRequired
Path parameters
attachmentIdstring · uuidRequired

the id of the attachment

Responses
200

OK - The request has succeeded.

application/json
string · binaryOptional

The attachment content

get/attachments/{attachmentId}/file
GET /rest/2.0/attachments/{attachmentId}/file HTTP/1.1
Authorization: Basic username:password
Accept: */*
binary

Last updated

Was this helpful?