Salesforce

WorldServer: No response when fetching the task history using REST-API - 'No content is returned, only empty models.'

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentWorldServer 11.6.x,11.7.x
Symptoms/Context
When you try to communicate using the REST-API endpoint or task history, you will not get any response.

The output of the API endpoints.

Response
No content is returned, only empty models.

The number of items in the response is correct:
{"items":[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],"total":29}
Resolution
For this issue, there is an existing defect: [WSXI-8347] with the development team for API call task history 

Follow the below workaround to fix this REST-API endpoint /task history issue.

Enter the task history fields parameters manually in the API call as displayed below. You will then receive a response as expected.

REST-API Call

http://WS_URL/ws-api/v2/taskHistory?taskId=taskid&fields=id,date,eventType,comment,user(id,username,displayName)

JSON response body sample(a piece of response pasted here only for required entry, however API will give response for all task history entries)

Refer to the below-mentioned example which shows the REST API call parameters to fetch the task history details of any specific task.
 
{
"id": 7255,
"date": "2020-12-15T10:41:56.965Z",
"eventType": "TASK_ASSETS_IMPORTED",
"user": {
"id": 1,
"username": "admin",
"displayName": "Admin"
},
"comment": "Imported asset(s) from SDL Trados Studio. Translation Memory \"Default\" was updated.",
}
Root Cause
Existing defect ticket [WSXI-8347] and CRQ-22494 with the development team for API call task history
Reference
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by