The change asset type API changes an assets type.
This process deactivates the old asset, and adds a new duplicate asset for the new asset type.
A best effort is made to duplicate asset attributes to the new asset where the attribute names are the same.
A valid x-Auth-token header related to the client contains the asset is required.
URI
Development
Production
Method
POST
Content Type
application/json
Body
Example
{"id":1021657891, "assetTypeId":1021648830}
id is theZetaSafe Asset PK of the asset you wish to change assetTypeId is the new Asset Type ID PK you wish to change the asset to
BOTH id and assetTypeId are required
Responses:
201: Created
{"recordId":1021156388}
This successful response is the new ZetaSafe asset PK (Primary Key). This can be used for any additional related data which is required
400: Bad Request - an explanation is returned
{"result":"FOREIGN_KEY_INVALID",
"headings":[{"key":"ok","value":"OK"}],
"title":"Record not found",
"message":"Asset Type Not Found."}
403: Unauthorised/Access Denied
{
"timestamp": 1556533789103,
"status": 500,
"error": "Internal Server Error",
"exception": "java.lang.NullPointerException",
"message": "No message available",
"path": "//v1/location/handheld/add"
}
500: Error with the internal process of adding a location.