XML web service parameters

ServiceNow supports the URL parameters, sysparm_query and useUnloadFormat, to customize and filter the response you get.

Table 1. XML web service parameters
Parameter Description
sysparm_query The value for this URL parameter is that of an encoded query string and when used, will filter the data using the encoded query before returning the XML file. The following request will filter the list to only return "incidents" that are active:https://instance_name.service-now.com/incident.do?XML&sysparm_query=active=true
useUnloadFormat

This parameter indicates that the XML format that is returned to be of an unload format. The unload format is the same format you get when, from a list in the UI, you select Export > XML > .. The unload-formatted XML can be imported back into the instance by administrators of your system.

To enable the unload format from a URL, use the useUnloadFormat=true URL parameter. For example:https://instance_name.service-now.com/incident.do?XML&useUnloadFormat=true

Using the URL parameter produces an XML format that looks like:
<unload unload_date="2010-03-12 17:48:30">
  <incident action="INSERT_OR_UPDATE">
    <description/>
    <category>inquiry</category>
    <due_date/>
    <comments/>
    <knowledge>false</knowledge>
    <business_stc>15261</business_stc>
    <active>false</active>
    <sys_created_on>2010-01-02 22:51:33</sys_created_on>
    <correlation_id/>
    <follow_up/>
    <sys_domain>global</sys_domain>
    <close_notes/>
    <urgency>1</urgency>
    <incident_state>7</incident_state>
    <business_duration>1970-01-01 04:14:21</business_duration>
    <sys_id>46b66a40a9fe198101f243dfbc79033d</sys_id>
    <state>1</state>
    <closed_at>2009-12-28 22:55:16</closed_at>
    <closed_by display_value="Don Goodliffe">9ee1b13dc6112271007f9d0efdb69cd0</closed_by>
    <sys_updated_on>2010-04-12 01:20:57</sys_updated_on>
    <contact_type>phone</contact_type>
    <group_list/>
    <assignment_group display_value=""/>
    <sys_updated_by>glide.maint</sys_updated_by>
    <problem_id display_value="PRB12345">9ee1b13dc6112271007f9d0efd2211d0</problem_id>
    <approval_history/>
    <sys_created_by>don.goodliffe</sys_created_by>
    <order/>
    <caller_id display_value="Rick Berzle">5137153cc611227c000bbd1bd8cd2006</caller_id>
    <variables/>
    <calendar_duration>1970-01-02 00:04:53</calendar_duration>
    ...
  </incident>
</unload>