Site
On this page
- GET /site/
- Parameters
- Responses
- POST /site/
- Request body
- Responses
- GET /site/arming/info/{id}
- Parameters
- Responses
- GET /site/arming/infoByName
- Parameters
- Responses
- PUT /site/arming?siteId={siteId}&action={action}
- Parameters
- Responses
- PUT /site/arming?siteName={siteName}&action={action}
- Parameters
- Responses
- POST /site/filter
- Request body
- Responses
- GET /site/id/{id}/app
- Parameters
- Responses
- PUT /site/isolate?siteId={siteId}&enable={enable}
- Parameters
- Responses
- PUT /site/isolate?siteName={siteName}&enable={enable}
- Parameters
- Responses
- GET /site/isolation/infoByName
- Parameters
- Responses
- POST /site/listByCustomerIds
- Request body
- Responses
- GET /site/presetPTZ
- Parameters
- Responses
- POST /site/search
- Request body
- Responses
- GET /site/{id}
- Parameters
- Responses
- PUT /site/{id}
- Parameters
- Request body
- Responses
- DELETE /site/{id}
- Parameters
- Responses
- GET /site/{id}/devices
- Parameters
- Responses
- GET /site/{id}/users
- Parameters
- Responses
Operations on site resources. 19 endpoints, each relative to https://api.nxgen.cloud/api/v1 and authenticated as described under Authentication.
GET /site/
get Site by name
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
siteName | query | string | yes | SiteName. |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden |
POST /site/
Create new Site
Request body
Add a Site
{
"payload": {
"id": "string",
"name": "string (required)",
"email": "string",
"isActive": "boolean",
"houseBuildingNumber": "string",
"streetName": "string",
"city": "string",
"state": "string",
"country": "string",
"code": "string",
"logo": "string",
"business": [
"object"
],
"tags": [
"object"
],
"photos": [
"object"
],
"followers": [
"object"
],
"latitude": "string",
"longitude": "string",
"plusCode": "string",
"what3Words": "string",
"jsonSchema": "object",
"countryCode": "string",
"contactEmail": "string",
"parentAccountId": "string",
"customerId": "string",
"serviceProviderId": "string",
"parent": "string"
}
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden |
GET /site/arming/info/{id}
Get Site arm detail by siteId
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden |
Example 200 response:
{
"siteArmState": "partiallyArmed",
"devices": [
{
"name": "Embedded Net DVR",
"id": "4e5147ac173b42c3bd98b986eb9a06dc",
"armState": "disarmed"
},
{
"name": "Embedded Net DVR",
"id": "dc7adfd8e57c49b4a7709f8f7da06804",
"armState": "armed"
},
{
"name": "Embedded Net DVR",
"id": "c7e5012d9b7d4d3c928d98652510f976",
"armState": "armed"
}
]
}GET /site/arming/infoByName
Get site arming details by site name
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
siteName | query | string | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
PUT /site/arming?siteId={siteId}&action={action}
Update arm/disarm by siteID
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
siteId | query | string | yes | |
action | query | boolean | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
Example 200 response:
{
"data": [
{
"name": "Embedded Net DVR",
"result": {
"errorCode": 0,
"message": "OK"
}
},
{
"name": "Embedded Net DVR",
"result": {
"errorCode": 0,
"message": "OK"
}
},
{
"name": "Embedded Net DVR",
"result": {
"errorCode": 0,
"message": "OK"
}
}
]
}PUT /site/arming?siteName={siteName}&action={action}
Update arm/disarm by siteName
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
siteName | query | string | yes | |
action | query | boolean | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
POST /site/filter
Gets site list with filtering, sorting and pagination. It allows hierarchical level searching. It can be filtered using specified hierarchy or it uses the logged in user hierarchy. This gives the option to get additional entity fields in the response. Also provides configuration meta data about entity.
Request body
Site filtering and sorting
{
"filters": [
{
"columnName": "string (required)",
"type": "distinctList | date | number | StringConditionFilter (required)",
"filter": "object (required)"
}
],
"sortOrder": [
{
"columnName": "string",
"isAscending": "boolean"
}
],
"primaryColumns": [
"string"
],
"hierarchyLevel": "string",
"hierarchyId": "string",
"nPerPage": "number",
"pageNumber": "number",
"isConfigDetailRequired": "boolean",
"getConfig": "boolean",
"getChildOrParent": "boolean"
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
204 | No Content | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden |
Example 200 response:
{
"config": {
"columns": [
{
"visibility": true,
"columnName": "commercialName",
"DisplayName": "Site",
"isFilterable": true,
"filterType": "stringCondition",
"sticky": true,
"isRightBorder": true,
"isMandatory": true,
"isNotDraggable": true
}
],
"defaultNPerPage": 50,
"defaultFilterCondition": [],
"defaultSortingOrder": [
{
"columnName": "dateTime",
"isAscending": false
}
],
"maxVisibleColumnCount": 6,
"exportLimitNPerPage": 500
},
"dataResult": [
{
"name": "Site test",
"dateTime": 1655213317621,
"uniqueId": "c772ac8dd22f4a9a8849c332afe3f188",
"parentAccountId": "d76dfac772ac8dcb7db87a6c772ac8d",
"country": "",
"streetName": "",
"state": "",
"isActive": "true",
"customerName": "Customer TEST"
},
{
"name": "Site test 2",
"dateTime": 1648447044408,
"uniqueId": "a9dc0ac94dfd4297b8241cb7db87a65e",
"parentAccountId": "d76dfac772ac8dcb7db87a6c772ac8d",
"country": "",
"streetName": "",
"state": "",
"isActive": "true",
"customerName": "Customer TEST"
}
],
"totalRecordsCount": 3552,
"filteredBy": [],
"sortedBy": [
{
"columnName": "dateTime",
"isAscending": false
}
],
"dispatchedAll": false,
"isDefaultProjectionMutated": false,
"isDefaultFilterMutated": false,
"isDefaultSortingMutated": false
}GET /site/id/{id}/app
Get site info by site id for app
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
Example 200 response:
{
"data": {
"id": "rtyt67457474dfa6c3567567cd94b7aa3ee",
"name": "Test",
"address": {
"location": {
"latitude": "",
"longitude": "",
"plusCode": " ",
"what3Words": " "
},
"contact": {
"countryCode": "",
"phoneNumber": ""
},
"houseBuildingNumber": "",
"streetName": "",
"city": "",
"state": "",
"code": "",
"country": ""
},
"deviceCount": 1,
"totalSensor": 9,
"cameraCount": 9,
"alarmCountInLast24hr": 15,
"alarmCountbetween24to48hr": 18,
"IOCount": 0,
"otherSensorCount": 0
},
"isSuccess": true
}PUT /site/isolate?siteId={siteId}&enable={enable}
Get list of user under site
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
siteId | query | string | yes | |
enable | query | boolean | yes | |
isolateStartTime | query | number | no | |
duration | query | number | no |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
PUT /site/isolate?siteName={siteName}&enable={enable}
Update isolation by site
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
siteName | query | string | yes | |
enable | query | boolean | yes | |
isolateStartTime | query | number | no | |
duration | query | number | no |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
GET /site/isolation/infoByName
Get site arming details by site name
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
siteName | query | string | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
POST /site/listByCustomerIds
Get sites by customer id list
Request body
Get sites
{
"customerIds": [
"string"
]
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
204 | No Content | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden |
Example 200 response:
{
"data": [
{
"key": "7f01237864567eba89736f825",
"label": "site name",
"customerName": "customer name"
}
]
}GET /site/presetPTZ
PTZ / Preset based on Site Name
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
siteName | query | string | yes | |
action | query | "R" | "R_STOP" | "L" | "L_STOP" | "U" | "U_STOP" | "D" | "D_STOP" | "Z+" | "Z+_STOP" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | yes | Select any value from 1 to 10 for preset, all others for PTZ |
commandType | query | "ptz" | "preset" | yes | |
webSocketPort | query | string | no | required for heitel device type |
momentSpeed | query | string | no | PTZ speed |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
POST /site/search
Search sites for app
Request body
Search sites
{
"payload": {
"skip": "number (required)",
"limit": "number (required)",
"siteName": "string"
}
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
401 | Unauthorized |
Example 200 response:
{
"data": [
{
"siteName": "Site A",
"siteId": "l8c90c0f62c64d16751acc5ea13082y",
"deviceCount": 0,
"alarmCount": 0
},
{
"siteName": "Site B",
"siteId": "u8b51c17cb474c2a6757273d193303cb",
"deviceCount": 1,
"alarmCount": 0
}
],
"isSuccess": true
}GET /site/{id}
Get by site id
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
PUT /site/{id}
Update an existing Site
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body
{
"payload": {
"id": "string",
"uniqueId": "string",
"name": "string (required)",
"profile": {
"logo": "string",
"business": [
"object"
],
"photos": [
"object"
],
"tags": [
"object"
],
"followers": [
"object"
],
"s3ImagePath": "string"
},
"address": {
"houseBuildingNumber": "string",
"streetName": "string",
"city": "string",
"state": "string",
"code": "string",
"country": "string",
"location": {
"latitude": "string",
"longitude": "string",
"plusCode": "string",
"what3Words": "string"
},
"contact": {
"countryCode": "string",
"phoneNumber": "string"
}
},
"email": "string",
"parentAccountId": "string",
"isActive": "boolean",
"jsonSchema": "object",
"parentEventProviderId": "string",
"masterEventProviderId": "string",
"serviceProviderId": "string",
"customerId": "string",
"groupParent": "string",
"description": "string",
"syncStatus": "boolean"
}
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden |
DELETE /site/{id}
Delete a Site by Id
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden |
GET /site/{id}/devices
Get list of devices under site
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
GET /site/{id}/users
Get list of user under site
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
204 | No Content | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
Thank you — your feedback goes to the team that owns this page.