History

The History handler returns a list of changes made on the asset.

GET /api/inventory/<asset-id>/history

Fetch a list of historical changes to the given asset id.

RESPONSE Fields Value Type Description
userId GUID The GUID of the user who made the change
change String An explanatory text of the change
timestamp Number The timestamp of when the change was made

Example Request

# Request
GET /api/inventory/0000000014dda45eb9fe2ecb0/history HTTP/1.1
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
 
[
  {
    "userId": "sys02qmoxwlwprnnovhrxtx7n",
    "change": "Anlage \"DreamShaper_v7_a_set_of_air_pods_and_beats_pro_on_a_table_of_a_2.jpg\" gespeichert",
    "timestamp": 1695729773511
  },
  {
    "userId": "sys02qmoxwlwprnnovhrxtx7n",
    "change": "Foto gesetzt auf \"DreamShaper_v7_a_set_of_air_pods_and_beats_pro_on_a_table_of_a_2.jpg\"",
    "timestamp": 1695729773487
  },
  {
    "userId": "sys02qmoxwlwprnnovhrxtx7n",
    "change": "Erstellt",
    "timestamp": 1695721418828
  }
]

Application Example

# Browser access
http://127.0.0.1:9000/api/inventory/0000000014dda45eb9fe2ecb0/history
 
# Shell access using curl
curl -LsH "Authorization: Bearer <access_token>" "http://127.0.0.1:9000/api/inventory/0000000014dda45eb9fe2ecb0/history"
 
# Shell access using curl using username and password
curl -Lsu username:password "http://127.0.0.1:9000/api/inventory/0000000014dda45eb9fe2ecb0/history"