Skip to main content

Custom fields

SAM: Custom fields (0.0.0)

Download OpenAPI specification:Download

API for interacting with custom fields.

Asset types

Get asset type

Returns the details of a given asset type.

Authorizations:
BearerAuth
path Parameters
id
required
string

The unique ID of the asset type.

Responses

Response samples

Content type
application/json
{
  • "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
  • "name": "A name",
  • "_links": [
    ]
}

Get asset types

Returns a collection of asset types.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pagination": {
    },
  • "_links": [
    ]
}

Custom field values

Get custom field values

Returns a collection of customfield values.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pagination": {
    }
}

Add custom field value

Creates a custom field value.

Authorizations:
BearerAuth
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

Content type
application/json
{
  • "customFieldId": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
  • "assetId": "34469e92-5132-4269-8392-ef0b7652833f",
  • "assetTypeId": "efdd2bd1-4d22-42f9-b3cd-dffda7374ad9",
  • "value": "A value"
}

Response samples

Content type
application/json
{
  • "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e"
}

Get custom field value

Returns the details of a given customfield value.

Authorizations:
BearerAuth
path Parameters
id
required
string

The unique ID of the custom field value.

Responses

Response samples

Content type
application/json
{
  • "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
  • "customFieldId": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
  • "customFieldName": "Some name",
  • "assetId": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
  • "assetType": {
    },
  • "value": "A value",
  • "_links": [
    ]
}

Replace custom field value

Replaces a custom field value.

Authorizations:
BearerAuth
path Parameters
id
required
string

The unique ID of the custom field value.

Responses

Response samples

Content type
application/json
{
  • "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0"
}

Delete custom field value

Removes the given custom field value.

Authorizations:
BearerAuth
path Parameters
id
required
string

The unique ID of the custom field value.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Custom fields

Get custom fields

Returns a collection of customfields.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pagination": {
    },
  • "_links": [
    ]
}

Add custom field

Creates a custom field.

Authorizations:
BearerAuth
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

true if required; otherwise, false.

defaultValue
string or null

Default value of custom field.

multipleChoice
Array of strings

Collection of choices.

Responses

Request samples

Content type
application/json
{
  • "name": "Field 1",
  • "description": "Some long description.",
  • "dataTypeId": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
  • "assetTypesIds": {
    },
  • "isRequired": true,
  • "defaultValue": "A value",
  • "multipleChoice": {
    }
}

Response samples

Content type
application/json
{
  • "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e"
}

Get custom field

Returns the details of a given customfield.

Authorizations:
BearerAuth
path Parameters
id
required
string

The unique ID of the custom field.

Responses

Response samples

Content type
application/json
{
  • "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
  • "name": "A name",
  • "description": "A long description.",
  • "isRequired": false,
  • "defaultValue": "A default value",
  • "isMultipleChoice": false,
  • "multipleChoice": {
    },
  • "assetTypes": [
    ],
  • "dataType": {
    },
  • "_links": [
    ]
}

Replace custom field

Replaces a custom field.

Authorizations:
BearerAuth
path Parameters
id
required
string

The unique ID of the custom field.

Responses

Response samples

Content type
application/json
{
  • "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0"
}

Delete custom field

Removes the given custom field.

Authorizations:
BearerAuth
path Parameters
id
required
string

The unique ID of the custom field.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Data types

Get data types

Returns a collection of data types.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pagination": {
    },
  • "_links": [
    ]
}

Get data type

Returns the details of a given data type.

Authorizations:
BearerAuth
path Parameters
id
required
string

The unique ID of the data type.

Responses

Response samples

Content type
application/json
{
  • "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e",
  • "name": "A name",
  • "_links": [
    ]
}