SummitAI Reporting APIs
Use the following APIs to check the health of the API URL, to retrieve the data from the SummitAI Database, and build reports and dashboards using third-party reporting tools such as Grafana and Power BI. Following are the benefits of using the SummitAI APIs: The default Token-based API authentication is implemented for Web Services from the Sierra HF01 Release onwards. Administrators can generate an API Key based on the Analyst role template to execute the API Requests. Use the following API Request to ensure whether the APIKey is valid or not. HTTP Method GET Base URL https://<SummitAI Reporting API URL> Endpoint api Headers Key: "apikey " Value: "XXXXXXXXXXXXXXXXXXXXXXXXX" Sample GET URL https://<SummitAI Reporting API URL>/ api "VALID" Use the following API Request to ensure whether the API URL is correct or not. HTTP Method GET Base URL https://<SummitAI Reporting API URL> Endpoint /api/health Sample GET URL https://<SummitAI Reporting API URL>/api/health "Good" Note: No headers are required for this API. Use the following API Request (GET or POST) to get the data from the SummitAI Database. Note: HTTP Method GET Base URL https://<SummitAI Reporting API URL> Endpoint /api/getdata Sample GET URL https://<SummitAI Reporting API URL>/api/getdata?datasource=IM_RPT_DN_TicketMaster&PageSize=2 Query Parameter Description Notes datasource Name of the DN table. If you want to specify the RawSQL parameter, DataSource is not mandatory. For Example: IM_RPT_DN_TicketMaster PageSize Number of records that should be displayed per each page. Consider you specified the PageSize value as 100. Based on the PageNumber, the API Response displays 100 records. Parameter Name Type Description Notes DataSource * STRING Name of the DN table. If you want to specify the RawSQL parameter, DataSource is not mandatory. For Example: IM_RPT_DN_TicketMaster Columns STRING Specify the column names that are required to build the Reports. Use comma separation to specify multiple columns. For Example: Filters STRING Specify the condition to filter the data. Use comma separation to specify multiple filters inside the condition. For Example: PageNumber INTEGER Number of the page that you are looking into. For Example: If each page contains 10 records and there are 10 pages. Items from 1 to 10 are displayed when you specify the PageNumber value as 1. PageSize STRING Number of records that should be displayed per each page. For Example: Consider you specified the PageSize value as 100. Based on the PageNumber, the API Response displays 100 records. SortColumn STRING Specify the column with which you want to sort the data. SortOrder STRING Order in which the column gets sorted. The value is either ascending or descending. APIKey * STRING APIKey that is required to authenticate the user and execute the API request. APIKey must be specified in the Headers. You can specify the APIKey in Header or API Request. RawSQL * STRING SQL query to get the data. If you provide the RqwSQL parameter value, the DataSource, Columns, Filters, PageNumber, PageSize, SortColumn, SortOrder parameters values are not required to be specified. For Example: * Indicates mandatory fields Note: The Response contains the following sections: Use this API to retrieve the list of Data Source. Also, you can view the columns of the respective Data Source. To identify and retrieve the DN tables schema, call suing the below URLs: HTTP Method GET Base URL https://<SummitAI Reporting API URL> Endpoint /api/getdnschema Sample GET URL · https://<SummitAI Reporting API URL>/api/getdnschema?datasource=im_rpt_dn_ticketmaster · https://<SummitAI Reporting API URL>/api/getdnschema?search=ticket Parameter Name Type Description Notes DataSource STRING Specify the name of a specific DN table to get the list of columns that are available in the Data Source. For Example: IM_RPT_DN_TicketMaster Search STRING Specify keyword to get the filtered data in the Response. For Example: ticket or master. * Indicates mandatory fieldsSummitAI Reporting APIs
Benefits
API Key Authentication
To generate an API Key:
Validating APIKey
Response
Checking API URL Health
Response
Retrieving SummitAI Data
Request (GET)
Query Parameters
Request (POST)
{
"DataSource": "IM_RPT_DN_TicketMaster",
"Columns": "[Ticket No],[Status],[Registered Time]",
"Filters": "Status IN ('New','Assigned','In-Progress','Pending')",
"PageNumber": 1,
"PageSize": "5",
"SortColumn": "",
"SortOrder": "ASC",
"RawSQL": ""
}
{
"DataSource": "",
"Columns": "",
"Filters": "",
"PageNumber": 1,
"PageSize": "",
"SortColumn": "",
"SortOrder": "ASC",
"RawSQL": "SELECT Status,COUNT([Ticket ID]) as cnt,[Registered Time] as time FROM IM_RPT_DN_TicketMaster WITH (NOLOCK) WHERE Status IN ('New','Assigned','In-Progress','Pending') GROUP BY Status,[Registered Time]"
}
Request Parameters
[Ticket No],[Status],[Registered Time]
Status IN ('New','Assigned','In-Progress','Pending')
SELECT Status,COUNT([Ticket ID]) as cnt,[Registered Time] as time FROM IM_RPT_DN_TicketMaster WITH (NOLOCK) WHERE Status IN ('New','Assigned','In-Progress','Pending') GROUP BY Status,[Registered Time]Response
Retrieving SummitAI Data Source List
Request
https://<SummitAI Reporting API URL>/api/getdnschema?search=ticket
https://<SummitAI Reporting API URL>/api/getdnschema?datasource=im_rpt_dn_ticketmasterQuery Parameters
Response
Confluence Cloud Migration Alert: Please refer to known issues you may encounter in Confluence Cloud: https://eitdocs.atlassian.net/wiki/x/wDGwAQ