Body of some articles is missing from kb_knowledge table api response

TR Vishwanath
Kilo Contributor

My program is fetching knowledge articles using /api/now/table/kb_knowledge Table API. I notice that some articles have their content returned as part of the text property in the response. However for certain other articles the text property is an empty string in the response.

In both the above cases the articles have content (html) and can be viewed in the ServiceNow knowledge tab. Can you provide any insight why the API may be returning no content for some articles, and what are workarounds to try to get the content?

Thanks!

 

1 ACCEPTED SOLUTION

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi TR,

For the results where text value is empty, is the value of "sys_class_name" "kb_knowledge"? If not, try calling /api/now/table/<value of sys_class_name>/sys_id"

View solution in original post

2 REPLIES 2

Filipe Cruz
Kilo Sage
Kilo Sage

Hi TR Vishwanath,

Were you able to pick the knowledge number of one of those articles where the body is not present?
If so, perform a request where you are only retrieving that article and see if that happens.

That might be due to the amount of data transferred in that request.
Try to lower the amount of records retrieved.

Let me know if that helps!

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

Best Regards,

Filipe Cruz

 

 

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi TR,

For the results where text value is empty, is the value of "sys_class_name" "kb_knowledge"? If not, try calling /api/now/table/<value of sys_class_name>/sys_id"