To use this cli, we need to first Install Nodejs, then run the following command.
npm i -g namirasoft-history-api-v1
Returns the application health status
ns-history healthz get
Returns the value list of a given table and column
ns-history value list {table} {column}
Returns the history list
ns-history history list {filters} {page} {size} {user_id}
Returns a history by an id
ns-history history get {id}
Creates a new history
ns-history history create
--user_id (String)
--device_id (String)
--session_id (String)
--product_id (String)
--entity_name (String)
--entity_id (String)
--action (String)
--old_value (Any)
--new_value (Any)
{  "name": "History",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "allowEmpty": false    },    "user_id": {      "type": "String",      "required": false,      "allowEmpty": true    },    "device_id": {      "type": "String",      "required": false,      "allowEmpty": true    },    "session_id": {      "type": "String",      "required": false,      "allowEmpty": true    },    "product_id": {      "type": "String",      "required": true,      "allowEmpty": false    },    "entity_name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "allowEmpty": false    },    "action": {      "type": "String",      "required": true,      "allowEmpty": false    },    "old_value": {      "type": "Any",      "required": false    },    "new_value": {      "type": "Any",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "HistoryCreate",  "type": "Object",  "required": true,  "fields": {    "user_id": {      "type": "String",      "required": false,      "allowEmpty": true    },    "device_id": {      "type": "String",      "required": false,      "allowEmpty": true    },    "session_id": {      "type": "String",      "required": false,      "allowEmpty": true    },    "product_id": {      "type": "String",      "required": true,      "allowEmpty": false    },    "entity_name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "allowEmpty": false    },    "action": {      "type": "String",      "required": true,      "allowEmpty": false    },    "old_value": {      "type": "Any",      "required": false    },    "new_value": {      "type": "Any",      "required": false    }  }}
©Copyright 2010 to 2024 Namira Software Corporation. All rights reserved.