Export directly from a URL
docs.servicenow.com/bundle/jakarta-platform-administration/page/administer/exporting-
data/task/t_ExportDirectlyFromTheURL.html
You may want to export data from the URL if you need to dynamically export data from a
script or web service.
About this task
You must be familiar with the ServiceNow table and column names to export data directly
from the URL. See URL schema for more information about navigating to forms and lists.
Query parameters are available for you to use in the instance URL so you can display a
specific list of records in a specific order:
URL Parameter URL Syntax Description
sysparm_query sysparm_query= Displays a list of records that match the query. For example:
[column name]
[operator][value] https://<instance name>.service-now.com/incident_list.do?
XML&sysparm_query=priority=1
sysparm_orderby sysparm_orderby= Sorts a list of records by the column name provided. For
[column name] example:
https://<instance name>.service-now.com/incident_list.do?
XML&sysparm_query=priority=1&sysparm_orderby=assigned_to
You can sort by only one column using sysparm_orderby. To
sort by multiple columns, use
sysparm_query=ORDERBY[column name]^ORDERBY[column
name]. For example:
sysparm_query=ORDERBYassigned_to^ORDERBYpriority.
To export data directly from the URL, create a URL containing the following parts:
Procedure
1. Specify the instance URL. For example, https://.service-now.com/ .
2. Specify the table form or list to export. For example, incident_list.do .
3. Specify the export format processor to use for the export. For example, ?CSV.
4. (Optional) Specify a query and sort order with URL parameters. For example,
&sysparm_query=sys_id%3E%3Db4aedb520a0a0b1001af10e278657d27 .
The final URL should look like one of these sample URLs:
URL Description
https://<instance name>.service-now.com/incident_list.do?CSV Export all
incidents to a
comma-
separated
value text file.
1/2
URL Description
https://<instance name>.service-now.com/incident_list.do? Export a
CSV&sysparm_query=sys_id%3E%3Db4aedb520a0a0b1001af10e278657d27 particular
incident to a
comma-
separated
value text file.
https://<instance name>.service-now.com/incident_list.do? Export all
CSV&sysparm_orderby=sys_id incidents to a
comma-
separated
value text file
and sort the
list by sys_id.
Note: ServiceNow enforces basic authentication for direct URL access. The data
extracted from the URL contains only the fields to which the currently authenticated
user has read access.
2/2