Incident API

Create an API Integration and obtain your apiKey to make requests listed below.

Get Request Status

Incident creation, deletion, and action requests are processed asynchronously to provide higher availability and scalability, therefore valid requests for those endpoints are responded with HTTP status 202 - Accepted. Get Request Status endpoint is used to track the status and incident details (if any) of the request whose identifier is given.

In-Line Parameters

Referred Name
Description

requestId

Universally unique identifier of the questioned request. Please note: that ID of the request was provided within response.

Sample Requests

curl -X GET 'https://api.opsgenie.com/v1/incidents/requests/513085b8-caf3-4f91-aa23-be5fdefc3570'
    -H 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889'

Sample Responses

{
    "data": {
        "success": true,
        "action": "Create",
        "processedAt": "2017-05-24T14:24:20.844Z",
        "integrationId": "c9cec2cb-e782-4ebb-bc1d-1b2fa703cf03",
        "isSuccess": true,
        "status": "Created incident",
        "incidentId": "8743a1b2-11da-480e-8493-744660987bef"
    },
    "took": 0.022,
    "requestId": "ec7e1d8e-1c75-442e-a271-731070a7fa4d"
}
{
    "data": {
        "success": false,
        "action": "Resolve",
        "processedAt": "2017-05-24T14:41:18.185Z",
        "integrationId": "c9cec2cb-e782-4ebb-bc1d-1b2fa703cf03",
        "isSuccess": false,
        "status": "Incident does not exist",
        "incidentId": ""
    },
    "took": 0.019,
    "requestId": "dc194ce3-9daf-4a19-bca3-40be91218089"
}

Create Incident

JSON Body Fields

Field
Mandatory
Description
Limit

message

true

Message of the incident

130 characters

description

false

Description field of the incident that is generally used to provide a detailed information about the incident.

15000 characters

responders

false

Teams/users that the incident is routed to via notifications. type field is mandatory for each item, where possible values are team, user.

50 teams/users

tags

false

Tags of the incident.

20 x 50 characters

details

false

Map of key-value pairs to use as custom properties of the incident.

8000 characters in total

priority

false

Priority level of the incident. Possible values are P1, P2, P3, P4 and P5. Default value is P3.

note

false

Additional note that is added while creating the incident.

25000 characters.

serviceId

true

Service on which incident will be created.

statusPageEntry

false

Status page entry fields: title is mandatory and detail is optional.
If this field is leaved blank, message and description of incident will be used for title and detail respectively.

notifyStakeholders

false

Indicate whether stakeholders are notified or not. Default value is false.

false/true

responders field example:

{
    "responders":[
        {
            "id":"4513b7ea-3b91-438f-b7e4-e3e54af9147c",
            "type":"team"
        },
        {
            "name":"NOC",
            "type":"team"
        },
        {
            "id":"bb4d9938-c3c2-455d-aaab-727aa701c0d8",
            "type":"user"
        }
    ]
}

stakeholderProperties field example:

{
  "message": "Houston, we have a problem!",
  "description": "We've had a main B bus undervolt."
}

Sample Request

curl -X POST https://api.opsgenie.com/v1/incidents/create
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
    "message": "An example incident message",
    "description":"Every incident needs a description",
    "responders":[
        {"id":"4513b7ea-3b91-438f-b7e4-e3e54af9147c", "type":"team"},
        {"name":"NOC", "type":"team"},
        {"id":"bb4d9938-c3c2-455d-aaab-727aa701c0d8", "type":"user"}
    ],
  	"tags": ["Outage","Critical"],
    "details":{
    	"key1": "value1",
      "key2": "value2"
    },
    "priority": "P1",
    "serviceId": "2e7d4c68-2ddd-11e8-b467-0ed5f89f718b",
    "statusPageEntry": {
    	"title": "Houston, we have a problem!",
    	"detail": "We've had a main B bus undervolt."
    },
    "notifyStakeholders": false
}'

Sample Response

