Retrieval
This interface is used to retrieve all operational logs under a company
Request Method
GET work_logs
Request Parameters
Attribute | Type | Description | Required |
---|
begin_date | String | Start date | Yes |
end_date | String | End date | Yes |
page | Integer | Page number | No, default is 1 |
per_page | Integer | Number of items per page, maximum 50 | No, default is 20 |
- Note: The date format is 'YYYY-MM-DD'
- Note: This interface can only retrieve operational logs within 90 days
Response Data
Attribute | Type | Description |
---|
code | Integer | Execution result code, 1000 represents success |
meta | JSON Object | Pagination information |
logs | Array | Log content, structure as follows |
Attribute | Type | Description |
---|
current_page | Integer | Current page number |
total_pages | Integer | Total number of pages |
Attribute | Type | Description |
---|
id | Integer | ID of the business record template |
user_id | String | Operator ID |
user_nick_name | String | Operator name |
obj_id | Integer | Object ID of the operation |
obj_nick_name | String | Name of the operation object |
device_ua | String | Terminal |
ip | String | IP address |
op_module | String | Operation module |
op_type | String | Operation type |
op_desc | String | Operation content |
created_at | String | Time of the operation |
Value | Explanation |
---|
sys | System |
im | Instant Messaging |
cc | Call Center |
ticket | Ticket |
Value | Explanation |
---|
sys_login | Web login status |
sys_status | Web online status |
im_stauts | Chat online status |
cc_work_way | Call device status |
cc_work_state | Call online status |
ticket_allot | Ticket reception and distribution switch |
Example
Request
curl -X GET 'http://demo.udesk.cn/open_api_v1/work_logs?email=admin@udesk.cn×tamp=1639119642&sign=5f17da1c4a2103185643ab5bb949545e406a65de9abaa3e529204ef3f9f54a1e&sign_version=v2&nonce=k99qp2j7tbbxvwfuhzo9sk&begin_date=2021-12-09&end_date=2021-12-10' \
Response
{
"code": 1000,
"logs":
[
{
"id": 32905,
"user_id": 741,
"user_nick_name": "wlyb3test",
"obj_id": 741,
"obj_nick_name": "wlyb3test",
"device_ua": "Browser-Windows 10 Chrome 92.0.4515",
"ip": "100.121.196.62",
"op_module": "sys",
"op_type": "sys_login",
"op_desc": "Non-login ---> Login",
"created_at": "2021-12-09T14:06:49.000+08:00"
}
]
}
Error Code Explanation
Error Code | Error Message |
---|
2059 | Incorrect open API signature |
2000 | Incorrect start date |
2000 | Incorrect end date |
2000 | End date cannot be less than start date |