You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is about a potential problem that we have when the generic client is implemented.
Currently, when we list all the records from a service we're continuously fetching records in batch (default size is 1000) by moving the offset sysparm_offset += offset + batch_size. The loop returns when there's no more data to fetch.
To figure out when there is no data left, we rely on two conditions:
for Table API, the client looks for the header value x-total-count which gives the total count of items available for that request
for other clients, the client stops when the result list is empty.
But the Change management APIlink server returns a response with no headers and a weird __meta field in the results list:
This issue is about a potential problem that we have when the generic client is implemented.
Currently, when we list all the records from a service we're continuously fetching records in batch (default size is
1000
) by moving the offsetsysparm_offset += offset + batch_size
. The loop returns when there's no more data to fetch.To figure out when there is no data left, we rely on two conditions:
Table API
, the client looks for the header valuex-total-count
which gives the total count of items available for that requestBut the
Change management API
link server returns a response with no headers and a weird__meta
field in theresults
list:The presence of this field makes the client never finish fetching items from the server.
The solution would be to introduce a custom
json.JSONDecoder
that removes this field when the response is parsed into a json obj.ISSUE TYPE
COMPONENT NAME
service.itsm.api_info
The text was updated successfully, but these errors were encountered: