Skip to content

Authority REST API - Type Controller

The type/bycode/<code> URL manipulates individual Asset Types.

HEAD /type/bycode/<code>

Checks if an Asset Type is registered.

ParameterDescription
codeA single URL-encoded Asset Type code.
CodeStatusDescription
204SuccessThe Asset Type exists.
404FailureThe Asset Type does not exist.
422FailureInvalid data was provided.
Content is a JSON array of one or more error codes describing the problem.

GET /type/bycode/<code>

Retrieves an Asset Type.

ParameterDescription
codeA single URL-encoded Asset Type code.
CodeStatusDescription
200SuccessThe Asset Type was found.
Content is a single AssetType object.
404FailureThe Asset Type does not exist.
422FailureInvalid data was provided.
Content is a JSON array of one or more error codes describing the problem.

POST /type/bycode/<code>

Adds or updates a registered Asset Type.

ParameterDescription
codeA single URL-encoded Asset Type code.

A single AssetType object to add or update. The supplied Asset Type code must match that of the URL.

CodeStatusDescription
201SuccessThe Asset Type was registered.
The redirect Location will point to the registered Asset Type.
422FailureInvalid data was provided.
Content is a JSON array of one or more error codes describing the problem.

PATCH /type/bycode/<code>

Replaces a registered Asset Type, optionally changing its Asset Type code.

If the Asset Type code is changed, all Assets with that type change to the new code.

ParameterDescription
codeA single URL-encoded Asset Type code.

A single AssetType object to replace. The supplied Asset Type code can differ from the URL.

CodeStatusDescription
201SuccessThe Asset Type was replaced.
The redirect Location will point to the updated Asset Type.
404FailureThe Asset Type does not exist.
422FailureInvalid data was provided.
Content is a JSON array of one or more error codes describing the problem.

DELETE /type/bycode/<code>

Deletes a registered Asset Type. Will fail if any Assets exist with this Asset Type.

ParameterDescription
codeA single URL-encoded Asset Type code
CodeStatusDescription
204SuccessThe Asset Type was deleted.
404FailureThe Asset Type does not exist.
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.