Export directly from a URL
Dynamically export data from a script or web service by building a URL query.
Before you begin
Role required: None
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.
About this task
You can use URL queries to generate filtered lists of records programmatically before exporting them. URL queries are useful for scripts that generate a list of records or when no user can manually add the filter from the UI.
You must be familiar with the ServiceNow table and column names to export data directly from the URL. See Navigate to a record or a module using a URL.
You can control whether to export the display value or raw value of fields and the field label or field name for headers using query parameters or system properties.
- For details on using query parameters, see Query parameters for display value and header.
- For details on using system properties, see System properties for display value and header.
Procedure
Sample URLs
| URL | Description |
|---|---|
| https://<instance name>.service-now.com/incident_list.do?CSV | Export all incidents to a comma-separated value text file. |
| https://<instance name>.service-now.com/incident_list.do?CSV&sysparm_query=sys_id%3E%3Db4aedb520a0a0b1001af10e278657d27 | Export a particular incident to a comma-separated value text file. |
| https://<instance name>.service-now.com/incident_list.do?CSV&sysparm_orderby=sys_id | Export all incidents to a comma-separated value text file and sort the list by sys_id. |
| https://<instance name>.service-now.com/incident_list.do?XML&sysparm_query=priority=1&sysparm_orderby=assigned_to | Export a list of all priority 1 incidents to an XML file and sort the list by Assigned to field. |