Note: This page has not yet been converted to the new developer portal format. Please use Swagger to test this API.
Assets
GET /assets/{organizationId}
Description
Retrieve all assets for an organization.
Return type
[assets] [collection]
Parameters
Name | Type | Optional? | Description |
---|---|---|---|
organizationId | url | n | The ID of the organization containing the assets. |
pageNumber | query | y | The page number of the assets to return. |
Response
{
"message": "OK"
"firstPageUri":
"https://://api-qa1.everbridge.net/rest/assets/888409690210694/?pageNumber=1"
"nextPageUri":
"https://://api-qa1.everbridge.net/rest/assets/888409690210694/?pageNumber=2"
"lastPageUri":
"https://://api-qa1.everbridge.net/rest/assets/888409690210694/?pageNumber=0"
"page": {
"pageSize": 1000
"data": [
{
"id":"xxxx",
"externalId":"xxxx",
"name":"xxxx",
"iconId":"xxxx",
"address":{
"street":"xxxx"
"suite":"xxxx"
"city":"xxxx"
"state":"xxxx"
"postalCode":"xxxx"
"country":"xxxx"
"countryFullName":"xxxx"
"floorNo":"xxxx"
"roomNo":"xxxx"
"geoLocation":"xxxx"
}
]
"start": 0
"totalCount": 1
"totalPageCount": 1
"currentPageNo": 1
}
}
skipValidation
POST /assets/{organizationId}
Description
Create a new asset to an organization.
Input type
asset
Return type
[update]
Parameters
Name | Type | Optional? | Description |
---|---|---|---|
organizationId | long | n | The ID of the organization containing the assets. |
autoGeoCoding | boolean | y | 1 Default value is false. 2 /assets/{orgId}?autoGeoCoding=true |
Request Body
The JSON object describing the new asset.
Name | Type | Optional? | Description |
---|---|---|---|
externalId | string | n | The external ID of the asset. |
name | string | n | Asset name |
iconId | String | n (The default value is “1”) | The value from 1 to 12: 1 Office 2 Airport 3 Hospital 4 Police/Sheriff Station 5 Fire Station 6 Power Plant 7 Your location of interest (generic) 8 Bank 9 Data Center 10 Manufacturing Plant 11 Prison/Jail 12 Retail Store/Restaurant |
address | object | n | |
address.country | string | n | |
address.street | string | n | |
address.geoLocation | object | n | The latitude and longitude of the asset. NOTE: If the geoLocation is incomplete and autoGeocoding is false or autoGeocoding is true but geo coding failed, the latitude and longitude will be 0.0. |
address.suite | string | y | |
address.city | string | y | |
address.postalCode | string | y | |
address.floorNo | string | y | |
address.roomNo | string | y |
Asset JSON Object
{
"externalId": "Office",
"name": "Galaxy SOHO",
"iconId": "2",
"address": {
"street": "Galaxy SOHO B20511",
"suite": "",
"city": "",
"state": "",
"postalCode": "",
"country": "CN",
"floorNo": " ",
"roomNo": "",
"geoLocation": {
"lon": "116",
"lat": "40"
}
}
}
Response Body
HTTP Status | Response Body |
---|---|
200 OK | { "message": "OK", "id": 470595271655442, "baseUri": "https://://api-qa1.everbridge.net/rest/assets/241901148045320/", "instanceUri": "https://://api-qa1.everbridge.net/rest/241901148045320/470595271655442" } |
400 Bad Request | ◊ Duplicate External ID { "status": 400, "message": "Duplicate externalId, use PUT method to updated existing record." } ◊ Missing Required Fields { "status": 400, "message": "Missing required field externalId." } ◊ Validation Failed { "status": 400, "message": "Invalid field iconId, the value must be between 1 and 12." } { "status": 400, "message": "Invalid field country." } |
401 Unauthorized | ◊ Incorrect User ID or Password { "status": 401, "message": "Invalid credentials: Get User failed" } ◊ Require REST API Access { "status": 401, "message": "User does not have API permissions for this method" } ◊ Missing Feature { "status": 401, "message": "User does not have API permissions for this method" } |
GET /assets/{organizationId}/{id}
Description
Retrieve the specified asset within an organization.
Return type
[asset] [instance]
Parameters
Name | Type | Optional? | Description |
---|---|---|---|
organizationId | long | n | The ID of the organization containing the asset. |
id | long | n | The asset’s ID or externalId. |
idType | string | y | default value: id allowable values: id, externalId e.g., /assets/{orgId}/{id}?idType=externalId |
Response
{
"message": "OK",
"result": {
"id": 470595271655464,
"externalId":
"update-test-organizationid-1",
"name": "Office Update-1",
"iconId": "2",
"address": {
"street": "北京市东城区东四十条甲22号",
"country": "China",
"geoLocation": {
"lon": 116.430917,
"lat": 39.932805
}
}
}
}
PUT /assets/{organizationId}/{id}
Description
Update the specified asset within an organization.
Input type
asset
Return type
[update]
Parameters
Name | Type | Optional? | Description |
---|---|---|---|
organizationId | long | n | The ID of the organization containing the assets. |
id | long | n | The asset ID. |
autoGeocoding | boolean | y | 1 Default value is false. 2 /assets/{orgId}?autoGeoCoding=true |
Request Body
The JSON object describing the new asset.
Name | Type | Optional? | Description |
---|---|---|---|
externalId | string | n | The external ID of the asset. |
name | string | n | Asset name |
iconId | String | n (The default value is “1”) | The value from 1 to 12: 1 Office 2 Airport 3 Hospital 4 Police/Sheriff Station 5 Fire Station 6 Power Plant 7 Your location of interest (generic) 8 Bank 9 Data Center 10 Manufacturing Plant 11 Prison/Jail 12 Retail Store/Restaurant |
address | object | n | |
address.country | string | n | |
address.street | string | n | |
address.geoLocation | object | n | The latitude and longitude of the asset. NOTE: If the geoLocation is incomplete and autoGeocoding is false or autoGeocoding is true but geo coding failed, the latitude and longitude will be 0.0. |
address.suite | string | y | |
address.city | string | y | |
address.postalCode | string | y | |
address.floorNo | string | y | |
address.roomNo | string | y |
Asset JSON Object
{
"externalId": "Office",
"name": "Galaxy SOHO",
"iconId": "2",
"address": {
"street": "Galaxy SOHO B20511",
"suite": "",
"city": "",
"state": "",
"postalCode": "",
"country": "CN",
"floorNo": " ",
"roomNo": "",
"geoLocation": {
"lon": "116",
"lat": "40"
}
}
}
Response Body
HTTP Status | Response Body |
---|---|
200 OK | { "message": "OK", "id": 470595271655464, "baseUri": "https://://localhost:9080//assets/241901148045320/", "instanceUri": "https://://localhost:9080//assets/241901148045320/470595271655464" } |
400 Bad Request | ◊ Duplicate External ID { "status": 400, "message": "Duplicated externalId. Keep the current externalId or use a new externalId." } |
401 Unauthorized | ◊ REST API Access { "status": 401, "message": "User does not have API permissions for this method" } ◊ User has no access to the organization { "status": 401, "message": "Org 241901148045319 not accessible to this user, or does not exist." } |
404 Not Found | { "status": 404, "message": "Can not find the asset with ID 470595271655464 within the organization 241901148045319." } |
DELETE /assets/{organizationId}/{id}
Description
Delete the specified asset within an organization.
Return type
[update]
Parameters
Name | Type | Optional? | Description |
---|---|---|---|
organizationId | long | n | The ID of the organization containing the assets. |
id | long | n | The asset ID. |
forceDelete | boolean | y | Whether to unlink and forcibly delete the asset. |
Response Body
HTTP Status | Response Body |
---|---|
200 OK | { "message": "OK", "id": 470595271655474, "baseUri": "https://://api-qa1.everbridge.net/rest/assets/241901148045320/", "instanceUri": "https://://api-qa1.everbridge.net/rest/assets/241901148045320/470595271655474" } |
400 Bad Request | ◊ The parameter ‘forceDelete’ is false and some contacts linked to the asset. { "status": 400, "message": "failed to delete asset which referred by contact." } ◊ The parameter forceDelete’ is false and some expected locations linked to the asset. { "status": 400, "message": "failed to delete asset which referred by expected location." } |
401 Unauthorized | ◊ Incorrect User ID or Password { "error": "Authentication failed. Incorrect User ID or Password." } ◊ No REST API Access or Missing Feature { "error": "Authentication failed. User does not have REST API Access to this method." } |
404 Not Found | { "status": 404, "message": "Can not find the asset with ID 470595271655474 within the organization 241901148045319." } |
POST /assets/{organizationId}/batch
Description
Create batch of assets for an organization.
Input type
asset array
Return type
batch
Parameters
Name | Type | Optional? | Description |
---|---|---|---|
organizationId | long | n | The ID of the organization containing the assets. |
autoGeoCoding | boolean | y | 1 Default value is false. 2 /assets/{orgId}?autoGeoCoding=True |
Response Body
Array of building objects.
NOTE: Field iconId’s default value is “1”, so you do not need to set it in the JSON object unless iconID is another value (2-12).
Post Batch Request Body
Response Body
NOTE:
Data in the Batch | Assets Batch API | Contact Batch API |
---|---|---|
All Succeed | HTTP Status Code: 200 Internal Code: 200 | HTTP Status Code: 200 Internal Code: 100 |
Partially Succeed | HTTP Status Code: 400 Internal Code: 400 | HTTP Status Code: 200 Internal Code: 200 |
All Failed | HTTP Status Code: 400 Internal Code: 400 | HTTP Status Code: 200 Internal Code: 300 |
HTTP Status | Response Body |
---|---|
200 OK | All assets in the batch succeed: { "message": "All assets are created.", "code": 200 } |
400 Bad Request | The parameter ‘forceDelete’ is false and some contacts linked to the asset. { "message": "The assets creation is partially or all failed.", "code": 400, "data": [ "ExternalId RA-batch-23: Duplicated ExternalId, use PUT method to updated existing record.", "ExternalId RA-batch-24: Duplicated ExternalId, use PUT method to updated existing record." ] } |
401 Unauthorized | ◊ Incorrect User ID or Password { "status": 401, "message": "Invalid credentials: Get User failed" } ◊ Require REST API Access { "status": 401, "message": "User does not have API permissions for this method" } Missing Feature { "status": 401, "message": "User does not have API permissions for this method" } |