Note: This page has not yet been converted to the new developer portal format. Please use Swagger to test this API.
Incident Scenarios
You can manage your Incident Scenarios library by means of the REST API.
Incident Scenario Data Model
{
"id": 175926155411458,
"name": "test1",
"templateIds": [
884011643711334,
884011643711335
]
}
incident_scenario_with_exercise_mode.js
{
"scenarioId": 241896853078031,
"incidentAction": "Launch",
"templateIds": [
241896853080647
],
"incidentNotificationPropertyBag": {
"enableExerciseMode": true
},
"name": "exercise mode test",
"incidentName": "incident11"
}
GET /incidentScenarios/{organizationID}
Description:
Returns a paged set of incidentScenarios for an organization. The response object will include all incidentScenarios in an organization.
Return type:
IncidentScenarios
Parameters:
Name | Type | Optional? | Description |
---|---|---|---|
organizationId | url | n | The ID of the organization.containing these incidentScenarios. |
sortby | query | y | Whether to sort data by id, name, or lastModifiedDate. allowable values=”id, name, lastMlodifiedDate”. Default is id. |
direction | query | y | Whether to sort data as ASC or DESC, allowableValues=”ASC, DESC”. Default is ASC. |
pageNumber | query | y | The page number of incidentScenarios to return. Default is 1. |
pageSize | query | y | The page size of inicdenetScenarios to return. Default is 10. |
Response:
IncidentScenarios list with paging:
Name | Type | Optional? | Description |
---|---|---|---|
message | string | n | OK means success |
firstPageUri | string | y | The link of the first page |
nextPageUri | string | y | The link of the next page |
lastPageUri | sting | y | The link of the last page |
page | DataPage | y | Move to the Structure of “page” in response. |
The structure of “page” in Response:
Name | Type | Optional? | Description |
---|---|---|---|
pageSize | int | n | The size of the current page |
start | int | n | The start index of data |
data | int | y | Move to the Structure of “data” in “page” |
totalCount | int | n | The total size of all data |
currentPageNo | int | n | The number of the current page |
totalPageCount | List | n | The total count of pages |
The structure of “data” in “page”:
Name | Type | Optional? | Description |
---|---|---|---|
scenarioId | long | n | The ID of the specific scenario |
name | string | n | The name of the specific scenario |
templateIds | List | n | The IDs of the template, which related to the specific scenario |
templates | List | n | The template info (just include ID, name, and status; the value of the status is Active, Draft, or Invalid) which is related to the specific scenario. NOTE: This is a new parameter as of 2019-11-08. |
formVariables | List | y | The variables related to the specific scenario, will filter out the variables of the Draft and Invalid templates. |
Response Sample:
{
"message": "OK",
"firstPageUri": "https://api-qa1.everbridge.net/api/incidentScenarios/888409690210694/?pageNumber=1",
"lastPageUri": "https://api-qa1.everbridge.net/api/incidentScenarios/888409690210694/?pageNumber=1",
"page": {
"pageSize": 10,
"start": 0,
"data": [
{
"id": 175926155411458,
"name": "test1",
"templateIds": [
884011643711334,
884011643711335
]
},
{
"id": 175926155411457,
"name": "test2",
"templateIds": [
884011643711334,
884011643711335
]
}
],
"totalCount": 2,
"currentPageNo": 1,
"totalPageCount": 1
}
}
GET /incidentScenarios/{organizationId}/{queryType}
Description:
Return a specific incidentScenario record for the Organization by queryType.
Return type:
IncidentScenarios
Parameters:
Name | Type | Optional? | Description |
---|---|---|---|
organizationId | url | n | The ID of the organization.containing this incidentScenarios |
scenarioId | url | n | The ID of the scenario. |
queryType | query | y | The validate value for this parameter is scenarioId or customScenarioId. If the value of queryType coming from the client is 'customScenarioId', then the value of {scenarioId} is treated as customScenarioId to do the query. If the value of queryType coming from the client is not provided or is not 'customScenarioId', then the value of {scenarioId} is treated as scenarioId. This logic is used to make sure forward-backward compatibility. The following are some exampled of the request URLs. Use the customScenarioId to do the query: " https://://api.everbridge.com/rest/incidentScenarios/8800387990014/1233?queryType=customScenarioId". Use the scenarioId to do the query: " https://://api.everbridge.com/rest/incidentScenarios/8800387990014/175926155411458?queryType=scenarioId ". Use the scenarioId to do the query: " https://://api.everbridge.com/rest/incidentScenarios/8800387990014/175926155411458" . |
phase | query | y | The phase of the scenario to return. The validate value for this parameter is New, Update, Close. The default value is New. |
Response:
IncidentScenario with unique variables list
{
"message": "OK",
"result": {
"id": 175926155411458,
"name": "test1",
"templateIds": [
884011643711334,
884011643711335
],
"formVariables": [
{
"variableId": "12765",
"variableName": "textbox",
"val": [
"t1",
"t2",
"t3"
]
},
{
"variableId": "12767",
"variableName": "multiple selection",
"val": [
"m1",
"m2",
"m3"
]
}
]
}
}
POST /incidentScenarios/{organizationId}
Description:
Launch a new incidentScenario.
Return type:
[update]
Parameters:
Name | Type | Optional? | Description |
---|---|---|---|
organizationId | url | n | The ID of the organization.in which to create this incidentScenario. |
incidentScenario | body | n | The JSON representation of the new incidentScenario. |
Request Body:
{
"incidentAction": "Update/Close/UpdateThenClose/CloseWithNotification/CloseWithoutNotification",
"incidentName": "scenario1",
"scenarioId": 175926155411457,
"customScenario": 123,
"templateIds": [
444206992588808,
444206992588809
],
"formVariables": [
{
"variableId": "444206992588802",
"variableName": "textbox",
"val": [
"t1"
]
},
{
"variableId": "444206992588803",
"variableName": "multiple selection",
"val": [
"m1",
"m2",
"m3"
]
}
]
}
Response:
{
"message": "OK",
"id": 175926155411502,
"baseUri": "https://api.everbridge.net/api/incidentScenarios/448605039099942/",
"instanceUri": "https://api.everbridge.net/api/incidents/448605039099942/175926155411501"
}
PUT /incidentScenarios/{organizationId}/{incidentId}
Description:
Update a launched IncidentScenario.
Parameters:
Name | Type | Optional? | Description |
---|---|---|---|
organizationId | url | n | The ID of the organization.in which to create this incidentScenario. |
incidentId | url | n | The incident ID of the updated scenario. |
incidentScenario | body | n | The JSON representation of the updated incidentScenario. |
Request Body:
{
"incidentAction": "Update/Close/UpdateThenClose/CloseWithNotification/CloseWithoutNotification",
"incidentName": "scenario1",
"scenarioId": 175926155411457,
"customScenario": 123,
"templateIds": [
444206992588808,
444206992588809
],
"formVariables": [
{
"variableId": "444206992588802",
"variableName": "textbox",
"val": [
"t1"
]
},
{
"variableId": "444206992588803",
"variableName": "multiple selection",
"val": [
"m1",
"m2",
"m3"
]
}
]
}
Response:
{
"message": "OK",
"id": 175926155411502,
"baseUri": "https://api.everbridge.net/api/incidentScenarios/448605039099942/",
"instanceUri": "https://api.everbridge.net/api/incidents/448605039099942/175926155411501"
}