lhs-panel Click here to expand

Export Incident using Ticket

A) Trigger Incident Export

The API allows you to trigger an incident export based on the ticket.

Request URL

POST http://hostname:8400/RestAPI/v1/ticket/incident/export

Request Header

Header name Value Mandatory Description
Authorization Bearer {{AuthToken}} Yes AuthToken generated from the API Settings page.

e.g., Bearer abcd1234xyz

Request Parameters

The request body must be sent in JSON format and include the following key/value parameters:

Parameter Name Mandatory Type Description
ticket_id Yes String ID of the ticket whose incident needs to be exported.

Response

The response will be a JSON object with the following key/value pairs:

Parameter name Description
export_id ID of the triggered export request
message Result of the update incident request.

Example Usage using cURL

Sample request

Copy to Clipboard

curl --location 'http://localhost:8400/RestAPI/v1/ticket/incident/export' \ --header 'Content-Type: application/json' \

--header 'Authorization: Bearer abcd1234xyz' \

--data '{

"ticket_id": "33630"

}'

Sample response:

Copy to Clipboard

{"export_id":2,"message":"Incident Export triggered successfully in EventLog Analyzer"}

Example usage using Postman (Third-party tool)

Get Product Details

B) Get Incident Export Status

The API allows you to fetch the status of the triggered incident export.

Request URL

GET http://hostname:8400/RestAPI/v1/incident/export/status

Request Header

Header name Value Mandatory Description
Authorization Bearer {{AuthToken}} Yes AuthToken generated from the API Settings page.

e.g., Bearer abcd1234xyz

Request Parameters

Parameter Name Mandatory Type Description
export_id Yes Long ID of the triggered incident export.

Response

The response will be a JSON object with the following key/value pair:

Parameter name Description
message Status of the triggered incident export.

Example Usage using cURL

Sample request

Copy to Clipboard

curl --location 'http://localhost:8400/RestAPI/v1/incident/export/status?export_id=1' \

--header 'Authorization: Bearer abcd1234xyz'

Sample response:

Copy to Clipboard

{"message":"Export Completed"}

Example usage using Postman (Third-party tool)

Get Incident Export Status

C) Download Incident Export as PDF

The API allows you to download the triggered export.

Request URL

POST http://hostname:8400/RestAPI/v1/incident/export/download

Request Header

Header name Value Mandatory Description
Authorization Bearer {{AuthToken}} Yes AuthToken generated from the API Settings page.

e.g., Bearer abcd1234xyz

Request Parameters

Parameter Name Mandatory Type Description
export_id Yes Long ID of the triggered incident export.

Response

The triggered incident export will be saved as a PDF file.

Example Usage using cURL

Sample request

Copy to Clipboard

curl --location 'http://localhost:8400/RestAPI/v1/incident/export/download' --header 'Content-Type: application/json' --header 'Authorization: Bearer abcd1234xyz' --data '{

"export_id": "1"

}' --output export.pdf

Note: The exported PDF will be saved in the same directory from where the command is executed.

Sample response:

Check the location where the curl command is executed. The incident will be exported as a PDF named export.pdf

Example usage using Postman (Third-party tool)

Download Incident Export as PDF

Copyright © 2020, ZOHO Corp. All Rights Reserved.

Get download link