Create incident requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.302,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Delete Incident

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Parameter
Mandatory
Description
Limit

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

Sample Request

 curl -X DELETE 'https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7?identifierType=id'
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889" 

Sample Response

Delete incident requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.204,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Get Incident

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Parameter
Mandatory
Description

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

Sample Requests

curl -X GET -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889" 'https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7?identifierType=id'
curl -X GET -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889" 'https://api.opsgenie.com/v1/incidents/1905?identifierType=tiny'

Sample Response

{
    "data": {
        "id": "70413a06-38d6-4c85-92b8-5ebc900d42e2",
        "tinyId": "1791",
        "message": "",
        "status": "closed",
        "isSeen": true,
        "tags": [
            "OverwriteQuietHours",
            "Critical"
        ],
        "createdAt": "2017-03-21T20:32:52.353Z",
        "updatedAt": "2017-04-03T20:32:57.301Z",
        "source": "Isengard",
        "owner": "morpheus@opsgenie.com",
        "priority": "P5",
        "responders": [
            {
                "type": "team",
                "id": "fc1448b7-46b2-401d-9df8-c02675958e3b"
            },
            {
                "type": "team",
                "id": "fe954a67-813e-4356-87dc-afed1eec6b66"
            }
        ],
				"associatedAlertCount": 8,
        "teamId" : "4513b7ea-3b91-438f-b7e4-e3e54af9147c",
        "details": {
            "serverName": "Zion",
            "region": "Oregon"
        }
    },
    "requestId": "9ae63dd7-ed00-4c81-86f0-c4ffd33142c9"
}

List Incidents

Field Name
Mandatory
Value Definition

query

true

Search query to apply while filtering the incidents. You can refer Incidents Search Query Help for further information about search queries.

offset

false

Start index of the result set (to apply pagination). Minimum value (and also default value) is 0.

limit

false

Maximum number of items to provide in the result. Must be a positive integer value. Default value is 20 and maximum value is 100.

sort

false

Name of the field that result set will be sorted by. Default value is createdAt. Possible values are specified below:

  • createdAt
  • tinyId
  • message
  • status
  • isSeen
  • owner

order

false

Sorting order of the result set. Possible values are desc and asc. Default value is desc.

  • desc: Sort result set in descending order
  • asc: Sort result set in ascending order

Sample Requests

curl -XGET -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889" 'https://api.opsgenie.com/v1/incidents?query=status%3Aopen&offset=7&limit=10&sort=createdAt&order=desc'

Sample Response

{
    "data": [
        {
            "id": "70413a06-38d6-4c85-92b8-5ebc900d42e2",
            "tinyId": "1791",
            "message": "Our servers are in danger",
            "status": "closed",
            "isSeen": true,
            "tags": [
                "OverwriteQuietHours",
                "Critical"
            ],
            "createdAt": "2017-03-21T20:32:52.353Z",
            "updatedAt": "2017-04-03T20:32:57.301Z",
            "owner": "morpheus@opsgenie.com",
            "priority": "P4",
        		"responders": [
            	{
                "type": "team",
                "id": "fc1448b7-46b2-401d-9df8-c02675958e3b"
            	},
            	{
                "type": "team",
                "id": "fe954a67-813e-4356-87dc-afed1eec6b66"
            	}
        		],
            "teamId":"4513b7ea-3b91-438f-b7e4-e3e54af9147c"

        },
        {
            "id": "70413a06-38d6-4c85-92b8-5ebc900d42e2",
            "tinyId": "1791",
            "message": "Sample Message",
            "status": "open",
            "isSeen": false,
            "tags": [
                "RandomTag"
            ],
            "createdAt": "2017-03-21T20:32:52.353Z",
            "updatedAt": "2017-04-03T20:32:57.301Z",
            "source": "Zion",
            "owner": "",
            "priority": "P5",
            "associatedAlertCount" : 0,
        		"responders": [
            	{
                "type": "team",
                "id": "fc1448b7-46b2-401d-9df8-c02675958e3b"
            	}
        		],
            "teamId":"4513b7ea-3b91-438f-b7e4-e3e54af9147c"

        }

    ],
    "paging":{
        "next":"https://api.opsgenie.com/v1/incidents?query=status%3Aopen&offset=20&limit=10&sort=createdAt&order=desc",
        "first":"https://api.opsgenie.com/v1/incidents?query=status%3Aopen&offset=0&limit=10&sort=createdAt&order=desc",
        "last":"https://api.opsgenie.com/v1/incidents?query=status%3Aopen&offset=100&limit=10&sort=createdAt&order=desc"
    },
    "took": 0.605,
    "requestId": "9ae63dd7-ed00-4c81-86f0-c4ffd33142c9"
}

