Attributes
Returns attributes 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 attributes satisfy all constraints that are specified in this search criteria. By default a result containing 1000 attributes is returned.
For fetching large numbers of attributes or attributes of multiple assets consider using the async methods of Output Module REST API instead, which allow getting attributes for multiple assets in one call and eliminate the risk of timing out. Additionally, consider the CSV endpoint of the Output Module REST API for particularly large result sets, as it's more memory efficient.
The first result to retrieve. If not set (offset = 0), results will be retrieved starting from row 0. Cursor should be preferred over offset for better performance and stable results. It is forbidden to use both in the same request.
0The maximum number of results to retrieve. If not set (limit = 0), the default limit will be used. The maximum allowed limit is 1000.
0Allows to limit the number of elements that will be counted. -1 will count everything and 0 will cause the count to be skipped. For cursor pagination this parameter is ignored and count is skipped.
-1Cursor for the current page of results. To retrieve the first page with cursor pagination you need to pass this parameter with an empty value (must be non-null). For the next pages, the value must be taken from the response (nextCursor property).
The list of IDs of the attribute types the found attributes should have, or null or empty if no type filtering should be applied.
The ID of the asset to find the attributes in, or null if no asset filtering should be applied.
The sorting order.
DESCPossible values: The field on which the results are sorted.
LAST_MODIFIEDPossible values: The list of public IDs of the attribute types the found attributes should have, or null or empty if no type filtering should be applied.
OK - The request has succeeded.
The total number of results. -1 when cursor pagination is used.
1000The offset for the results. -1 when cursor pagination is used.
10The maximum number of results to be returned.
100Cursor value to be passed in next request to retrieve next page of results. Not returned on last page or when offset pagination is used.
Unauthorized - Authentication has failed or has not been provided.
Internal Server Error - The server encountered an unexpected condition which prevented it from fulfilling the request. Please report a problem as this situation should not occur.
GET /rest/2.0/attributes?sortField=LAST_MODIFIED HTTP/1.1
Authorization: Basic username:password
Accept: */*
{
"total": 1000,
"offset": 10,
"limit": 100,
"results": [
{
"attributeDiscriminator": "text",
"asset": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"value": {},
"type": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
"lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
"createdOn": 1475503010320,
"lastModifiedOn": 1476703764163,
"system": true,
"id": "123e4567-e89b-12d3-a456-426614174000"
}
],
"nextCursor": "text"
}Adds a new attribute to an asset.
The ID of the asset this attribute should belong to.
The ID of the attribute type for the new attribute.
The public ID of the attribute type for the new attribute.
The value of this attribute. Expected type of the value depends on the type of the attribute.
Following list presents type of the value depending on the kind of the attribute
- kind: Numeric -> value type: number or string
- kind: Script -> value type: string
- kind: Single Value List -> value type: string
- kind: Date -> value type: number or string
- kind: String -> value type: string
- kind: Boolean -> value type: boolean or string
- kind: Multi Value List -> value type: array of strings
Created - The request has been fulfilled and resulted in a new resource being created.
The list of attributes corresponding to the complex relation.
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.
The id of the user that created this resource.
4d250cc5-e583-4640-9874-b93d82c7a6cbThe id of the user who modified this resource the last time.
a073ff90-e7bc-4b35-ba90-c4d475f642feThe timestamp (in UTC time standard) of the creation of this resource.
1475503010320The timestamp (in UTC time standard) of the last modification of this resource.
1476703764163Whether this is a system resource or not.
The id of the represented object (entity).
Bad Request - Request data is malformed or illegal. The request body will contain additional information.
Unauthorized - Authentication has failed or has not been provided.
Forbidden - Insufficient permissions to perform the requested operation.
Internal Server Error - The server encountered an unexpected condition which prevented it from fulfilling the request. Please report a problem as this situation should not occur.
POST /rest/2.0/attributes HTTP/1.1
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 131
{
"assetId": "123e4567-e89b-12d3-a456-426614174000",
"typeId": "123e4567-e89b-12d3-a456-426614174000",
"typePublicId": "text",
"value": {}
}{
"attributeDiscriminator": "text",
"asset": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"value": {},
"type": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
"lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
"createdOn": 1475503010320,
"lastModifiedOn": 1476703764163,
"system": true,
"id": "123e4567-e89b-12d3-a456-426614174000"
}Adds multiple attributes.
The ID of the asset this attribute should belong to.
The ID of the attribute type for the new attribute.
The public ID of the attribute type for the new attribute.
The value of this attribute. Expected type of the value depends on the type of the attribute.
Following list presents type of the value depending on the kind of the attribute
- kind: Numeric -> value type: number or string
- kind: Script -> value type: string
- kind: Single Value List -> value type: string
- kind: Date -> value type: number or string
- kind: String -> value type: string
- kind: Boolean -> value type: boolean or string
- kind: Multi Value List -> value type: array of strings
Created - The request has been fulfilled and resulted in a new resource being created.
The list of attributes corresponding to the complex relation.
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.
The id of the user that created this resource.
4d250cc5-e583-4640-9874-b93d82c7a6cbThe id of the user who modified this resource the last time.
a073ff90-e7bc-4b35-ba90-c4d475f642feThe timestamp (in UTC time standard) of the creation of this resource.
1475503010320The timestamp (in UTC time standard) of the last modification of this resource.
1476703764163Whether this is a system resource or not.
The id of the represented object (entity).
Bad Request - Request data is malformed or illegal. The request body will contain additional information.
Unauthorized - Authentication has failed or has not been provided.
Forbidden - Insufficient permissions to perform the requested operation.
Internal Server Error - The server encountered an unexpected condition which prevented it from fulfilling the request. Please report a problem as this situation should not occur.
POST /rest/2.0/attributes/bulk HTTP/1.1
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 133
[
{
"assetId": "123e4567-e89b-12d3-a456-426614174000",
"typeId": "123e4567-e89b-12d3-a456-426614174000",
"typePublicId": "text",
"value": {}
}
][
{
"attributeDiscriminator": "text",
"asset": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"value": {},
"type": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
"lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
"createdOn": 1475503010320,
"lastModifiedOn": 1476703764163,
"system": true,
"id": "123e4567-e89b-12d3-a456-426614174000"
}
]Removes the attributes identified by given ids.
No Content - The server has fulfilled the request but does not need to return an entity-body.
No content
Bad Request - Request data is malformed or illegal. The request body will contain additional information.
Unauthorized - Authentication has failed or has not been provided.
Forbidden - Insufficient permissions to perform the requested operation.
Internal Server Error - The server encountered an unexpected condition which prevented it from fulfilling the request. Please report a problem as this situation should not occur.
DELETE /rest/2.0/attributes/bulk HTTP/1.1
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 40
[
"123e4567-e89b-12d3-a456-426614174000"
]No content
Changes multiple attributes with the information that is present in the request. Only properties that are specified in this request and have not null values are updated. All other properties are ignored.
The ID of the attribute to be changed. Silently ignored if the ID is provided as path parameter of the request.
The value of this attribute. Expected type of the value depends on the type of the attribute.
Following list presents type of the value depending on the kind of the attribute
- kind: Numeric -> value type: number or string
- kind: Script -> value type: string
- kind: Single Value List -> value type: string
- kind: Date -> value type: number or string
- kind: String -> value type: string
- kind: Boolean -> value type: boolean or string
- kind: Multi Value List -> value type: array of strings
OK - The request has succeeded.
The list of attributes corresponding to the complex relation.
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.
The id of the user that created this resource.
4d250cc5-e583-4640-9874-b93d82c7a6cbThe id of the user who modified this resource the last time.
a073ff90-e7bc-4b35-ba90-c4d475f642feThe timestamp (in UTC time standard) of the creation of this resource.
1475503010320The timestamp (in UTC time standard) of the last modification of this resource.
1476703764163Whether this is a system resource or not.
The id of the represented object (entity).
Bad Request - Request data is malformed or illegal. The request body will contain additional information.
Unauthorized - Authentication has failed or has not been provided.
Forbidden - Insufficient permissions to perform the requested operation.
Not Found - One of the requested resources could not be found or the requested URI is invalid.
Internal Server Error - The server encountered an unexpected condition which prevented it from fulfilling the request. Please report a problem as this situation should not occur.
PATCH /rest/2.0/attributes/bulk HTTP/1.1
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 58
[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"value": {}
}
][
{
"attributeDiscriminator": "text",
"asset": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"value": {},
"type": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
"lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
"createdOn": 1475503010320,
"lastModifiedOn": 1476703764163,
"system": true,
"id": "123e4567-e89b-12d3-a456-426614174000"
}
]Returns the attribute identified by given id.
the id of the attribute
OK - The request has succeeded.
The list of attributes corresponding to the complex relation.
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.
The id of the user that created this resource.
4d250cc5-e583-4640-9874-b93d82c7a6cbThe id of the user who modified this resource the last time.
a073ff90-e7bc-4b35-ba90-c4d475f642feThe timestamp (in UTC time standard) of the creation of this resource.
1475503010320The timestamp (in UTC time standard) of the last modification of this resource.
1476703764163Whether this is a system resource or not.
The id of the represented object (entity).
Unauthorized - Authentication has failed or has not been provided.
Forbidden - Insufficient permissions to perform the requested operation.
Not Found - One of the requested resources could not be found or the requested URI is invalid.
Internal Server Error - The server encountered an unexpected condition which prevented it from fulfilling the request. Please report a problem as this situation should not occur.
GET /rest/2.0/attributes/{attributeId} HTTP/1.1
Authorization: Basic username:password
Accept: */*
{
"attributeDiscriminator": "text",
"asset": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"value": {},
"type": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
"lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
"createdOn": 1475503010320,
"lastModifiedOn": 1476703764163,
"system": true,
"id": "123e4567-e89b-12d3-a456-426614174000"
}Removes the attribute identified by given id.
the id of the attribute
No Content - The server has fulfilled the request but does not need to return an entity-body.
No content
Unauthorized - Authentication has failed or has not been provided.
Forbidden - Insufficient permissions to perform the requested operation.
Not Found - One of the requested resources could not be found or the requested URI is invalid.
Internal Server Error - The server encountered an unexpected condition which prevented it from fulfilling the request. Please report a problem as this situation should not occur.
DELETE /rest/2.0/attributes/{attributeId} HTTP/1.1
Authorization: Basic username:password
Accept: */*
No content
Changes the attribute with the information that is present in the request. Only properties that are specified in this request and have not null values are updated. All other properties are ignored.
the id of the attribute
The ID of the attribute to be changed. Silently ignored if the ID is provided as path parameter of the request.
The value of this attribute. Expected type of the value depends on the type of the attribute.
Following list presents type of the value depending on the kind of the attribute
- kind: Numeric -> value type: number or string
- kind: Script -> value type: string
- kind: Single Value List -> value type: string
- kind: Date -> value type: number or string
- kind: String -> value type: string
- kind: Boolean -> value type: boolean or string
- kind: Multi Value List -> value type: array of strings
OK - The request has succeeded.
The list of attributes corresponding to the complex relation.
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.
The id of the user that created this resource.
4d250cc5-e583-4640-9874-b93d82c7a6cbThe id of the user who modified this resource the last time.
a073ff90-e7bc-4b35-ba90-c4d475f642feThe timestamp (in UTC time standard) of the creation of this resource.
1475503010320The timestamp (in UTC time standard) of the last modification of this resource.
1476703764163Whether this is a system resource or not.
The id of the represented object (entity).
Bad Request - Request data is malformed or illegal. The request body will contain additional information.
Unauthorized - Authentication has failed or has not been provided.
Forbidden - Insufficient permissions to perform the requested operation.
Not Found - One of the requested resources could not be found or the requested URI is invalid.
Internal Server Error - The server encountered an unexpected condition which prevented it from fulfilling the request. Please report a problem as this situation should not occur.
PATCH /rest/2.0/attributes/{attributeId} HTTP/1.1
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 56
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"value": {}
}{
"attributeDiscriminator": "text",
"asset": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"value": {},
"type": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
},
"createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
"lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
"createdOn": 1475503010320,
"lastModifiedOn": 1476703764163,
"system": true,
"id": "123e4567-e89b-12d3-a456-426614174000"
}Last updated
Was this helpful?