- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2016 02:34 PM
Hi Team,
I want to use API to get a list of records within a set date range. I tried a few ways and queries but it did not seem to work.
Here is what i did -
Tablename - Incident
sysparm_query - sys_created_onBETWEENjavascript:gs.dateGenerate('2016-11-20','00:00:00')@javascript:gs.dateGenerate('2016-11-29','12:59:59')
The following is the request url i get after i process the API.
I ran the URL in POSTMAN but it gives me an error.
What is wrong with what i did and how can i fix it to get all the records within the date range i specify.
All help is appreciated.
Thank you
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2016 02:55 PM
Hi Thiraj,
I always recommend utilizing the REST API explorer combined with list queries.
When you build the query you are looking for in a list, you can right click it to copy the query.
Then paste that query into the API explorer GET query field,
and click a code sample (Python) to see the formatted end point: url = 'https://mscmobilitytest.service-now.com/api/now/table/incident?sysparm_query=opened_at%3E%3Djavascri...'
Finally, ensure you are sending the right basic auth credentials.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2016 02:55 PM
Hi Thiraj,
I always recommend utilizing the REST API explorer combined with list queries.
When you build the query you are looking for in a list, you can right click it to copy the query.
Then paste that query into the API explorer GET query field,
and click a code sample (Python) to see the formatted end point: url = 'https://mscmobilitytest.service-now.com/api/now/table/incident?sysparm_query=opened_at%3E%3Djavascri...'
Finally, ensure you are sending the right basic auth credentials.