Knowledge Management REST API

Andr_1
Tera Expert

Hello,

 

I am testing the Knowledge Management Rest API, and it is only returning me a count of 4693 articles

Andr_1_0-1764861791078.png

but I have a lot more articles on the system

Andr_1_1-1764861846164.png


even if I count only the published ones, the count does not match

Andr_1_2-1764861898079.png

 

Can someone help me with this topic?

 

Thanks



 

 

1 ACCEPTED SOLUTION

Andr_1
Tera Expert

I found the solution

The correct filter is: 

Andr_1_0-1764930632842.png

- Article Published

- Article Language in English

- Knowledge Base active

- Article active

- Valid to not expired

 

Thanks for all your replies

View solution in original post

12 REPLIES 12

Sheldon  Swift
ServiceNow Employee
ServiceNow Employee

Hi @Andr_1 - The API will only return articles the user can read. Check that the user "Can Read" the Knowledge Base your target articles belong to.

Hello @Sheldon  Swift ,

Thanks for your feedback

I am using an admin user. It should not have access to all articles?
Do I have a way to catch all the articles from the knowledge base if I use the API with an admin user?

I expect that querying with an admin user would return all published articles in active KBs. Have you checked if there are inactive KBs in kb_knowledge_base?

This is the query I am doing on knowledge base table 

Andr_1_0-1764866597288.png
with a total of

Andr_1_1-1764866640769.png

I am a full admin user, and I am using the rest api explorer module to test it, and the count is different

Andr_1_2-1764866719574.png