SummitAI Reporting APIs 2

Read Complete Release Notes

Feature released in SummitAI Platform

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.

Benefits

Following are the benefits of using the SummitAI APIs:

  • SummitAI APIs allow the data transfer more easily from the SummitAI Database to the third-party tools such as Grafana or Power BI.

API Key Authentication

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. 

To generate an API Key:

  1. Log into the SummitAI application.
  2. Select Admin > Basic > Users > User List. The USER LIST page is displayed.
  3. Click ADD NEW on the ACTIONS panel. The NEW USER page is displayed.
  4. Select the Domain and specify the User Name.
  5. On the General tab, specify all the required details.
  6. On the Access tab, select the Login Type as API Key.
  7. The API Key of the selected Domain is picked up by the Application by default.
  8. Specify the API Key Expiry.
  9. Select the Role Template from the list.
  10. Click SUBMIT. 

Validating APIKey

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

Response

"VALID"

Checking API URL Health

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

Response

"Good"

Note:

No headers are required for this API.

Retrieving SummitAI Data

Use the following API Request (GET or POST) to get the data from the SummitAI Database.

Note:

  • Use the POST method to execute the API Request with more parameters.
  • Use the GET method to execute the API Request with limited query parameters.

Request (GET)

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 Parameters

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.

Request (POST)

Sample 1
{
    "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": ""
}
Sample 2
{
    "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

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:
[Ticket No],[Status],[Registered Time]

Filters

STRING

Specify the condition to filter the data.

Use comma separation to specify multiple filters inside the condition.

For Example:
Status IN ('New','Assigned','In-Progress','Pending')

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:


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]

* Indicates mandatory fields

Response

Json
{
    "pagination": {
        "page_size": 5,
        "prev_offset": -1,
        "current_offset": 0,
        "next_offset": 5,
        "prev_page": -1,
        "current_page": 1,
        "next_page": 2,
        "total_pages": 178,
        "total_items": 886,
        "prev_page_url": null,
        "current_page_url": null,
        "next_page_url": null
    },
    "results": [
        {
            "Ticket No": 719450,
            "Status": "Pending",
            "Registered Time": "2017-09-24T09:30:37"
        },
        {
            "Ticket No": 719492,
            "Status": "Assigned",
            "Registered Time": "2017-09-24T16:16:46.977"
        },
        {
            "Ticket No": 719508,
            "Status": "Pending",
            "Registered Time": "2017-09-26T04:23:11.813"
        },
        {
            "Ticket No": 719510,
            "Status": "Pending",
            "Registered Time": "2017-09-26T04:16:49.967"
        },
        {
            "Ticket No": 719512,
            "Status": "Pending",
            "Registered Time": "2017-09-26T04:16:19.79"
        }
    ],
    "Status": {
        "message": "",
        "status": "success",
        "isValid": true
    }
}

Note:

The Response contains the following sections:

  • Pagination: This response array fetches the Number of pages that contain the records.
  • Results: This response array contains the response data of the request.
  • Status: Status displays the error messages and status messages.

Retrieving SummitAI Data Source List

Use this API to retrieve the list of Data Source. Also, you can view the columns of the respective Data Source.

Request

To identify and retrieve the DN tables schema, call suing the below URLs:

  • To retrieve the data by searching with the keyword, call the below URL:
    https://<SummitAI Reporting API URL>/api/getdnschema?search=ticket
  • To retrieve the data using datasource, call the below URL:
    https://<SummitAI Reporting API URL>/api/getdnschema?datasource=im_rpt_dn_ticketmaster

 

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

Query Parameters

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 fields

Response

