Custom fields
SAM: Custom fields (0.0.0)
Download OpenAPI specification:Download
API for interacting with custom fields.
Get asset type
Returns the details of a given asset type.
Authorizations:
path Parameters
id required | string The unique ID of the asset type. |
Responses
Response samples
- 200
- 400
- 403
- 404
- 500
{- "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "name": "A name",
- "_links": [
- {
- "href": "/api/custom-fields/v1/custom-fields",
- "rel": "self",
- "method": "GET"
}
]
}
Response samples
- 200
- 403
- 500
{- "items": [
- {
- "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "name": "A name"
}
], - "pagination": {
- "page_size": 25,
- "page_number": 1,
- "total_pages": 5,
- "total_items": 100
}, - "_links": [
- {
- "href": "/api/custom-fields/v1/custom-fields",
- "rel": "self",
- "method": "GET"
}
]
}
Get custom field values
Returns a collection of customfield values.
Authorizations:
Responses
Response samples
- 200
- 403
- 500
{- "items": [
- {
- "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "customFieldId": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "customFieldName": "Some name",
- "assetId": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "assetType": {
- "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "name": "A name"
}, - "value": "A value"
}
], - "pagination": {
- "page_size": 25,
- "page_number": 1,
- "total_pages": 5,
- "total_items": 100
}
}
Add custom field value
Creates a custom field value.
Authorizations:
Request Body schema: application/json
customFieldId required | string <guid> non-empty The unique ID of the custom field. |
assetId required | string <guid> non-empty The unique ID of the asset. |
assetTypeId required | string <guid> non-empty The unique ID of the asset type. |
value required | string non-empty Custom field value. |
Responses
Request samples
- Payload
{- "customFieldId": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "assetId": "34469e92-5132-4269-8392-ef0b7652833f",
- "assetTypeId": "efdd2bd1-4d22-42f9-b3cd-dffda7374ad9",
- "value": "A value"
}
Response samples
- 201
- 400
- 403
- 500
{- "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e"
}
Get custom field value
Returns the details of a given customfield value.
Authorizations:
path Parameters
id required | string The unique ID of the custom field value. |
Responses
Response samples
- 200
- 400
- 403
- 404
- 500
{- "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "customFieldId": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "customFieldName": "Some name",
- "assetId": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "assetType": {
- "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "name": "A name"
}, - "value": "A value",
- "_links": [
- {
- "href": "/api/custom-fields/v1/custom-fields",
- "rel": "self",
- "method": "GET"
}
]
}
Response samples
- 200
- 403
- 500
{- "items": [
- {
- "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "name": "A name",
- "description": "A long description.",
- "isRequired": false,
- "defaultValue": "A default value",
- "isMultipleChoice": false,
- "multipleChoice": {
- "0": "Value 1",
- "1": "Value 2"
}, - "assetTypes": [
- {
- "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "name": "A name"
}
], - "dataType": {
- "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "name": "A name"
}
}
], - "pagination": {
- "page_size": 25,
- "page_number": 1,
- "total_pages": 5,
- "total_items": 100
}, - "_links": [
- {
- "href": "/api/custom-fields/v1/custom-fields",
- "rel": "self",
- "method": "GET"
}
]
}
Add custom field
Creates a custom field.
Authorizations:
Request Body schema: application/json
name required | string non-empty Custom field name. |
description | string Custom field description. |
dataTypeId required | string <guid> non-empty The unique ID of the data type. |
assetTypesIds required | Array of strings <guid> [ items <guid > ] Collection of asset type ids. |
isRequired | boolean
|
defaultValue | string or null Default value of custom field. |
multipleChoice | Array of strings Collection of choices. |
Responses
Request samples
- Payload
{- "name": "Field 1",
- "description": "Some long description.",
- "dataTypeId": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "assetTypesIds": {
- "0": "34469e92-5132-4269-8392-ef0b7652833f"
}, - "isRequired": true,
- "defaultValue": "A value",
- "multipleChoice": {
- "0": "Choice 1",
- "1": "Choice 2"
}
}
Response samples
- 201
- 400
- 403
- 500
{- "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e"
}
Get custom field
Returns the details of a given customfield.
Authorizations:
path Parameters
id required | string The unique ID of the custom field. |
Responses
Response samples
- 200
- 400
- 403
- 404
- 500
{- "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "name": "A name",
- "description": "A long description.",
- "isRequired": false,
- "defaultValue": "A default value",
- "isMultipleChoice": false,
- "multipleChoice": {
- "0": "Value 1",
- "1": "Value 2"
}, - "assetTypes": [
- {
- "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "name": "A name"
}
], - "dataType": {
- "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "name": "A name"
}, - "_links": [
- {
- "href": "/api/custom-fields/v1/custom-fields",
- "rel": "self",
- "method": "GET"
}
]
}
Response samples
- 200
- 403
- 500
{- "items": [
- {
- "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "name": "A name"
}
], - "pagination": {
- "page_size": 25,
- "page_number": 1,
- "total_pages": 5,
- "total_items": 100
}, - "_links": [
- {
- "href": "/api/custom-fields/v1/custom-fields",
- "rel": "self",
- "method": "GET"
}
]
}
Get data type
Returns the details of a given data type.
Authorizations:
path Parameters
id required | string The unique ID of the data type. |
Responses
Response samples
- 200
- 400
- 403
- 404
- 500
{- "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
- "name": "A name",
- "_links": [
- {
- "href": "/api/custom-fields/v1/custom-fields",
- "rel": "self",
- "method": "GET"
}
]
}