Is there an API to GET the list of CMDB discovery sources?

fmaccioni
Tera Contributor

I'm building an external integration to push inventory data to ServiceNow CMDB and I'd like to pull the list of discovery sources configured on my ServiceNow instance.

They are the "Choices" for the cmdb_ci.discovery_source attribute (see screenshot).

1 ACCEPTED SOLUTION

Niklas Peterson
Mega Sage
Mega Sage

Hi,

Yes, you can use the standard Table API and make a call to fetch the choices from the Choice (sys_choice) table.

 

https://docs.servicenow.com/bundle/utah-api-reference/page/integrate/inbound-rest/concept/c_TableAPI...

 

Regards,
Niklas

View solution in original post

3 REPLIES 3

Niklas Peterson
Mega Sage
Mega Sage

Hi,

Yes, you can use the standard Table API and make a call to fetch the choices from the Choice (sys_choice) table.

 

https://docs.servicenow.com/bundle/utah-api-reference/page/integrate/inbound-rest/concept/c_TableAPI...

 

Regards,
Niklas

Something like this:

 

GET https://<YOUR-INSTANCE>.service-now.com/api/now/table/sys_choice?sysparm_query=elementSTARTSWITHdiscovery_source%5EnameSTARTSWITHcmdb_ci%5Einactive%3DFalse

 

Regards,
Niklas

That's exactly what I needed! Thank you Niklas!!