Close Incident

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Parameter
Mandatory
Description

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

JSON Body Fields

Field
Mandatory
Description
limit

note

false

Additional incident note to add.

25000 characters

Sample Requests

 curl -X POST https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/close?identifierType=id
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -H "Content-Type: application/json"
    -d
'{
    "note":"Action executed via Incident API"
}'
 curl -X POST https://api.opsgenie.com/v1/incidents/1905/close?identifierType=tiny
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -H "Content-Type: application/json"
    -d
'{
    "note":"Action executed via Incident API"
}'

Sample Response

Close incident requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.107,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Add Note to Incident

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Parameter
Mandatory
Description

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

JSON Body Fields

Field
Mandatory
Description
limit

note

true

Incident note to add

25000 characters

Sample Requests

curl -X POST https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/notes?identifierType=id
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -H "Content-Type: application/json"
    -d
'{
    "note":"Action executed via Incident API"
}'
curl -X POST https://api.opsgenie.com/v1/incidents/1905/notes?identifierType=tiny
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -H "Content-Type: application/json"
    -d
'{
    "note":"Action executed via Incident API"
}'

Sample Response

Add note requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.213,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Add Responder to Incident

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Parameter
Mandatory
Description

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

JSON Body Fields

Field
Mandatory
Description
limit

responder

true

Teams and users that the incident will be routed.type field is mandatory for each item, where possible values are team and user.

note

false

Additional incident note to add.

25000 characters

incidentId

true

Incident on which responder will be added.

responder field examples:

{
  "incidentId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e12"
  "responder":[
        {
            "id":"4513b7ea-3b91-438f-b7e4-e3e54af9147c",
            "type":"team"
        }]
}

Sample Requests

 curl -X POST https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/responders?identifierType=id
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
		"incidentId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e12"
    "responder": {"id":"4513b7ea-3b91-438f-b7e4-e3e54af9147c","type":"team"},
    "note":"Action executed via Incident API"
}'

Sample Response

Add responder to incident requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.333,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Add Tags to Incident

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Parameter
Mandatory
Description

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

JSON Body Fields

tags

true

List of tags to add into incident. You can refer below for example values.

20 x 50 characters

note

false

Additional incident note to add.

25000 characters

tags field examples:

{
    "tags": ["OverwriteQuietHours","Critical"]
}

Sample Requests

 curl -X POST https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/tags?identifierType=id
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
    "tags": ["OverwriteQuietHours","Critical"],
    "note":"Action executed via Incident API"
}'
 curl -X POST https://api.opsgenie.com/v1/incidents/1905/tags?identifierType=tiny
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
    "tags": ["OverwriteQuietHours","Critical"],
    "note":"Action executed via Incident API"
}'

Sample Response

Add tags to incident requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.206,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Remove Tags from Incident

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Parameter
Mandatory
Description
Limit

tags

true

Comma separated list of tags to remove from incident.

20 x 50 characters

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

note

false

Additional incident note to add.

25000 characters

Sample Requests

curl -X DELETE -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889" 'https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/tags?identifierType=id&tags=OverwriteQuietHours,Critical'
curl -X DELETE -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889" 'https://api.opsgenie.com/v1/incidents/1905/tags?identifierType=tiny&tags=OverwriteQuietHours,Critical'

