Skip to content

Authority REST API - Asset Controller

The asset/bytype/<type>/bycode URL provides bulk management of Assets by code.

GET /asset/bytype/<type>/bycode

Retrieves the listed Assets of the given type.

ParameterDescription
typeA single URL-encoded Asset Type code.
ParameterExpectedDescription
codeOptionalAn Asset code. Can be specified multiple times to retrieve additional Assets.
appOptionalAn Application identifier. Will only return Assets with context data for this Application.
Can be specified multiple times to include additional Applications.
CodeStatusDescription
200SuccessContent is an array of Asset objects.
422FailureInvalid data was provided.
Content is a JSON array of one or more error codes describing the problem.

POST /asset/bytype/<type>/bycode

Retrieves the listed Assets of the given type.

This is an alternative endpoint for providing more codes than the maximum URL length permits.

ParameterDescription
typeA single URL-encoded Asset Type code.
ParameterExpectedDescription
appOptionalAn Application identifier. Will only return Assets with context data for this Application.
Can be specified multiple times to include additional Applications.

A JSON string array, listing the Asset codes to retrieve.

CodeStatusDescription
200SuccessContent is an array of Asset objects.
422FailureInvalid data was provided.
Content is a JSON array of one or more error codes describing the problem.

DELETE /asset/bytype/<type>/bycode

Deletes the listed Assets of the given type.

Alternatively, if one or more app codes are included, removes any matching context data instead. Deletion of Assets with no more context data is controlled by deleteOnEmpty.

ParameterDescription
typeA single URL-encoded Asset Type code.
ParameterExpectedDescription
appOptionalAn Application identifier. Context data for this Application will be removed from the listed Assets.
Can be specified multiple times to delete additional Applications.
deleteOnEmptyOptionalA boolean true/false. If true, and one or more app values are provided, Assets will be deleted when their context data is empty.

A JSON string array, listing the Asset codes to delete.

CodeStatusDescription
204SuccessCompleted successfully.
Asset codes that do not match a registered Asset will be ignored.
409FailureThe operation would cause a conflict.
Content is a JSON array of one or more error codes describing the problem.
422FailureInvalid data was provided.
Content is a JSON array of one or more error codes describing the problem.