Getting 200 status but not getting Data in response?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2022 11:41 PM
Hi Team,
I Have one scheduled job through which I am calling Rest outbound message in every 10 minute,
In schedule job there is one post method in which I am giving time range (From date and to date) in body.
I am using current date time in "from date" and subtracting 10 minute in current time and passing it in "To date"
like below code
By this code I am getting 200 status but not getting data.
and If I am giving static date value in from and to so I am getting data in response
Where I am doing Mistake please can someone help me here ...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022 01:25 AM
Hello,
could you provide the logging output from your "from" and "to" variables, please? My guess is, that your date function (var event = new Date(...)) does not track time. I would assume that currently your "to" and "from" values are the same. Might be wrong though. Log would help a lot here.
Regards
Fabian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022 01:43 AM
I would advice you to use ServiceNow supported GlideDate class instead of new Date().
Please find below reference document.
https://developer.servicenow.com/dev.do#!/reference/api/rome/server/no-namespace/c_GlideDateScopedAPI?navFilter=glidedate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2024 09:22 AM
Could you please let me know whether it is a OOB scheduled job or Newly created scheduled job. If it is OOB scheduled job could you please let me know the scheduled job name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 06:33 AM
The question on its face boils down to "http 200" received - implies no problems with authentication.
If no data is being returned, it could be that the Service Account handling the REST call doesn't have permissions to access the table data being requested. Check the Groups and Roles of that account to be sure.