Sample Response

Remove tags from incident requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.195,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Add Details(Custom Properties) to Incident

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Parameter
Mandatory
Description

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id**.

JSON Body Fields

Field
Mandatory
Description
limit

details

true

Key-value pairs to add as custom property into incident. You can refer below for example values.

20 x 50 characters

note

false

Additional incident note to add.

25000 characters

details field examples:

{
    "details": {
        "serverName": "Zion",
        "region": "Oregon"
    }
}

Sample Requests

 curl -X POST https://api.opsgenie.com/v1/incident/8418d193-2dab-4490-b331-8c02cdd196b7/details?identifierType=id
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
    "details": {
        "serverName": "Zion",
        "region": "Oregon"
    },
    "note":"Action executed via Incident API"
}'
 curl -X POST  https://api.opsgenie.com/v1/incident/1905/details?identifierType=tiny
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
    "details": {
        "serverName": "Zion",
        "region": "Oregon"
    },
    "note":"Action executed via Incident API"
}'

Sample Response

Add details to incident requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.303,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Remove Details(Custom Properties) from Incident

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Parameter
Mandatory
Description
Limit

keys

true

Comma separated list of keys to remove from the custom properties of the incident.

10 keys

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tinyId. Default value is id.

note

false

Additional incident note to add.

25000 characters

Sample Requests

curl -X DELETE -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889" 'https://api.opsgenie.com/v1/incident/8418d193-2dab-4490-b331-8c02cdd196b7/details?identifierType=id&keys=serverName,region'
curl -X DELETE -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889" 'https://api.opsgenie.com/v1/incident/1905/details?identifierType=tiny&keys=serverName,region'

Sample Response

Remove details from incident requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.202,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Update Incident Priority

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Field Name
Mandatory
Value Definition

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

JSON Body Fields

Field
Mandotary
Description

priority

true

Priority of the incident. Possible values are P1, P2, P3, P4 and P5

Sample Requests

 curl -X PUT  https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/priority
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
    "priority":"P4"
}'
 curl -X PUT  https://api.opsgenie.com/v1/incidents/1207/priority?identifierType=tiny
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
    "priority":"P2"
}'

Sample Response

Update incident priority requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.195,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Update Incident Message

In-Line Parameters

Referred Name
Description

identifier

identifier of the incident

Query Parameters

Field Name
Mandatory
Value Definition

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

JSON Body Fields

Field
Mandatory
Description

message

true

Message of the incident.

Sample Requests

 curl -X PUT  https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/message
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
    "message":"new message"
}'

Sample Response

Update incident message requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.195,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

Update Incident Description

In-Line Parameters

Referred Name
Description

identifier

identifier of the incident

Query Parameters

Field Name
Mandatory
Value Definition

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny . Default value is id.

JSON Body Fields

Field
Mandatory
Description

description

false

Description of the incident.

Sample Requests

 curl -X PUT  https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/description
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
    "description":"new description"
}'
 curl -X PUT  https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/description
    -H "Content-Type: application/json"
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
    -d
'{
    "description":""
}'

Sample Response

Update incident description requests are processed asynchronously, therefore valid requests are responded with HTTP status 202 - Accepted.

{
    "result": "Request will be processed",
    "took": 0.195,
    "requestId": "43a29c5c-3dbf-4fa4-9c26-f4f71023e120"
}

List Incident Logs

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Field Name
Mandatory
Value Definition

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

offset

false

Starting value of the offset property.

direction

false

Page direction to apply for the given offset. Possible values are next and prev. Default value is next.

  • next: Offset values of provided logs should be greater than the given offset
  • prev: Offset values of provided logs should be less than the given offset

limit

false

Maximum number of items to provide in the result. Must be a positive integer value. Default value is 20 and maximum value is 100.

order

false

Sorting order of the result set. Possible values are desc and asc. Default value is desc.

  • desc: Sort result set in descending order
  • asc: Sort result set in ascending order

