GetItemHistories
Get History
Description
Get history of comments and actions executed.
(Attention)
- When this API is executed, the unread history retrieved by the user who executed it is changed to read.
- The maximum number of items to be displayed is 100.
Method
GET
Request URL Format
/api/v0/applications/:app-id/datastores/:datastore-id/items/histories/:item-id
Query Params
"from_index" int // First history Index(From) If omitted, 0 is set.
"to_index" int // Last Index(To) of the acquisition history. If omitted, 30 is set. (To) - (From) is the number of items displayed. The maximum number of items that can be displayed is 100.
"from_datetime" Date // Retrieval of retrieval history From UTC date in ISO 8601-based format [YYYYY-MM-DDThh:mm:ss.uuuZ]. Example: new Date(Date.UTC(2020, 1, 2, 3, 4, 5)). toISOString();.
"to_datetime" Date // Specify the retrieval range. To UTC date in ISO 8601 based format.
"exclude_action_history" bool // Exclude history from action execution. Specify true if only comments are to be retrieved
"exclude_comment_history" bool // Exclude history by comment posting. Specify true if you want to get only action execution history
Request URL Sample
GET https://api.xxx.com/api/v0/applications/AppID/datastores/DS-ID/items/histories/59ad2d8a0e247927638e761a
Response Sample
{
"unread": 2, // Number of unread items (All unread items of the specified Item will be counted, regardless of the result of the acquisition.)
"histories": [
{
"history_id": "604384aa28dc5c20307cf4a2",
"display_order": 0,
"is_unread": true, // Unread
"comment": "コメント内容です",
"created_at": "2021-03-06T13:33:30.29Z",
"action_id": "5f38a11daa39556e74845a4b", // History by Action
"action_name": "Update", // History by Action
"transaction_id": "604384aa28dc5c20307cf498", // Based on this ID, you can get the change history of the field (API in preparation).
"action_operation": "2", // 2" is returned for renewal systems and "1" for new systems.
"is_status_action": true, // true is set if the action is tied to a status
"datastore_id": "5f38a11baa395581685afdb4",
"datastore_name": "TODO-SAMPLE",
"user_id": "5fc9b4aaaa39557110839cf7",
"username": "h.i",
"email": "[email protected]",
"updated_by": "5fc9b4aaaa39557110839cf7", // Update User ID
"updated_at": "2021-03-08T15:05:44.104Z", // Update Date
"is_updated": true // true is set if the comment is updated
},
{
"history_id": "6046212628dc5c0ca8114001",
"display_order": 1,
"is_unread": true, // Undread
"comment": "コメント2", // For comment-only history, action_id and other action information are not included.
"created_at": "2021-03-08T13:05:42.924Z",
"datastore_id": "5f38a11baa395581685afdb4",
"datastore_name": "TODO-SAMPLE",
"user_id": "5fc9b4aaaa39557110839cf7",
"username": "h.iwasaki",
"email": "[email protected]",
"updated_at": "2021-03-08T13:05:42.924Z", // Same as created_at if there are no comment updates
"is_updated": false
},
{
"history_id": "6046211128dc5c0ca8113fff",
"display_order": 2,
"is_unread": false,
"comment": "コメント",
"created_at": "2021-03-08T13:05:21.922Z",
"datastore_id": "5f38a11baa395581685afdb4",
"datastore_name": "TODO-SAMPLE",
"user_id": "5fc9b4aaaa39557110839cf7",
"username": "h.iwasaki",
"email": "[email protected]",
"updated_at": "2021-03-08T13:05:21.922Z",
"is_updated": false
},
{
"history_id": "5f9441e328dc5c771c1f5a0a",
"display_order": 3,
"is_unread": false,
"comment": "更新しました",
"created_at": "2020-10-24T15:01:55.576Z",
"action_id": "5f38a11daa39556e74845a4b", // History by Action
"action_name": "Update", // History by Action
"transaction_id": "5f9441e328dc5c771c1f5a02", // History by Action
"datastore_id": "5f38a11baa395581685afdb4",
"datastore_name": "TODO-SAMPLE",
"user_id": "5f25952c28dc5c55b463bc76",
"username": "hi-hexabase",
"email": "[email protected]",
"updated_at": "2020-10-24T15:01:55.576Z",
"is_updated": false
},
{
"history_id": "5f45294228dc5ca3a826371e",
"display_order": 4,
"is_unread": false,
"comment": "新規作成しました",
"created_at": "2020-08-25T15:07:46.335Z",
"action_id": "5f38a11daa39556e74845a4d", // History by Action
"action_name": "New", // History by Action
"datastore_id": "5f38a11baa395581685afdb4", // History by Action
"datastore_name": "TODO-SAMPLE",
"user_id": "5f25952c28dc5c55b463bc76",
"username": "hi-hexabase",
"email": "[email protected]",
"updated_at": "2020-08-25T15:07:46.335Z",
"is_updated": false
}
]
}