- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2015 08:39 AM
I am working on creating an integration between ServiceNow and NetSuite. I have the Incident WSDL set up and it is able to pull information, if I have the sys_id. Problem is, the only way I can figure out how to get that ID is via the UI.
Is there a REST API or a SOAP API that I am missing, that will query based on the ticket ID (something like INC0012345)? I've looked through the documentation, but I'm not finding anything that calls that. When using the SOAP WSDL, my only option for the request is the sys_id.
That being said, I'd rather use a REST API. But, I'm not 100% sure how to properly form a CURL request for ServiceNow, so that I can get the auth token, to place in the header of our integration software (that's the easiest way I have found to grab it). Thanks for any assistance with this (even if it's just pointing me to a page I may have missed in the docs).
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2015 09:51 AM
You can use getRecords function for querying through ticket number.
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.service-now.com/incident" xmlns:m="http://www.service-now.com" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<getRecords xmlns="http://www.service-now.com">
<number>INC0000002</number>
</getRecords>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This input to getRecords function should return you the matching incident record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2015 09:47 AM
You can do:
in REST: /api/now/table/incident?sysparm_query=number=INC000001000
curl: http://wiki.servicenow.com/index.php?title=Table_API_Curl_Examples#gsc.tab=0
curl --user admin:admin \
--header "Accept: application/json" \
https://myinstance.service-now.com/api/now/table/incident?sysparm_query=number=INC000001000
in SOAP: https://instance.service-now.com/incident.do?SOAP
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inc="http://www.service-now.com/incident">
<soapenv:Header/>
<soapenv:Body>
<inc:getRecords>
<number>INC0000002</number>
</inc:getRecords>
</soapenv:Body>
</soapenv:Envelope>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2018 06:50 PM
Hello
I am on Jakarta, we use SSO to loginto SN I have a user account and need to set it up for WSDL and this account needs to be able to access the WSDL how can i do this any help will be very helpful I am very new to this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2015 09:51 AM
You can use getRecords function for querying through ticket number.
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.service-now.com/incident" xmlns:m="http://www.service-now.com" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<getRecords xmlns="http://www.service-now.com">
<number>INC0000002</number>
</getRecords>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This input to getRecords function should return you the matching incident record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2016 09:07 AM
I am using getRecords and still getting a sys_id back on reference and list type fields..