Authority REST API - Type Controller
The type/bycode
URL provides bulk management of Asset Types by code.
Retrieve Asset Types by code
Section titled “Retrieve Asset Types by code”GET /type/bycode
Retrieves the listed Asset Types.
Query Parameters
Section titled “Query Parameters”Parameter | Expected | Description |
---|---|---|
code | Optional | An Asset Type code. Can be specified multiple times to retrieve additional Asset Types. |
Response
Section titled “Response”Code | Status | Description |
---|---|---|
200 | Success | Content is an array of AssetType objects. Asset Type codes that do not match will be omitted. |
422 | Failure | Invalid data was provided. Content is a JSON array of one or more error codes describing the problem. |
Retrieve Asset Types by code (bulk)
Section titled “Retrieve Asset Types by code (bulk)”POST /type/bycode
Retrieves the listed Asset Types.
This is an alternative endpoint for providing more codes than the maximum URL length permits.
POST Body
Section titled “POST Body”A JSON string array, listing Asset Type codes to retrieve.
Response
Section titled “Response”Code | Status | Description |
---|---|---|
200 | Success | Content is an array of AssetType objects. Asset Type codes that do not match will be omitted. |
422 | Failure | Invalid data was provided. Content is a JSON array of one or more error codes describing the problem. |
Delete Asset Types by code
Section titled “Delete Asset Types by code”DELETE /type/bycode
Deletes the listed Asset Types.
POST Body
Section titled “POST Body”A JSON array of strings, listing the Asset Type codes to delete.
Response
Section titled “Response”Code | Status | Description |
---|---|---|
204 | Success | Completed successfully. Asset Type codes that do not match will be ignored. |
409 | Failure | The operation would cause a conflict. Content is a JSON array of one or more error codes describing the problem. |
422 | Failure | Invalid data was provided. Content is a JSON array of one or more error codes describing the problem. |