Using the Archive handler, you can change the archival state of an asset to its archived state.
Note: Parent child-assets will automatically be archived as well.
Will archive the assets and its child assets. The response is the same as in the assets handler.
Note: archiving an asset always also archives the child assets
# Request GET /api/inventory/0000000014dda45eb9fe2ecb0/archive HTTP/1.1 Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u # Response HTTP/1.1 200 OK Content-Type: application/json { "id": "0000000014dda45eb9fe2ecb0", "parent": null, "name": "Dell Precision T3400", "isArchived": true, "type": { "id": 11, "name": "Computer" }, "hasAttachments": false, "fields": { "owner": "sys02qmoxwlwprnnovhrxtx7n", "license": 0, "serialnumber": "G 1234 5678 90", "purchasedate": 1629410400000, "price": 1399.5, "vendor": 1, "name": "Dell Precision T3400", "warranty": 1692482400000, "sla": 2, "location": 0, "custom1": "10.1.1.10", "assetnumber": "X123" } }
# Browser access http://127.0.0.1:9000/api/inventory/0000000014dda45eb9fe2ecb0/archive # Shell access using curl curl -LsH "Authorization: Bearer <access_token>" "http://127.0.0.1:9000/api/inventory/0000000014dda45eb9fe2ecb0/archive" # Shell access using curl using username and password curl -Lsu username:password "http://127.0.0.1:9000/api/inventory/0000000014dda45eb9fe2ecb0/archive"