- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 03-12-2021 09:16 AM
The Reporting API is used to retrieve the details of the reports using Get HTTP Method.
URL Format:
|
Default URL |
/api/now/reporting |
|
Version URL |
/api/now/v1/reporting |
Parameters:
|
Parameter |
Description |
|
sysparm_contains |
Title of the reports |
|
sysparm_sortby |
Specify the column value to order by/sort by |
|
sysparm_sortdir |
Specify the sort direction, ascending or descending. |
|
sysparm_page |
Specify page number starting from 1. Example if you have 12 reports details in the results/response and sysparm_per_page starts with 1, In the response you will get first report details, to get other report details, you need to specify the sysparm_per_page – 2,3,4 etc. |
|
sysparm_per_page |
Specify number to get results per page. |
- API Name to be chosen in REST API Explorer - Reporting API
- Request and Response Headers accepts application/json, application/xml, text/xml.
- Output in shown in below steps, using REST API Explorer
- Provide the Report name in sysparm_contains, the name which contains similar text in reports.
Below, I have chosen Name – ‘open incidents by’. I have 12 report names which contains this name.
- To sort reports based on type, we need to give column name in sysparm_sortby
- To sort the direction, either ascending or descending, we need to specify the value in sysparm_sortdir.
Response:
- To specify, how many reports for each response can be displayed per page, we need to provide value in Sysparm_per_page.
- In the above screenshot, we have given sysparm_per_page – 1, it means now we have 12 pages, each page for each report. Now we need to specify the page number to get result of the report, example below screenshot, we have given number 5, which means we have got response for 5th report I.e., 5th page.
6. To cross verify, if all the parameters we have given whether provided us the exact results, below I have applied all of those sorting and search in report table and the fifth report, I have is exactly same which I have got in the above response.
Note: In the response, along with report details, we do also have hasNextPage, hasPreviousPage, total count which means:
- hasNextPage – if there is a next page based on your current response, it will give true/ false value.
- hasPreviousPage – if there is a previous page based on your current reponse, it will give you true/false value
- Total Count – gives the overall count of reports, in the above case it is 12.
If you find this article helpful, please do mark helpful and do bookmark it.
Regards,
Harika
- 15,810 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hai
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
BR,
Harika
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks,
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
hey @Huberto could you find a solution to export reporting data from service now by using api call.
