- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2016 10:54 AM
Hi, I'm using the Table API to get data from /table/definition_instance, it's working fine but the field "business duration" has no values in any row.
If I check the data in the Service Now application I can see the values.
Any idea? can I check anything else?
Thanks,
Guillermo
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 10:38 AM
Yes, now it makes sense that we've been dealing with two separate tables and the Business Duration field in the Metrics table was never populated.
Would you mark replies as Answer / Helpful as appropriate. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2016 01:05 PM
Can you try running
https://instance.service-now.com/api/now/v1/table/task?sysparm_query=business_duration>1970-01-01&sy...
on your instance? You can just put it in the URL bar in the browser and it should return the first 10 records with non-zero business_duration in both raw and display values in JSON. You may change "task" to the table you're using. Please note that "business_duration" has an underscore.
Hope this helps.
Please feel free to connect, follow, mark helpful / answer, like, endorse.
John Chun, PhD PMP ![]() | ![]() |
Winner of November 2016 Members' Choice Award
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 05:59 AM
Hi, thanks for your answer.
When I add the "sysparm_query=business_duration>1970-01-01" paramater to the metric_instance query I have the no record found response
{
"error": {
"detail": "Records matching query not found. Check query parameter or offset parameter",
"message": "No Record found"
},
"status": "failure"
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 06:21 AM
That may be because you don't have any values in the business_duration field. Did you mean to use the duration field instead?
Can you try running
https://instance.service-now.com/api/now/v1/table/metric_instance?sysparm_query=duration>1970-01-01&...
UPDATE: corrected "task" to "metric_instance" in the link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 06:46 AM
In the ServiceNow UI I can see the values of business_duration y some row of metric_instance, but when I use the API to get the data, the values are empty.
I retrieve rows asking for "duration" but not for "business_duration", in the ServiceNow UI I can see values in both fields.