Which CMDB table to query if I need to extract all CIs irrespective of CI types ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2020 02:54 AM
Hi,
I would need to extract all CIs (Irrespective of CI class or category) from my instance through REST call. Which table should I query to get all CIs and their relationships at once ?
Is it cmdb_ci and cmdb_rel_ci ?
OR
If I need to fetch Application server then I need to provide table name as cmdb_ci_appl ?
If I need to fetch Database server then I need to provide table name as cmdb_ci_database ? etc...
Please let me know your valuable inputs regarding the same.
Regards,
Avi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2020 03:02 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2020 03:04 AM
Hi,
Its CMDB_CI which holds all CI records.
Thanks,
Dhananjay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2020 03:11 AM
Hi,
please use what is suggested by Ashutosh
You need to give the query which involves the class name you required
cmdb_ci_printer or cmdb_ci_appl etc
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2020 03:53 AM
Thanks for your replies. That is Ok if I am interested for one such Class / Category right ?
What if I need to export all CIs in ServiceNow with some specific columns ? Is there a way to achieve it ?
Because what I saw is if I just query cmdb_ci table, then very few columns are being extracted, probably because of all other tables are getting extended from cmdb_ci table.
Regards,
Avi