Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to access knowledge based in SN from REST API

wakespirit
Kilo Guru

Dear all,http:<

I need from an external application to access ServcieNow knowledge based article.

What is the URL I should initiate a GET in order to retriev that list ? I would like to test it first from GOOGLE ARC tool

http://<my servicenow>/???/<Table> ???

Thanks for your help

regards

1 ACCEPTED SOLUTION

If there is a one to one relation with the article then you could fetch data from the related table using the REST API. For eg Configuration item - it is related to the article and you could fetch data from the CI. 

If the relation is from a different table, then you need send a second query on the other table and fetch the details.

Refer to this post and you can see on how to dot walk:  https://community.servicenow.com/community?id=community_blog&sys_id=49fda22ddbd0dbc01dcaf3231f9619cf&view_source=searchResult

GET /api/now/table/incident?sysparm_limit=1&sysparm_fields=number%2Clocation%2Clocation.name%2Clocation.city

View solution in original post

7 REPLIES 7

Thaanks for your reply, but what if the string or set of words are part of other field as well like TAG, or description, or in content of the knowledge ?

how can I build the query ?

If there is a one to one relation with the article then you could fetch data from the related table using the REST API. For eg Configuration item - it is related to the article and you could fetch data from the CI. 

If the relation is from a different table, then you need send a second query on the other table and fetch the details.

Refer to this post and you can see on how to dot walk:  https://community.servicenow.com/community?id=community_blog&sys_id=49fda22ddbd0dbc01dcaf3231f9619cf&view_source=searchResult

GET /api/now/table/incident?sysparm_limit=1&sysparm_fields=number%2Clocation%2Clocation.name%2Clocation.city

Alberto Consonn
ServiceNow Employee

Hi,

If you're querying the knowledge base table you need to set your endpoint to http://<my servicenow>/api/now/v1/table/kb_knowledge

I would recommend use the REST API Explorer to help with your integration, check below:

REST API Explorer

Hope this will be useful for you.

Please, remember to mark Correct or Helpful if you find my response useful.

Cheers
Alberto