Sample Requests

curl -X GET 'https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/logs?identifierType=id&offset=1492000072838_1492000072838234593&direction=prev&limit=2&order=desc'
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889" 
curl -X GET 'https://api.opsgenie.com/v1/incidents/1905/logs?identifierType=tiny&offset=1492000072838_1492000072838234593&direction=prev&limit=2&order=desc'
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"

Sample Response

{
    "data": [
    {
      "log": "Incident resolved via web",
      "type": "system",
      "owner": "neo@opsgenie.com",
      "createdAt": "2017-04-12T12:27:52.838Z",
      "offset": "1492000072838_1492000072838234593"
    },
    {
      "log": "Viewed on [web]",
      "type": "incidentRecipient",
      "owner": "trinity@opsgenie.com",
      "createdAt": "2017-04-12T12:27:46.379Z",
      "offset": "1492000066378_1492000066379000127"
    }
    ],
    "requestId": "174abe1b-e2a8-48d6-a747-05f012760988",
    "took": 0.456,
    "paging": {
        "next": "https://api.opsgenie.com/v1/incidents/ee624ed0-3ee0-45be-9c9d-e7667eaf21e5/logs?identifierType=id&offset=1492000072838_1492000072838234593&direction=next&limit=2&order=desc",
        "first": "https://api.opsgenie.com/v1/incidents/ee624ed0-3ee0-45be-9c9d-e7667eaf21e5/logs?identifierType=id&limit=2&order=desc"
    }
}

List Incident Notes

In-Line Parameters

Referred Name
Description

identifier

Identifier of the incident

Query Parameters

Field Name
Mandatory
Value Definition

identifierType

false

Type of the identifier that is provided as an in-line parameter. Possible values are id and tiny. Default value is id.

offset

false

Starting value of the offset property.

direction

false

Page direction to apply for the given offset. Possible values are next and prev. Default value is next.

  • next: Offset values of provided notes should be greater than the given offset
  • prev: Offset values of provided notes should be less than the given offset

limit

false

Maximum number of items to provide in the result. Must be a positive integer value. Default value is 20 and maximum value is 100.

order

false

Sorting order of the result set. Possible values are desc and asc. Default value is desc.

  • desc: Sort result set in descending order
  • asc: Sort result set in ascending order

Sample Requests

curl -X GET 'https://api.opsgenie.com/v1/incidents/8418d193-2dab-4490-b331-8c02cdd196b7/notes?identifierType=id&offset=1492004181874000155&direction=prev&limit=2&order=desc'
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"
curl -X GET 'https://api.opsgenie.com/v1/incidents/1905/notes?identifierType=tiny&offset=1492004181874000155&direction=prev&limit=2&order=desc'
    -H "Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889"

Sample Response

{
    "data": [
        {
            "note": "This is your last chance. After this, there is no turning back. You take the blue pill—the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill—you stay in Wonderland and I show you how deep the rabbit-hole goes.",
            "owner": "morpheus@opsgenie.com",
            "createdAt": "2017-04-12T13:36:21.874Z",
            "offset": "1492004181874000155"
        },
        {
            "note": "You see there is only one constant. One universal. It is the only real truth: Causality. Action, reaction. Cause and effect.",
            "owner": "merovingian@opsgenie.com",
            "createdAt": "2017-04-12T13:36:18.098Z",
            "offset": "1492004178098000065"
        }
    ],
    "requestId": "fbbd807d-6024-4572-8d51-bd4a047617d0",
    "took": 0.278,
    "paging": {
        "next": "https://api.opsgenie.com/v1/incidents/ee624ed0-3ee0-45be-9c9d-e7667eaf21e5/notes?identifierType=id&offset=1492004181874000155&direction=next&limit=2&order=desc",
        "first": "https://api.opsgenie.com/v1/incidents/ee624ed0-3ee0-45be-9c9d-e7667eaf21e5/notes?identifierType=id&limit=2&order=desc"
    }
}

Incident API