Sample 1
[
    {
        "text": "Ticket ID",
        "value": "Ticket ID"
    },
    {
        "text": "Encripted Ticket ID",
        "value": "Encripted Ticket ID"
    },
    {
        "text": "Ticket No",
        "value": "Ticket No"
    },
    {
        "text": "Sup Function",
        "value": "Sup Function"
    },
    {
        "text": "Registered Time",
        "value": "Registered Time"
    },
    {
        "text": "Status",
        "value": "Status"
    },
    {
        "text": "Medium",
        "value": "Medium"
    },
    {
        "text": "Logged By User ID",
        "value": "Logged By User ID"
    },
    {
        "text": "Caller User Id",
        "value": "Caller User Id"
    },
    {
        "text": "Classification ID",
        "value": "Classification ID"
    },
    {
        "text": "Category ID",
        "value": "Category ID"
    },
    {
        "text": "Description",
        "value": "Description"
    },
    {
        "text": "Assigned Engineer Userid",
        "value": "Assigned Engineer Userid"
    },
    {
        "text": "Response Deadline",
        "value": "Response Deadline"
    },
    {
        "text": "Response Time",
        "value": "Response Time"
    },
    {
        "text": "Response SLA Met",
        "value": "Response SLA Met"
    },
    {
        "text": "Response SLA Reason",
        "value": "Response SLA Reason"
    },
    {
        "text": "Resolution Deadline",
        "value": "Resolution Deadline"
    },
    {
        "text": "Resolution Time",
        "value": "Resolution Time"
    },
    {
        "text": "Resolution SLA Met",
        "value": "Resolution SLA Met"
    },
    {
        "text": "Resolution SLA Reason",
        "value": "Resolution SLA Reason"
    },
    {
        "text": "Pticket Solution",
        "value": "Pticket Solution"
    },
    {
        "text": "Pticket Status",
        "value": "Pticket Status"
    },
    {
        "text": "Information",
        "value": "Information"
    },
    {
        "text": "Solution",
        "value": "Solution"
    },
    {
        "text": "Total pending Duration SLA Minutes",
        "value": "Total pending Duration SLA Minutes"
    },
    {
        "text": "Total Pending Duration",
        "value": "Total Pending Duration"
    },
    {
        "text": "Last User Communication",
        "value": "Last User Communication"
    },
    {
        "text": "Private Log",
        "value": "Private Log"
    },
    {
        "text": "Resolution SLA Met With Pending",
        "value": "Resolution SLA Met With Pending"
    }
]
Sample 2
[
    {
        "text": "AVM_RPT_DN_Entity_Ticket_Details",
        "value": "AVM_RPT_DN_Entity_Ticket_Details"
    },
    {
        "text": "IM_RPT_DN_Monthly_Ticket_Flow_Summary",
        "value": "IM_RPT_DN_Monthly_Ticket_Flow_Summary"
    },
    {
        "text": "IM_RPT_DN_Ticket_Feedback",
        "value": "IM_RPT_DN_Ticket_Feedback"
    },
    {
        "text": "IM_RPT_DN_Ticket_Feedback_Details",
        "value": "IM_RPT_DN_Ticket_Feedback_Details"
    },
    {
        "text": "IM_RPT_DN_Ticket_Reminders",
        "value": "IM_RPT_DN_Ticket_Reminders"
    },
    {
        "text": "IM_RPT_DN_TicketBacklogDetail",
        "value": "IM_RPT_DN_TicketBacklogDetail"
    },
    {
        "text": "IM_RPT_DN_TicketDateFormats",
        "value": "IM_RPT_DN_TicketDateFormats"
    },
    {
        "text": "IM_RPT_DN_TicketMaster",
        "value": "IM_RPT_DN_TicketMaster"
    },
    {
        "text": "IM_RPT_DN_Ticketmaster_Effort_vw",
        "value": "IM_RPT_DN_Ticketmaster_Effort_vw"
    },
    {
        "text": "IM_RPT_DN_TicketMaster_Vw",
        "value": "IM_RPT_DN_TicketMaster_Vw"
    },
    {
        "text": "IM_RPT_DN_Tickets_Relation",
        "value": "IM_RPT_DN_Tickets_Relation"
    },
    {
        "text": "IM_RPT_DN_Tickets_Relation_Summary",
        "value": "IM_RPT_DN_Tickets_Relation_Summary"
    },
    {
        "text": "IM_RPT_DN_WorkgroupTransferTickets",
        "value": "IM_RPT_DN_WorkgroupTransferTickets"
    },
    {
        "text": "SR_RPT_DN_Monthly_Ticket_Flow_Summary",
        "value": "SR_RPT_DN_Monthly_Ticket_Flow_Summary"
    },
    {
        "text": "SR_RPT_DN_ServiceTicketMaster",
        "value": "SR_RPT_DN_ServiceTicketMaster"
    },
    {
        "text": "SR_RPT_DN_ServiceticketMaster_Vw",
        "value": "SR_RPT_DN_ServiceticketMaster_Vw"
    },
    {
        "text": "SR_RPT_DN_Ticket_Feedback",
        "value": "SR_RPT_DN_Ticket_Feedback"
    },
    {
        "text": "SR_RPT_DN_Ticket_Feedback_Details",
        "value": "SR_RPT_DN_Ticket_Feedback_Details"
    },
    {
        "text": "SR_RPT_DN_TicketBacklogDetail_Vw",
        "value": "SR_RPT_DN_TicketBacklogDetail_Vw"
    }
]