REST API GET method

Ankit GSK
Tera Contributor

I am integrating my lower instances with PROD to get the Business Application data.
Now, all I need is just two fields data - name & number.
But currently I am getting around 200+ fields data for each record which is not needed.
Secondly, I am getting just 39 records out of 1200 something.
1200 isn't a big number.

So I just need assistance in setting up my REST message GET method.
Any Query parameter or something I can use to get just the required two fields data and can get complete 1200 records.

 

@Ankur Bawiskar 

4 REPLIES 4

Maik Skoddow
Tera Patron

Hi

please configure and test your requests with the help of the API REST Explorer (https://developer.servicenow.com/dev.do#!/learn/learning-plans/last/technology_partner_program_1/app...

There you will also find the query parameter to reduce the returned fields to the two ones mentioned by you.

Maik

Tai Vu
Kilo Patron

Hello Ankit,

Have you given a shot to the parameter mentioned below?

"sysparm_fields=name,number"

For instance: Send a GET request as follows

"https://<instance_name>/api/now/table/cmdb_ci_business_app?sysparm_fields=name,number"

Hi,

 

Iam implementing outbound rest message when i create incident in servicenow that need to be created in azure devops work item.my query is that i want to description filed of work item will be stored incident number and incident description.i tried as below, its not working.

 

{
"op": "add",
"path": "/fields/System.Description",
"value": "${description}"+ ' '+"${number}",
},

unrecognised007
Tera Contributor

Hi @Ankit GSK is it possible to integrate cmdb cis and do service mapping ? Is there any special GET method for it?