Download OpenAPI specification:
This document provides information on how to access the withthegrid application programmatically.
Programmatic access to the application requires a machine account. Almost everything a user can do in the user interface of the application, can also be done with a machine account. To obtain one, contact us at info@withthegrid.com. Our programmatic interface is a REST JSON API that is accessible through HTTPS. Select in the top bar whether you want to see the documentation for cURL or the Javascript fetch API.
There are two types of environments in our application: monitoring environments and connectivity environments.
In monitoring environments, you store geospatial and other static information on infrastructural assets. You can create condition reports on the condition of these assets, resulting in measurement time series. Reports on asset can be manually created or by connecting an (IoT) device. The condition of the assets is monitored based on the condition reports and issues are automatically created when anomalies are detected.
In connectivity environments, developers of devices and external systems can:
To interact with the API you can make HTTP requests to the routes in the left-hand menu. Most of these need authentication. Obtain a JSON webtoken from the Login route. The following rights exist for the monitoring environments:
| Right | Description |
|---|---|
| READ | View (except audit trail) |
| STATIC | Modify static data |
| ISSUES | Manage issues |
| AUDIT_TRAIL | View audit trail |
| USERS | Manage users |
| EXPORT | Export data |
| SENSORS | Manage devices |
| REPORTS | Manage condition reports |
| THRESHOLDS | View measurement issue triggers |
| ENVIRONMENT_ADMIN | Update configuration of the environment |
For the connectivity environments there is only one right: ENVIRONMENT_ADMIN.
All requests need a header specifying the version of the api that is being used by the client for example:
Api-Version: 4
As the route documentation will show, the request body and its response are almost always JSON encoded (with corresponding Content-Type: application/json header).
Some objects in requests or responses are used multiple times. Those are extracted as models and listed separately under the schemas section.
Almost all objects are identified by their hashId. This is an alphanumeric string uniquely identifying that object within its own object type. So the same hashId can occur for a Command and a PinGroup, but they identify different objects.
In some object types, users can store custom data. The fields that can be used to store data in these objects are defined in a field configuration. The UI renders this field configuration as a form.
The following objects support these form fields:
| Object with field | Configured in |
|---|---|
| edges | monitoring environment under fieldConfigurations.edges for fields |
| grids | monitoring environment under fieldConfigurations.grids for fields |
| pin groups | monitoring environment under fieldConfigurations.pinGroups for fields and device type under pinGroupFieldConfigurations for deviceFields. |
| nodes | monitoring environment under fieldConfigurations.nodes for fields |
| pin | monitoring environment under fieldConfigurations.pins for fields and device type under channels[].pinFieldConfigurations for deviceFields. |
| reports | manual report type and device report type for fields |
| commands | command type for fields |
| devices | device type for fields |
The name of an edge, grid, pin group, node and pin objects is defined as the value of the first field in the field configuration. At least one key is therefore required in these fields properties.
| User defined code | Location of the code editor in the ui where commented templates can be found |
|---|---|
| form field | Everywhere where form fields can be defined. For example in the "Monitoring environment" settings, under "Form fields". Click on a property and press "Show advanced options". The 5 UDFs can be viewed using the code editor at the bottom. |
| device supplier certificate identifier | In the "Connectivity environment" under "Device authentication", "Client certificate access". Click on a certificate and press "Edit the identifier" to reach the code editor. |
| device supplier webhook identifier | In the "Connectivity environment" under "Device authentication", "Webhook access". Click on a webhook and press "Edit the identifier" to reach the code editor. |
| device type eventHandler | In the "Connectivity environment" under "Device types". Click on a device type and press "Edit the event handler" to reach the code editor. |
| device condition report parser | In the "Connectivity environment" under "Report types". Click on a report type and press "Edit the parser" to reach the code editor. |
Acquire a JSON web token that can be used to perform authenticated requests. The jwt expiration is typically 30 days.
| Api-Version required | integer Example: 5 |
| assertion required | string Is provided when you create a machine account (also called an API account) |
{- "assertion": "12as:7d6a4123"
}{- "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpcCI6InJvYkB3aXRodGhlZ3JpZC5jb20iLCJpA9qiOjE1Nzc3MTA5NjksImV4cCI6MTU4MDMwMjk2OSwiaXNzIjoid2l0aHRoZWdyaWQifQ.7PbwwsWU7x63Pd-J_KZQL22r185GfiufixyXQGOyQs8",
- "user": {
- "hashId": "b45zo0",
- "email": "info@acme.com",
- "name": "John Doe",
- "timezone": "Europe/Amsterdam",
- "locale": "en",
- "phone": "string",
- "company": "string",
- "rights": [
- "STATIC",
- "USERS"
], - "twoFactorAuthenticationEnabled": true,
- "lastFeatureUpdateSeen": 32767,
- "federatedAuthentication": false
}, - "environment": {
- "hashId": "f1a4w1",
- "name": "My monitoring environment",
- "mapLayers": [
- {
- "name": "My map layer",
- "key": "myLayer",
- "style": {
- "layers": [
- {
- "id": "pdok-layer",
- "type": "raster",
- "source": "pdok-source",
- "paint": { }
}
], - "sources": {
- "pdok-source": {
- "type": "raster",
- "bounds": [
- 3.1706551165717776,
- 50.5788239246427,
- 7.4887369433036834,
- 53.637607600687694
]
}
}
}, - "namedStyle": "pdok-bodemkaart"
}
], - "boundingBox": {
- "type": "LineString",
- "coordinates": [
- [
- 3.3135576,
- 47.9747658
], - [
- 5.1288442202798,
- 51.8145997
]
]
}, - "fieldConfigurations": {
- "pinGroups": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "edges": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "grids": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pins": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "locale": "en",
- "defaultGraphRange": "30d",
- "allowAutoCloseThresholdIssues": false,
- "issueAutoClosingTriggerAmount": 1,
- "issueAutoClosingTriggerUnitType": "count",
- "measurementsExpirationDays": 365,
- "measurementsRetentionPolicyRange": "string",
- "enforceTwoFactorAuthentication": false,
- "allowAutoCloseConnectivityIssues": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "defaultLandingPage": "map",
- "defaultLandingPageHashId": "string",
- "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "environmentRights": [
- "STATIC",
- "USERS"
], - "userEnvironmentSettings": {
- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt",
- "defaultLandingPage": "map",
- "lastAccessedAt": "2019-12-31T15:23Z",
- "settings": {
- "map": {
- "filters": {
- "groupHashIds": [
- "naud51"
], - "info": false,
- "critical": false,
- "serious": true,
- "ok": false,
- "connectivity": false,
- "hasMeasurements": false,
- "installedDevice": true
}, - "hiddenLayerKeys": [
- "myLayer"
], - "pinGroupsAsDotsAtLowZoomLevels": false,
- "opacity": 0.5
}
}, - "autosaveSettings": {
- "map": {
- "filters": true,
- "hiddenLayerKeys": true,
- "pinGroupsAsDotsAtLowZoomLevels": true,
- "opacity": true
}
}
}
}Add a command that should be sent to a specific device
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: SENSORS
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| objectType required | string Enum: "device" "pinGroup" |
| objectHashIds required | Array of strings [ 1 .. 40 ] items |
| commandTypeHashId required | string |
| fields required | object How form fields should be sent to the server when creating them. |
| startAt | string or null <date-time> Timestamp the device should execute the command. The system tries to share the command with the device before that time. If null, the device should execute it at time of receival + command.delay. It depends on the commandType whether startAt can be null |
| delay | number <float> In seconds. Only relevant when startAt is null. The command should then be executed by the device at time of receival + delay |
| endAt | string or null <date-time> Timestamp the device should stop execution of the command. |
| channelIndices | Array of numbers <float> <= 60 items [ items <float > ] Default: [] The device channels for which this command is relevant. See commandType.channelSelect for allowed values. |
| email required | Array of strings <email> [ items <email > ] An email will be sent to all provided email addresses when the command is executed by the device |
{- "objectType": "device",
- "objectHashIds": [
- "j1iha9"
], - "commandTypeHashId": "x18a92",
- "fields": {
- "interval": 86400
}, - "startAt": "2019-12-31T15:23Z",
- "delay": 0.1,
- "endAt": null,
- "channelIndices": [ ],
- "email": [ ]
}Delete multiple commands. Will return an array showing which commands were deleted or not.
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: SENSORS
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| hashIds required | Array of strings <= 30 items |
{- "hashIds": [
- "ga9741s"
]
}[- {
- "hashId": "ga9741s",
- "deleted": true
}
]Search through commands
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: READ
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/command/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "command": {
- "hashId": "ga9741s",
- "deviceHashId": "j1iha9",
- "commandTypeHashId": "x18a92",
- "fields": { },
- "pinGroupHashId": "dao97",
- "userHashId": "b45zo0",
- "periodHashId": "l74mzwwe",
- "startAt": "2019-12-31T15:23Z",
- "delay": 0,
- "endAt": null,
- "channelIndices": [
- 0,
- 2
], - "email": [
- "info@acme.com"
], - "createdAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-12-31T15:23Z"
}, - "commandType": {
- "hashId": "x18a92",
- "name": "untranslated string",
- "start": "required",
- "end": "disabled",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channelSelect": "off",
- "environmentAccess": "none"
}, - "pinGroup": {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}
}
]
}Delete a command. Will raise an error if the command cannot be canceled because the device has already executed it or because the device will not be reached in time to let it know that it should ignore the command.
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: SENSORS
| hashId required | string Example: ga9741s |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/command/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific command identified by its hashId
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: READ
| hashId required | string Example: ga9741s |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/command/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "command": {
- "hashId": "ga9741s",
- "deviceHashId": "j1iha9",
- "commandTypeHashId": "x18a92",
- "fields": { },
- "pinGroupHashId": "dao97",
- "userHashId": "b45zo0",
- "periodHashId": "l74mzwwe",
- "startAt": "2019-12-31T15:23Z",
- "delay": 0,
- "endAt": null,
- "channelIndices": [
- 0,
- 2
], - "email": [
- "info@acme.com"
], - "createdAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-12-31T15:23Z"
}, - "commandType": {
- "hashId": "x18a92",
- "name": "untranslated string",
- "start": "required",
- "end": "disabled",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channelSelect": "off",
- "environmentAccess": "none"
}, - "createdByUserName": "John Doe"
}Create a command type that can be sent to devices
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
required | untranslatedString (string) or translations (object) (stringOrTranslations) |
| start | string Default: "optional" Enum: "required" "optional" "disabled" 'required': user must provide command.startAt. 'optional': user can provide command.startAt or a delay for the command to start after it is sent to the device. 'disabled': user cannot provide command.startAt nor a delay. |
| end | string Default: "disabled" Enum: "required" "optional" "disabled" 'required': user must provide command.endAt. 'optional': user can provide command.endAt. 'disabled': user cannot provide command.endAt. |
required | Array of objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects <= 50 items See the chapter on open fields on how to use this |
| channelSelect | string Default: "off" Enum: "single" "multiple" "off" When creating a command of this type, the user can then optionally choose one (in case of 'single') or more channelIndices (in case of 'multiple') for which this command is relevant. If 'off' is chosen, the user cannot specify channelIndices |
| environmentAccess | string Default: "full" Enum: "full" "read" "none" 'full': end-users can view, create and delete commands of this type. 'read': end-users can view but not create and delete commands of this type. 'none': end-users cannot view, create or delete commands of this type. |
{- "name": "untranslated string",
- "start": "required",
- "end": "required",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channelSelect": "single",
- "environmentAccess": "full"
}{- "hashId": "x18a92"
}Search through command types
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: READ
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/command-type/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "commandType": {
- "hashId": "x18a92",
- "name": "untranslated string",
- "start": "required",
- "end": "disabled",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channelSelect": "off",
- "environmentAccess": "none"
}
}
]
}Delete a command type.
Rights
| hashId required | string Example: x18a92 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/command-type/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific command type identified by its hashId
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: READ
| hashId required | string Example: x18a92 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/command-type/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "commandType": {
- "hashId": "x18a92",
- "name": "untranslated string",
- "start": "required",
- "end": "disabled",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channelSelect": "off",
- "environmentAccess": "none"
}
}Update a command type.
Rights
| hashId required | string Example: x18a92 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
untranslatedString (string) or translations (object) (stringOrTranslations) | |
| start | string Enum: "required" "optional" "disabled" 'required': user must provide command.startAt. 'optional': user can provide command.startAt or a delay for the command to start after it is sent to the device. 'disabled': user cannot provide command.startAt nor a delay. |
| end | string Enum: "required" "optional" "disabled" 'required': user must provide command.endAt. 'optional': user can provide command.endAt. 'disabled': user cannot provide command.endAt. |
Array of objects (updatableFieldConfigurations) <= 50 items See the chapter on open fields on how to use this | |
| channelSelect | string Enum: "single" "multiple" "off" When creating a command of this type, the user can then optionally choose one (in case of 'single') or more channelIndices (in case of 'multiple') for which this command is relevant. If 'off' is chosen, the user cannot specify channelIndices |
| environmentAccess | string Default: "full" Enum: "full" "read" "none" 'full': end-users can view, create and delete commands of this type. 'read': end-users can view but not create and delete commands of this type. 'none': end-users cannot view, create or delete commands of this type. |
{- "name": "untranslated string",
- "start": "required",
- "end": "required",
- "fieldConfigurations": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "channelSelect": "single",
- "environmentAccess": "full"
}Creates or updates a connectivity threshold.
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
object or null |
{- "connectivityThreshold": {
- "missedReports": "12",
- "offlineForSeconds": "1800",
- "priorityLevel": null
}
}Returns all found connectivity thresholds for an environment.
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/connectivity-threshold/find \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "connectivityThreshold": {
- "priorityLevel": "1",
- "missedReports": "12",
- "offlineForSeconds": "1800"
}
}
]
}Add a new pre-shared key (PSK) device.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| supplierDeviceIdentifier required | string Should be unique within the connectivity environment |
| deviceTypeHashId required | string |
| psk required | string <= 512 characters |
| pskIdentity required | string <= 255 characters |
{- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "psk": "cuXodopvJGoiKpuOcZ6pw/3euyP+yld5",
- "pskIdentity": "=d37d7&&dhdkf2"
}{- "hashId": "j1iha9"
}Search through devices
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: READ
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/device/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "device": {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "environmentHashId": "f1a4w1",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "deviceType": null,
- "environmentName": "My monitoring environment",
- "environmentHashId": "f1a4w1",
- "pinGroup": {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}
}
]
}Add one or more devices to this monitoring environment by providing their claim tokens. This invalidates the claim token
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| claimTokens required | Array of strings [ 1 .. 30 ] items |
{- "claimTokens": [
- "aklasjkl13a23"
]
}{- "devices": [
- {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "environmentHashId": "f1a4w1",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}
]
}Delete one or more devices. If a device is claimed by a monitoring environment, it cannot be deleted.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| hashIds required | Array of strings [ 1 .. 30 ] items |
{- "hashIds": [
- "aklasjkl13a23"
]
}Get a specific device identified by its hashId
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: READ
| hashId required | string Example: j1iha9 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/device/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "device": {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "environmentHashId": "f1a4w1",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "deviceType": null,
- "environmentName": "My monitoring environment",
- "environmentHashId": "f1a4w1",
- "pinGroup": {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}
}Update a device.
Rights
| hashId required | string Example: j1iha9 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
required | object or (Array of objects or objects) (fieldsToServerUpdate) How form fields should be sent to the server when updating them. |
{- "fields": { }
}{- "device": {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "environmentHashId": "f1a4w1",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}
}Get claim tokens for one or more devices. These claim tokens can be used in a monitoring environment to claim these devices. This request invalidates older claim tokens for these devices. Suppliers cannot acquire a claim token for devices that have already been claimed by a monitoring environment. Users in a monitoring environment cannot acquire a claim token for devices that are linked to a pin group.
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: SENSORS
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| deviceHashIds required | Array of strings [ 1 .. 30 ] items |
{- "deviceHashIds": [
- "j1iha9"
]
}{- "claimTokens": [
- {
- "deviceHashId": "j1iha9",
- "claimToken": "aklasjkl13a23"
}
]
}Gets the device connectivity counters values and their key names
Rights
| hashId required | string Example: dao97 |
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/device/device/{hashId}/connectivity-counters \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
[- {
- "startAt": "2019-12-01T00:00Z",
- "endAt": "2020-01-01T00:00Z",
- "counters": {
- "property1": 0,
- "property2": 0
}
}
]Connect a device to a pin group (and its channels to the pin group's pins. Future condition reports from this device will also be available on this pin group. A claim token for this device will be invalidated
Rights
| hashId required | string Example: j1iha9 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| pinGroupHashId required | string |
required | Array of objects <= 60 items |
{- "pinGroupHashId": "dao97",
- "channelMapping": [
- {
- "channel": 0,
- "pinHashId": "e13d57",
- "deviceFields": { }
}
]
}{- "device": {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "environmentHashId": "f1a4w1",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "deviceType": null,
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z"
}Remove one or more devices from this monitoring environment. Only use this if you want to return the device to the supplier
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| hashIds required | Array of strings [ 1 .. 30 ] items |
{- "hashIds": [
- "aklasjkl13a23"
]
}Disconnect a device from a pin group. Future condition reports from this device will no longer be registered on the pin group it was connected to.
Rights
| deviceHashId required | string Example: j1iha9 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X POST https://api.withthegrid.com/device/{deviceHashId}/unlink \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' \
Add a counter to the connectivity environment that can be used to count device connectivity events.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name required | string |
{- "name": "My counter"
}{- "hashId": "l74xg825"
}Search through device connectivity counter keys.
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/device-connectivity-counter-key/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "deviceConnectivityCounterKey": {
- "hashId": "l74xg825",
- "name": "My counter"
}
}
]
}Delete a device connectivity counter key from a connectivity environment.
Rights
| hashId required | string Example: l74xg825 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/device-connectivity-counter-key/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific device connectivity counter key by its hashId
Rights
| hashId required | string Example: l74xg825 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/device-connectivity-counter-key/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "hashId": "l74xg825",
- "name": "My counter"
}Update the properties of a device connectivity counter key.
Rights
| hashId required | string Example: l74xg825 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name | string |
{- "name": "My counter"
}Add a new device type.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
required | untranslatedString (string) or translations (object) (stringOrTranslations) |
| eventHandler required | string <= 1000000 characters A javascript function that handles events. See the chapter "User defined code |
required | Array of objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects <= 50 items See the chapter on open fields on how to use this |
required | Array of objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects <= 50 items Defines deviceFields on the location (pinGroup) the device is connected to. Can be used in report type functions. See the chapter on open fields on how to use this |
required | Array of objects <= 60 items |
Array of objects <= 5 items | |
| commandTypeHashIds required | Array of strings <= 60 items The hashIds of the command types a user can schedule for this device |
| identifierFieldKey | string or null Value from form field with this key will be displayed as device identifier instead of hashId |
{- "name": "untranslated string",
- "eventHandler": "[omitted]",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pinGroupFieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channels": [
- {
- "name": "untranslated string",
- "pinFieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "defaultPinName": "untranslated string",
- "internal": true,
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff0000"
}
]
}
]
}
], - "charts": [
- {
- "name": "untranslated string",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff0000"
}
]
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "deviceFormFieldKey"
}{- "hashId": "wasd2",
- "subscriptionHashId": "string"
}Search through device types within a supplier, or within devices registered by client
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: READ
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/device-type/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "deviceType": {
- "hashId": "wasd2",
- "name": "untranslated string",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pinGroupFieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channels": [
- {
- "name": "untranslated string",
- "pinFieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "defaultPinName": "untranslated string",
- "internal": true,
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": null,
- "color": null
}
]
}
]
}
], - "charts": [
- {
- "name": "untranslated string",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": null,
- "quantityHashId": null,
- "color": null
}
]
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey",
- "updatedAt": "2019-12-31T15:23Z"
}
}
]
}Delete a device type. All devices of this device type do no longer get access to the application!
Rights
| hashId required | string Example: wasd2 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/device-type/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific device type identified by its hashId
Rights
| hashId required | string Example: wasd2 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/device-type/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "deviceType": null,
- "eventHandler": "[omitted]",
- "commandTypes": [
- {
- "hashId": "x18a92",
- "name": "untranslated string",
- "start": "required",
- "end": "disabled",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channelSelect": "off",
- "environmentAccess": "none"
}
], - "subscriptionHashId": "string",
- "chartQuantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
]
}Update the settings of a device type.
Rights
| hashId required | string Example: wasd2 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
untranslatedString (string) or translations (object) (stringOrTranslations) | |
| eventHandler | string <= 1000000 characters A javascript function that handles events. See the chapter "User defined code" |
Array of objects (updatableFieldConfigurations) <= 50 items See the chapter on open fields on how to use this | |
Array of objects (updatableFieldConfigurations) <= 50 items See the chapter on open fields on how to use this | |
Array of objects <= 60 items All measurements are registered on a channel. When a device is installed at a location (pinGroup), its channels are connected to the ports (pins) of the location (pinGroup). Be careful when altering channels that it does still make sense for already installed devices and historic condition reports. It is therefore not allowed to delete channels (therefore it is required that the array is not shorter than the existing channel array). | |
Array of objects <= 5 items | |
| commandTypeHashIds | Array of strings <= 60 items The hashIds of the command types a user can schedule for this device |
| identifierFieldKey | string or null Value from form field with this key will be displayed as device identifier instead of hashId |
{- "name": "untranslated string",
- "eventHandler": "string",
- "fieldConfigurations": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "pinGroupFieldConfigurations": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "channels": [
- {
- "name": "untranslated string",
- "pinFieldConfigurations": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "defaultPinName": "untranslated string",
- "internal": true,
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff0000"
}
]
}
]
}
], - "charts": [
- {
- "name": "untranslated string",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff0000"
}
]
}
]
}
], - "commandTypeHashIds": [
- "string"
], - "identifierFieldKey": "deviceFormFieldKey"
}Create a monitoring environment
| Api-Version required | integer Example: 5 |
| name required | string <= 255 characters |
{- "name": "My monitoring environment"
}{- "environment": {
- "hashId": "f1a4w1",
- "name": "My monitoring environment",
- "mapLayers": [
- {
- "name": "My map layer",
- "key": "myLayer",
- "style": {
- "layers": [
- {
- "id": "pdok-layer",
- "type": "raster",
- "source": "pdok-source",
- "paint": { }
}
], - "sources": {
- "pdok-source": {
- "type": "raster",
- "bounds": [
- 3.1706551165717776,
- 50.5788239246427,
- 7.4887369433036834,
- 53.637607600687694
]
}
}
}, - "namedStyle": "pdok-bodemkaart"
}
], - "boundingBox": {
- "type": "LineString",
- "coordinates": [
- [
- 3.3135576,
- 47.9747658
], - [
- 5.1288442202798,
- 51.8145997
]
]
}, - "fieldConfigurations": {
- "pinGroups": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "edges": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "grids": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pins": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "locale": "en",
- "defaultGraphRange": "30d",
- "allowAutoCloseThresholdIssues": false,
- "issueAutoClosingTriggerAmount": 1,
- "issueAutoClosingTriggerUnitType": "count",
- "measurementsExpirationDays": 365,
- "measurementsRetentionPolicyRange": "string",
- "enforceTwoFactorAuthentication": false,
- "allowAutoCloseConnectivityIssues": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "defaultLandingPage": "map",
- "defaultLandingPageHashId": "string",
- "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "environmentRights": [
- "STATIC",
- "USERS"
], - "userEnvironmentSettings": {
- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt",
- "defaultLandingPage": "map",
- "lastAccessedAt": "2019-12-31T15:23Z",
- "settings": {
- "map": {
- "filters": {
- "groupHashIds": [
- "naud51"
], - "info": false,
- "critical": false,
- "serious": true,
- "ok": false,
- "connectivity": false,
- "hasMeasurements": false,
- "installedDevice": true
}, - "hiddenLayerKeys": [
- "myLayer"
], - "pinGroupsAsDotsAtLowZoomLevels": false,
- "opacity": 0.5
}
}, - "autosaveSettings": {
- "map": {
- "filters": true,
- "hiddenLayerKeys": true,
- "pinGroupsAsDotsAtLowZoomLevels": true,
- "opacity": true
}
}
}
}Delete a monitoring environment. No user can access it afterwards.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/environment/ \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Search through monitoring environments. Not useful for machine accounts, as they only have access to a single monitoring environment
object |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/environment/ \ -H 'Accept: text/json' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "environment": {
- "hashId": "f1a4w1",
- "name": "My monitoring environment",
- "mapLayers": [
- {
- "name": "My map layer",
- "key": "myLayer",
- "style": {
- "layers": [
- {
- "id": "pdok-layer",
- "type": "raster",
- "source": "pdok-source",
- "paint": { }
}
], - "sources": {
- "pdok-source": {
- "type": "raster",
- "bounds": [
- 3.1706551165717776,
- 50.5788239246427,
- 7.4887369433036834,
- 53.637607600687694
]
}
}
}, - "namedStyle": "pdok-bodemkaart"
}
], - "boundingBox": {
- "type": "LineString",
- "coordinates": [
- [
- 3.3135576,
- 47.9747658
], - [
- 5.1288442202798,
- 51.8145997
]
]
}, - "fieldConfigurations": {
- "pinGroups": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "edges": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "grids": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pins": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "locale": "en",
- "defaultGraphRange": "30d",
- "allowAutoCloseThresholdIssues": false,
- "issueAutoClosingTriggerAmount": 1,
- "issueAutoClosingTriggerUnitType": "count",
- "measurementsExpirationDays": 365,
- "measurementsRetentionPolicyRange": "string",
- "enforceTwoFactorAuthentication": false,
- "allowAutoCloseConnectivityIssues": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "defaultLandingPage": "map",
- "defaultLandingPageHashId": "string",
- "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "environmentRights": [
- "STATIC",
- "USERS"
], - "userEnvironmentSettings": {
- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt",
- "defaultLandingPage": "map",
- "lastAccessedAt": "2019-12-31T15:23Z",
- "settings": {
- "map": {
- "filters": {
- "groupHashIds": [
- "naud51"
], - "info": false,
- "critical": false,
- "serious": true,
- "ok": false,
- "connectivity": false,
- "hasMeasurements": false,
- "installedDevice": true
}, - "hiddenLayerKeys": [
- "myLayer"
], - "pinGroupsAsDotsAtLowZoomLevels": false,
- "opacity": 0.5
}
}, - "autosaveSettings": {
- "map": {
- "filters": true,
- "hiddenLayerKeys": true,
- "pinGroupsAsDotsAtLowZoomLevels": true,
- "opacity": true
}
}
}
}
]
}Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name | string |
Array of objects (mapLayer) [ 1 .. 30 ] items | |
object See the chapter on open fields on how to use this. A minimum of 1 element should be present in each field configuration array | |
| locale | string Enum: "en" "nl" Locale code |
| defaultGraphRange | string |
| allowAutoCloseThresholdIssues | boolean |
| issueAutoClosingTriggerAmount | integer |
| issueAutoClosingTriggerUnitType | string |
| measurementsExpirationDays | integer [ 1 .. 9999 ] |
| measurementsRetentionPolicyRange | string or null Period to keep measurements in the database. If null, they are kept forever. |
| enforceTwoFactorAuthentication | boolean Describes if users need to have two factor authentication enabled in order to access this environment. |
| logo | string or null Layout should be "data: |
object or null | |
| allowAutoCloseConnectivityIssues | boolean |
| defaultLandingPage | string |
| defaultLandingPageHashId | string or null |
{- "name": "My monitoring environment",
- "mapLayers": [
- {
- "name": "My map layer",
- "key": "myLayer",
- "style": {
- "layers": [
- {
- "id": "pdok-layer",
- "type": "raster",
- "source": "pdok-source",
- "paint": { }
}
], - "sources": {
- "pdok-source": {
- "type": "raster",
- "bounds": [
- 3.1706551165717776,
- 50.5788239246427,
- 7.4887369433036834,
- 53.637607600687694
]
}
}
}, - "namedStyle": "pdok-bodemkaart"
}
], - "fieldConfigurations": {
- "pinGroups": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "grids": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "edges": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "pins": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
]
}, - "locale": "en",
- "defaultGraphRange": "30d",
- "allowAutoCloseThresholdIssues": true,
- "issueAutoClosingTriggerAmount": 0,
- "issueAutoClosingTriggerUnitType": "string",
- "measurementsExpirationDays": 365,
- "measurementsRetentionPolicyRange": "string",
- "enforceTwoFactorAuthentication": false,
- "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
- "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "allowAutoCloseConnectivityIssues": false,
- "defaultLandingPage": "map",
- "defaultLandingPageHashId": "string"
}{- "environment": {
- "hashId": "f1a4w1",
- "name": "My monitoring environment",
- "mapLayers": [
- {
- "name": "My map layer",
- "key": "myLayer",
- "style": {
- "layers": [
- {
- "id": "pdok-layer",
- "type": "raster",
- "source": "pdok-source",
- "paint": { }
}
], - "sources": {
- "pdok-source": {
- "type": "raster",
- "bounds": [
- 3.1706551165717776,
- 50.5788239246427,
- 7.4887369433036834,
- 53.637607600687694
]
}
}
}, - "namedStyle": "pdok-bodemkaart"
}
], - "boundingBox": {
- "type": "LineString",
- "coordinates": [
- [
- 3.3135576,
- 47.9747658
], - [
- 5.1288442202798,
- 51.8145997
]
]
}, - "fieldConfigurations": {
- "pinGroups": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "edges": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "grids": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pins": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "locale": "en",
- "defaultGraphRange": "30d",
- "allowAutoCloseThresholdIssues": false,
- "issueAutoClosingTriggerAmount": 1,
- "issueAutoClosingTriggerUnitType": "count",
- "measurementsExpirationDays": 365,
- "measurementsRetentionPolicyRange": "string",
- "enforceTwoFactorAuthentication": false,
- "allowAutoCloseConnectivityIssues": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "defaultLandingPage": "map",
- "defaultLandingPageHashId": "string",
- "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}
}Get a specific monitoring environment identified by its hashId
| hashId required | string Example: f1a4w1 |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/environment/{hashId} \ -H 'Accept: text/json' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "environment": {
- "hashId": "f1a4w1",
- "name": "My monitoring environment",
- "mapLayers": [
- {
- "name": "My map layer",
- "key": "myLayer",
- "style": {
- "layers": [
- {
- "id": "pdok-layer",
- "type": "raster",
- "source": "pdok-source",
- "paint": { }
}
], - "sources": {
- "pdok-source": {
- "type": "raster",
- "bounds": [
- 3.1706551165717776,
- 50.5788239246427,
- 7.4887369433036834,
- 53.637607600687694
]
}
}
}, - "namedStyle": "pdok-bodemkaart"
}
], - "boundingBox": {
- "type": "LineString",
- "coordinates": [
- [
- 3.3135576,
- 47.9747658
], - [
- 5.1288442202798,
- 51.8145997
]
]
}, - "fieldConfigurations": {
- "pinGroups": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "edges": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "grids": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pins": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "locale": "en",
- "defaultGraphRange": "30d",
- "allowAutoCloseThresholdIssues": false,
- "issueAutoClosingTriggerAmount": 1,
- "issueAutoClosingTriggerUnitType": "count",
- "measurementsExpirationDays": 365,
- "measurementsRetentionPolicyRange": "string",
- "enforceTwoFactorAuthentication": false,
- "allowAutoCloseConnectivityIssues": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "defaultLandingPage": "map",
- "defaultLandingPageHashId": "string",
- "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "environmentRights": [
- "STATIC",
- "USERS"
], - "userEnvironmentSettings": {
- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt",
- "defaultLandingPage": "map",
- "lastAccessedAt": "2019-12-31T15:23Z",
- "settings": {
- "map": {
- "filters": {
- "groupHashIds": [
- "naud51"
], - "info": false,
- "critical": false,
- "serious": true,
- "ok": false,
- "connectivity": false,
- "hasMeasurements": false,
- "installedDevice": true
}, - "hiddenLayerKeys": [
- "myLayer"
], - "pinGroupsAsDotsAtLowZoomLevels": false,
- "opacity": 0.5
}
}, - "autosaveSettings": {
- "map": {
- "filters": true,
- "hiddenLayerKeys": true,
- "pinGroupsAsDotsAtLowZoomLevels": true,
- "opacity": true
}
}
}
}Create an edge
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
required | object |
| fields required | object How form fields should be sent to the server when creating them. |
| properties | any deprecated |
| mapLayer | string |
| photo | string Layout should be "data: |
{- "geometry": {
- "type": "MultiLineString",
- "coordinates": [
- [
- [
- -180,
- -180
], - [
- -180,
- -180
]
]
]
}, - "fields": {
- "id": "My line"
}, - "properties": null,
- "mapLayer": "string",
- "photo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
}{- "hashId": "ka08d",
- "edge": {
- "hashId": "ka08d",
- "geometry": [
- [
- 4.884707950517225,
- 52.37502141913572
], - [
- 4.882654974236971,
- 52.355321958806485
], - [
- 4.924301064507517,
- 52.364277347881085
]
], - "name": "My line",
- "fields": {
- "id": "My line"
}, - "level": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}
}Search through edges
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/edge \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "edge": {
- "hashId": "ka08d",
- "geometry": [
- [
- 4.884707950517225,
- 52.37502141913572
], - [
- 4.882654974236971,
- 52.355321958806485
], - [
- 4.924301064507517,
- 52.364277347881085
]
], - "name": "My line",
- "fields": {
- "id": "My line"
}, - "level": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}
}
]
}Create a pin grid
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| fields required | object How form fields should be sent to the server when creating them. |
| photo | string Layout should be "data: |
| pinHashIds | Array of strings <= 90 items Default: [] Determines the set (and the order) of the pins in the grid |
{- "fields": {
- "id": "My grid"
}, - "photo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
- "pinHashIds": [ ]
}{- "hashId": "naud51",
- "grid": {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}
}Create a pin group grid
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| fields required | object How form fields should be sent to the server when creating them. |
| photo | string Layout should be "data: |
| pinGroupHashIds | Array of strings <= 90 items Default: [] Determines the set (and the order) of the pin groups in the grid |
{- "fields": {
- "id": "My grid"
}, - "photo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
- "pinGroupHashIds": [ ]
}{- "hashId": "naud51",
- "grid": {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}
}Create a pin group
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| symbolKey required | string |
required | object or null |
| fields required | object How form fields should be sent to the server when creating them. |
| mapLayer | string If not provided, the first available one is chosen |
| photo | string Layout should be "data: |
| gridHashIds | Array of strings <= 30 items PinGroups will be added at the end of the list in a grid |
| gridName | string Ensures the pinGroup is part of a grid with the provided name. If multiple grids exist with the same name, one is chosen at random |
{- "symbolKey": "cp-pole",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "fields": {
- "id": "My location"
}, - "mapLayer": "string",
- "photo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
- "gridHashIds": [
- "string"
], - "gridName": "string"
}{- "hashId": "dao97",
- "pinGroup": {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}
}Search through pin groups
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/pin-group \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "pinGroup": {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}, - "device": {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "environmentHashId": "f1a4w1",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}
}
]
}Create a pin within a pin group
Rights
| pinGroupHashId required | string Example: dao97 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| fields required | object How form fields should be sent to the server when creating them. |
| typeKey | string or null |
| edgeHashId | string or null |
| pinGridsHashIds | Array of strings or null <= 30 items |
{- "fields": {
- "id": "My port"
}, - "typeKey": "string",
- "edgeHashId": "ka08d",
- "pinGridsHashIds": [
- "string"
]
}{- "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}, - "grids": [
- {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}
]
}Delete an edge.
Rights
| hashId required | string Example: ka08d |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/graph/edge/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific edge identified by its hashId
Rights
| hashId required | string Example: ka08d |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/edge/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "edge": {
- "hashId": "ka08d",
- "geometry": [
- [
- 4.884707950517225,
- 52.37502141913572
], - [
- 4.882654974236971,
- 52.355321958806485
], - [
- 4.924301064507517,
- 52.364277347881085
]
], - "name": "My line",
- "fields": {
- "id": "My line"
}, - "level": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "pins": [
- {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}
], - "pinGroups": [
- {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}
], - "measurementCycles": [ ],
- "nextReportBefore": [
- "2019-12-31T15:25Z"
], - "thresholds": [
- {
- "value": {
- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "hashId": "tap192",
- "pinHashId": "e13d57"
}, - "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
}
],
}Updates a specific edge
Rights
| hashId required | string Example: ka08d |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
object or (Array of objects or objects) (fieldsToServerUpdate) How form fields should be sent to the server when updating them. | |
| mapLayer | string |
object | |
| photo | string or null Layout should be "data: |
{- "fields": { },
- "mapLayer": "string",
- "geometry": {
- "type": "MultiLineString",
- "coordinates": [
- [
- [
- -180,
- -180
], - [
- -180,
- -180
]
]
]
}, - "photo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
}{- "edge": {
- "hashId": "ka08d",
- "geometry": [
- [
- 4.884707950517225,
- 52.37502141913572
], - [
- 4.882654974236971,
- 52.355321958806485
], - [
- 4.924301064507517,
- 52.364277347881085
]
], - "name": "My line",
- "fields": {
- "id": "My line"
}, - "level": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}
}Delete a grid.
Rights
| hashId required | string Example: naud51 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/graph/grid/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Delete a pin group.
Rights
| hashId required | string Example: dao97 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/graph/pin-group/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific pin group identified by its hashId
Rights
| hashId required | string Example: dao97 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/pin-group/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "pinGroup": {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}, - "pins": [
- {
- "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}, - "grids": [
- {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}
]
}
], - "edges": [
- {
- "hashId": "ka08d",
- "geometry": [
- [
- 4.884707950517225,
- 52.37502141913572
], - [
- 4.882654974236971,
- 52.355321958806485
], - [
- 4.924301064507517,
- 52.364277347881085
]
], - "name": "My line",
- "fields": {
- "id": "My line"
}, - "level": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}
], - "device": {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "environmentHashId": "f1a4w1",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "deviceType": null,
- "channelMapping": [
- {
- "channel": 0,
- "pinHashId": "string"
}
], - "measurementCycle": null,
- "thresholds": [
- {
- "value": {
- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "hashId": "tap192",
- "pinHashId": "e13d57"
}, - "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
}
], - "nextReportBefore": "2019-12-31T15:25Z",
- "grids": [
- {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}
]
}Updates a specific pin group
Rights
| hashId required | string Example: dao97 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| symbolKey | string |
object or null | |
object or (Array of objects or objects) (fieldsToServerUpdate) How form fields should be sent to the server when updating them. | |
| mapLayer | string |
object or (Array of objects or objects) (fieldsToServerUpdate) How form fields should be sent to the server when updating them. | |
| photo | string or null Layout should be "data: |
| gridHashIds | Array of strings <= 30 items PinGroups will be added at the end of the list in a grid |
| gridName | string Ensures the pinGroup is part of a grid with the provided name. If multiple grids exist with the same name, one is chosen at random |
| deviceTypeDashboardIndex | integer The index of the device type dashboard for graphs |
{- "symbolKey": "cp-rect",
- "geometry": {
- "type": "Point",
- "coordinates": [
- -180,
- -180
]
}, - "fields": { },
- "mapLayer": "string",
- "deviceFields": { },
- "photo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
- "gridHashIds": [
- "string"
], - "gridName": "string",
- "deviceTypeDashboardIndex": 0
}{- "pinGroup": {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}, - "grids": [
- {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}
]
}Delete a pin.
Rights
| hashId required | string Example: e13d57 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/graph/pin/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific pin identified by its hashId
Rights
| hashId required | string Example: e13d57 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/pin/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}, - "edges": [
- {
- "hashId": "ka08d",
- "geometry": [
- [
- 4.884707950517225,
- 52.37502141913572
], - [
- 4.882654974236971,
- 52.355321958806485
], - [
- 4.924301064507517,
- 52.364277347881085
]
], - "name": "My line",
- "fields": {
- "id": "My line"
}, - "level": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}
], - "thresholds": [
- {
- "value": {
- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "hashId": "tap192",
- "pinHashId": "e13d57"
}, - "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
}
]
}Updates a specific pin
Rights
| hashId required | string Example: e13d57 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
object or (Array of objects or objects) (fieldsToServerUpdate) How form fields should be sent to the server when updating them. | |
| edgeHashId | string or null |
| pinGridsHashIds | Array of strings <= 30 items |
{- "fields": { },
- "edgeHashId": "ka08d",
- "pinGridsHashIds": [
- "string"
]
}{- "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}, - "grids": [
- {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}
]
}Search through pinGroups, edges and pinGroup-grids
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "objectType": "pinGroup",
- "hashId": "dao97",
- "name": "My location"
}
]
}Updates the geometries of one or more nodes, pin groups and or edges
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| type required | string Value: "pinGroup" |
| hashId required | string |
required | object or null |
[- {
- "type": "pinGroup",
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}
}
]Search through grids
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/grid \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "grid": {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}, - "notificationLevel": 0
}
]
}Search through pins
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/pin \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}, - "pinGroup": {
- "name": "My location"
}
}
]
}Get a specific grid of type pin identified by its hashId
Rights
| hashId required | string Example: naud51 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/pin-grid/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "grid": {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}, - "pins": [
- {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}
],
}Updates a specific grid of type pin
Rights
| hashId required | string Example: naud51 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
object or (Array of objects or objects) (fieldsToServerUpdate) How form fields should be sent to the server when updating them. | |
| photo | string or null Layout should be "data: |
| pinHashIds | Array of strings <= 90 items Determines the set (and the order) of the pins in the grid |
{- "fields": { },
- "photo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
- "pinHashIds": [
- "string"
]
}{- "grid": {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}, - "pins": [
- {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}
]
}Get a specific grid of type pinGroup identified by its hashId
Rights
| hashId required | string Example: naud51 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/pin-group-grid/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "grid": {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}, - "pinGroups": [
- {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}
], - "lastReports": [
- {
- "pinGroupHashId": "dao97",
- "generatedAt": "2019-12-31T15:23Z"
}
], - "notificationLevel": 0,
}Updates a specific grid
Rights
| hashId required | string Example: naud51 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
object or (Array of objects or objects) (fieldsToServerUpdate) How form fields should be sent to the server when updating them. | |
| photo | string or null Layout should be "data: |
| pinGroupHashIds | Array of strings <= 10000 items Determines the set (and the order) of the pin groups in the grid |
{- "fields": { },
- "photo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
- "pinGroupHashIds": [
- "string"
]
}{- "grid": {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}, - "pinGroups": [
- {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}
], - "lastReports": [
- {
- "pinGroupHashId": "dao97",
- "generatedAt": "2019-12-31T15:23Z"
}
]
}Get the performance of a device linked to a specific pin group identified by its hashId
Rights
| hashId required | string Example: dao97 |
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/pin-group/{hashId}/performance \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
[- {
- "startAt": "2019-12-01T00:00Z",
- "endAt": "2020-01-01T00:00Z",
- "reports": {
- "expected": 9,
- "received": 8,
- "connected": 10
}
}
]Get a specific pin quantities by its hashId
Rights
| pinHashId required | string Example: e13d57 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/pin-quantities/{pinHashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "rows": [
- {
- "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}, - "linkedSupplierQuantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
], - "pinThreshold": {
- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "hashId": "tap192",
- "pinHashId": "e13d57"
}
}
]
}Get a mapbox vector tile of the edges, nodes and pin groups within the provided bounding box.
Rights
| x required | integer Example: 4207 |
| y required | integer Example: 2693 |
| z required | integer Example: 13 |
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/graph/tiles/{z}/{x}/{y} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
nullSubscribe to or unsubscribe from new issues created on pin groups in this specific grid
Rights
| hashId required | string Example: naud51 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| level required | number or null <float> Enum: 0 1 2 Subscribe to every issue created on a pin group in this grid (0), when the issue gets serious (1) or when the issue gets critical (2). If you do not want to receive any notifications, set to null |
{- "level": 0
}Updates pin groups
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| hashIds required | Array of strings <= 30 items |
object |
{- "hashIds": [
- "string"
], - "mapLayer": {
- "key": "string",
- "includeEdges": false
}
}Generates an import template
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| pinGroupHashIds required | Array of strings [ 0 .. 200 ] items A list of location hashIds |
| pinGroupGridHashIds required | Array of strings [ 0 .. 10 ] items A list of location group hashIds |
| reportTypeHashIds required | Array of strings [ 1 .. 5 ] items A list of report type hashIds |
{- "pinGroupHashIds": [
- "dao97"
], - "pinGroupGridHashIds": [
- "naud51"
], - "reportTypeHashIds": [
- "l19a7s"
]
}{- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}Uploads an import file
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| dataUrl required | string Layout should be "data: |
| name | string The filename including extension |
{- "dataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
- "name": "red-dot.png"
}{- "importRequest": {
- "state": "processing",
- "hashId": "5x2znek",
- "name": "Q2 Import Temperature",
- "userHashId": "5x2znek",
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "errors": [
- {
- "key": "locationHashIdMissing",
- "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "file": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "processedAt": "2019-12-31T15:23Z"
}, - "createdByUserName": "John Doe"
}Search through imports within a monitoring environment
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: USERS
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/import/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "importRequest": {
- "state": "processing",
- "hashId": "5x2znek",
- "name": "Q2 Import Temperature",
- "userHashId": "5x2znek",
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "errors": [
- {
- "key": "locationHashIdMissing",
- "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "file": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "processedAt": "2019-12-31T15:23Z"
}, - "createdByUserName": "John Doe"
}
]
}Deletes an import
Rights
| hashId required | string Example: 5x2znek The hashId of the import to be deleted |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/import/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Create an issue
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| assignedUserHashId | string or null |
| pinGroupHashId required | string |
| pinHashIds required | Array of strings <= 1000 items When empty, all pins are affected |
required | (object or null) or (object or null) |
| title required | string <= 255 characters |
| level required | number <float> Enum: 0 1 2 |
| comment required | string <= 65536 characters |
Array of objects (fileToServer) <= 5 items Default: [] | |
| labelHashIds | Array of strings <= 10 items Default: [] |
| doNotAutoClose | boolean Default: false |
{- "assignedUserHashId": "string",
- "pinGroupHashId": [
- "dao97"
], - "pinHashIds": [
- "e13d57"
], - "automation": null,
- "title": "Temperature is too high",
- "level": 0,
- "comment": "This looks serious.",
- "files": [ ],
- "labelHashIds": [
- "u98a24"
], - "doNotAutoClose": false
}{- "hashId": "c19aid",
- "mentionedUsers": [
- {
- "hashId": "ba5qq1",
- "name": "Jane Doe"
}
]
}Delete multiple issues. Will return an array showing which issues were deleted or not.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| hashIds required | Array of strings [ 2 .. 30 ] items |
{- "hashIds": [
- "c19aid"
]
}[- {
- "hashId": "c19aid",
- "deleted": true
}
]Search through issues
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/issue/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "issue": {
- "hashId": "c19aid",
- "userHashId": "b45zo0",
- "assignedUserHashId": null,
- "title": "Temperature is too high",
- "pinGroupHashId": "dao97",
- "level": 0,
- "type": "manual",
- "doNotAutoClose": false,
- "closedAt": null,
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "labels": [
- {
- "name": "Fix this month",
- "color": "#ff0000"
}
], - "userName": "John Doe",
- "assignedUserName": null,
- "pinGroup": {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}, - "subscribed": false
}
]
}Add a comment to a specific issue
Rights
| hashId required | string Example: a9hhi0 Identifies the issue to comment on |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| comment required | string <= 65536 characters |
Array of objects (fileToServer) <= 5 items Default: [] | |
| closeIssue | boolean Default: false |
{- "comment": "This looks serious.",
- "files": [ ],
- "closeIssue": false
}{- "newComments": [
- {
- "comment": {
- "hashId": "a9hhi0",
- "userHashId": "b45zo0",
- "comment": "This looks serious.",
- "files": [ ],
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "userName": "John Doe"
}
], - "mentionedUsers": [
- {
- "hashId": "ba5qq1",
- "name": "Jane Doe"
}
]
}Comment on multiple issues. Will return an array showing which issues were commented on or not.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| hashIds required | Array of strings [ 2 .. 30 ] items The issues to comment on |
| comment required | string <= 65536 characters |
Array of objects (fileToServer) <= 5 items Default: [] | |
| closeIssue | boolean Default: false |
{- "hashIds": [
- "c19aid"
], - "comment": "This looks serious.",
- "files": [ ],
- "closeIssue": false
}[- {
- "hashId": "c19aid",
- "success": true
}, - {
- "hashId": "c19aid",
- "success": true
}
]Delete an issue.
Rights
| hashId required | string Example: c19aid |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/issue/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific issue identified by its hashId
Rights
| hashId required | string Example: c19aid |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/issue/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "issue": {
- "hashId": "c19aid",
- "userHashId": "b45zo0",
- "assignedUserHashId": null,
- "title": "Temperature is too high",
- "pinGroupHashId": "dao97",
- "level": 0,
- "type": "manual",
- "doNotAutoClose": false,
- "closedAt": null,
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "userName": "John Doe",
- "assignedUserName": null,
- "mentionedUsers": [
- {
- "hashId": "ba5qq1",
- "name": "Jane Doe"
}
], - "pinGroup": {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}, - "pins": [
- {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}
], - "automation": {
- "type": "missing"
}, - "labels": [
- {
- "hashId": "u98a24",
- "name": "Fix this month",
- "color": "#ff0000",
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}
], - "comments": [
- {
- "comment": {
- "hashId": "a9hhi0",
- "userHashId": "b45zo0",
- "comment": "This looks serious.",
- "files": [ ],
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "userName": "John Doe"
}
], - "subscribed": false
}Change the settings of a specific issue
Rights
| hashId required | string Example: c19aid |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| title | string <= 255 characters |
| pinGroupHashId | string |
| pinHashIds | Array of strings <= 1000 items When empty, all pins are affected |
(object or null) or (object or null) | |
| assignedUserHashId | string or null |
| labelHashIds | Array of strings <= 10 items |
| closed | boolean |
| level | number <float> Enum: 0 1 2 |
| doNotAutoClose | boolean |
{- "title": "Temperature is too high",
- "pinGroupHashId": "string",
- "pinHashIds": [
- "string"
], - "automation": {
- "type": "missing"
}, - "assignedUserHashId": "string",
- "labelHashIds": [
- "string"
], - "closed": true,
- "level": 0,
- "doNotAutoClose": true
}{- "newComment": {
- "hashId": "a9hhi0",
- "userHashId": "b45zo0",
- "comment": "This looks serious.",
- "files": [ ],
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "newCommentUserName": "John Doe",
- "newCommentMentionedUsers": [
- {
- "hashId": "ba5qq1",
- "name": "Jane Doe"
}
]
}Subscribe to or unsubscribe from a specific issue
Rights
| hashId required | string Example: c19aid |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| subscribed required | boolean |
{- "subscribed": true
}Subscribe or unsubscribe multiple issues. Will return an array showing which issues were (un)subscribed or not.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| hashIds required | Array of strings [ 2 .. 30 ] items The issues to (un)subscribe |
| subscribed required | boolean True to subscribe, false to unsubscribe |
{- "hashIds": [
- "c19aid"
], - "subscribed": true
}[- {
- "hashId": "c19aid",
- "success": true
}, - {
- "hashId": "c19aid",
- "success": true
}
]Update multiple issues. Will return an array showing which issues were updated or not.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| hashIds required | Array of strings [ 2 .. 30 ] items The issues to update |
| closed | boolean Marks the issues as done |
| assignedUserHashId | string or null The new assignee for the issues |
| labelHashIds | Array of strings <= 10 items The labels to add to the issues (existing labels are kept) |
{- "hashIds": [
- "c19aid"
], - "closed": false,
- "assignedUserHashId": "b45zo0",
- "labelHashIds": [
- "u98a24"
]
}[- {
- "hashId": "c19aid",
- "success": true
}, - {
- "hashId": "c19aid",
- "success": true
}
]Delete a comment on an issue (if it is yours).
Rights
| hashId required | string Example: a9hhi0 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/issue-comment/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Update a comment on an issue (if it is yours)
Rights
| hashId required | string Example: a9hhi0 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| comment required | string <= 65536 characters |
{- "comment": "This looks serious."
}[- {
- "comment": {
- "hashId": "a9hhi0",
- "userHashId": "b45zo0",
- "comment": "This looks serious.",
- "files": [ ],
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "userName": "John Doe",
- "mentionedUsers": [
- {
- "hashId": "ba5qq1",
- "name": "Jane Doe"
}
]
}
]Create a label
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name required | string <= 255 characters |
| color required | string^#[a-fA-F\d]{6}$ A hex color string. #, followed by six hexadecimal characters |
{- "name": "Fix this month",
- "color": "#ff0000"
}{- "hashId": "u98a24"
}Search through labels
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/label/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "label": {
- "hashId": "u98a24",
- "name": "Fix this month",
- "color": "#ff0000",
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}
}
]
}Delete a label.
Rights
| hashId required | string Example: u98a24 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/label/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Rights
| hashId required | string Example: u98a24 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name | string <= 255 characters |
| color | string^#[a-fA-F\d]{6}$ A hex color string. #, followed by six hexadecimal characters |
{- "name": "string",
- "color": "#ff0000"
}Rights
| hashId required | string Example: xd2rd4 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/label/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "hashId": "xd2rd4",
- "name": "My label",
- "color": "#ff0000"
}Search through measurements
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/measurement/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "report": {
- "hashId": "qoa978",
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "generatedAt": "2019-12-31T15:23Z",
- "reportTypeHashId": "l19a7s",
- "pinGroupFields": {
- "property1": true,
- "property2": true
}, - "pinObservations": [
- {
- "measurement": {
- "generatedAt": "2019-12-31T15:23Z",
- "channelIndex": 0,
- "channelMeasurementIndex": 0,
- "reportHashId": "qoa978",
- "pinHashId": "e13d57",
- "orderOfMagnitude": -3,
- "significand": -1500,
- "performance": 0
}, - "quantityHashId": "sajia1"
}
]
}, - "pinGroup": {
- "hashId": "dao97",
- "name": "My location"
}, - "pin": {
- "hashId": "e13d57",
- "name": "My port",
- "fields": {
- "id": "My port"
}
}, - "edge": {
- "hashId": "ka08d",
- "name": "My line",
- "fields": {
- "id": "My line"
}
}
}
]
}Add a measurement filter
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name required | string <= 100 characters |
| description required | string <= 255 characters |
required | string or object |
| includePinsWithoutReports | boolean Default: true |
| reportTypeHashIds required | Array of strings <= 20 items |
| gridHashId | string |
| pinGroupHashIds | Array of strings [ 1 .. 50 ] items |
| quantityHashIds required | Array of strings [ 1 .. 64 ] items |
| fieldKeys required | Array of strings <= 20 items |
| pinFieldKeys | Array of strings <= 30 items |
| edgeFieldKeys | Array of strings <= 30 items |
{- "name": "North",
- "description": "Temperatures in the North",
- "period": "lastMonth",
- "includePinsWithoutReports": true,
- "reportTypeHashIds": [
- "naud51"
], - "gridHashId": "string",
- "pinGroupHashIds": [
- "dao97"
], - "quantityHashIds": [
- "sajia1"
], - "fieldKeys": [
- "id"
], - "pinFieldKeys": [
- "string"
], - "edgeFieldKeys": [
- "string"
]
}{- "hashId": "k8gh3"
}Search through measurement filters
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/measurement-filter/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "measurementFilter": {
- "hashId": "k8gh3",
- "name": "North",
- "description": "Temperatures in the North",
- "period": "lastMonth",
- "includePinsWithoutReports": true,
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}
}
]
}Delete a measurement filter.
Rights
| hashId required | string Example: k8gh3 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/measurement-filter/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific measurement filter identified by its hashId
Rights
| hashId required | string Example: k8gh3 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/measurement-filter/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "measurementFilter": {
- "hashId": "k8gh3",
- "name": "North",
- "description": "Temperatures in the North",
- "period": "lastMonth",
- "includePinsWithoutReports": true,
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "reportTypes": [
- {
- "hashId": "l19a7s",
- "name": "Temperature and inclination",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pin": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "measurement": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "type": "human",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": null
}
], - "grid": {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}, - "pinGroups": [
- {
- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}
], - "quantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
], - "fieldKeys": [
- "id"
], - "pinFieldKeys": [
- "id"
], - "edgeFieldKeys": [
- "id"
]
}Rights
| hashId required | string Example: k8gh3 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name | string <= 100 characters |
| description | string <= 255 characters |
string or object | |
| includePinsWithoutReports | boolean |
| reportTypeHashIds | Array of strings <= 20 items |
| gridHashId | string |
| pinGroupHashIds | Array of strings [ 1 .. 50 ] items |
| quantityHashIds | Array of strings [ 1 .. 64 ] items |
| fieldKeys | Array of strings <= 20 items |
| pinFieldKeys | Array of strings <= 30 items |
| edgeFieldKeys | Array of strings <= 30 items |
{- "name": "South",
- "description": "string",
- "period": "lastMonth",
- "includePinsWithoutReports": true,
- "reportTypeHashIds": [
- "string"
], - "gridHashId": "string",
- "pinGroupHashIds": [
- "dao97"
], - "quantityHashIds": [
- "string"
], - "fieldKeys": [
- "string"
], - "pinFieldKeys": [
- "string"
], - "edgeFieldKeys": [
- "string"
]
}Search through measurement thresholds on environment and pin level
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/measurement-threshold/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "quantity": {
- "name": "untranslated string",
- "hashId": "wasd2",
- "unit": "K"
}, - "location": {
- "pinGroup": {
- "name": "My location",
- "hashId": "dao97"
}, - "pin": {
- "name": "My port",
- "hashId": "e13d57"
}, - "edge": {
- "name": "My line",
- "hashId": "ka08d"
}
}, - "threshold": {
- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true
}
}
]
}Sets issue triggers (thresholds) on a specific quantity on a specific port (pin). If a measurement outside these limits is registered, an issue is automatically created (if there isn't a relevant one open yet)
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| pinHashId required | string |
| quantityHashId required | string |
required | object or null |
[ ]{- "hashId": "tap192"
}Add one or more command(s) and its/their periodic schedules
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: SENSORS
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
required | object |
required | string or object |
| start | string or null <date-time> |
| end | string or null <date-time> |
{- "command": {
- "objectType": "device",
- "objectHashIds": [
- "j1iha9"
], - "commandTypeHashId": "x18a92",
- "fields": {
- "interval": 86400
}, - "startAt": "2019-12-31T15:23Z",
- "delay": 0.1,
- "endAt": null,
- "channelIndices": [ ],
- "email": [ ]
}, - "period": "hourly",
- "start": "2019-12-31T15:23Z",
- "end": "2019-12-31T15:23Z"
}Search through periodic commands
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: ENVIRONMENT_ADMIN
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/periodic-command/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "periodicCommand": {
- "hashId": "l74mzwwe",
- "commandHashId": "ga9741s",
- "deviceHashId": "j1iha9",
- "period": "hourly",
- "nextPlanned": "2019-12-31T15:23Z",
- "start": "2019-12-31T15:23Z",
- "end": "2019-12-31T15:23Z",
- "deletedAt": "2019-12-31T15:23Z"
}, - "commandType": {
- "name": "untranslated string"
}
}
]
}Delete a periodic command
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: ENVIRONMENT_ADMIN
| hashId required | string Example: l74mzwwe |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/periodic-command/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific periodic command by its hashId
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: ENVIRONMENT_ADMIN
| hashId required | string Example: l74xg825 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/periodic-command/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "hashId": "l74mzwwe",
- "commandHashId": "ga9741s",
- "deviceHashId": "j1iha9",
- "period": "hourly",
- "nextPlanned": "2019-12-31T15:23Z",
- "start": "2019-12-31T15:23Z",
- "end": "2019-12-31T15:23Z",
- "deletedAt": "2019-12-31T15:23Z"
}Update the periodic schedule of a periodic command.
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: ENVIRONMENT_ADMIN
| hashId required | string Example: l74xg825 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
required | string or object |
{- "period": "hourly"
}Add a quantity
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: ENVIRONMENT_ADMIN
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
required | untranslatedString (string) or translations (object) (stringOrTranslations) |
| color | string^#[a-fA-F\d]{6}$ Default: "#ff00ff" A hex color string. #, followed by six hexadecimal characters |
| unit | string or null Will be displayed with an SI-prefix (eg. k or M) if relevant |
| defaultOrderOfMagnitude | integer [ -128 .. 127 ] Defines default order of magnitude to be selected at manual report form |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
| issueDelayS | integer or null [ 0 .. 2147483647 ] Defines the time in seconds that needs to pass before an issue is created |
| issueDelayCount | integer or null [ 0 .. 2147483647 ] Defines the number of measurements that need to be out of bounds before an issue is created |
| issueDelayIntervalType | string Default: "atLeast" Enum: "atLeast" "within" Defines the type of interval for the issue delay. At least means that the issue will be created if at least issueDelayS seconds have passed since the first offending measurement was received and issueDelayCount measurements have been out of bounds. Within means that the issue will be created if there are issueDelayCount measurements out of bounds within issueDelayS seconds. |
boolean or boolean Default: true Will reset the issue counting when a good measurement is received | |
| disableSiPrefixes | boolean Default: false Will disable SI-prefixes for this quantity if true |
| deviceQuantityHashIds | Array of strings <= 30 items Device quantities, linked to this quantity |
{- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": 3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true,
- "deviceQuantityHashIds": [
- "x18a92"
]
}{- "hashId": "sajia1"
}Delete a quantity.
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: ENVIRONMENT_ADMIN
| hashId required | string Example: sajia1 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/quantity/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific quantity identified by its hashId
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: READ
| hashId required | string Example: sajia1 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/quantity/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "reportTypes": [
- {
- "hashId": "l19a7s",
- "name": "Temperature and inclination",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pin": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "measurement": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "type": "human",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": null
}
], - "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}, - "linkedSupplierQuantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
]
}Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: ENVIRONMENT_ADMIN
| hashId required | string Example: sajia1 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
untranslatedString (string) or translations (object) (stringOrTranslations) | |
| color | string^#[a-fA-F\d]{6}$ A hex color string. #, followed by six hexadecimal characters |
| unit | string or null Will be displayed with an SI-prefix (eg. k or M) if relevant |
| defaultOrderOfMagnitude | integer [ -128 .. 127 ] Defines default order of magnitude to be selected at manual report form |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
| issueDelayCount | integer or null [ 0 .. 2147483647 ] Defines the number of measurements that need to be out of bounds before an issue is created |
| issueDelayS | integer or null [ 0 .. 2147483647 ] Defines the time in seconds that needs to pass before an issue is created |
| issueDelayIntervalType | string Default: "atLeast" Enum: "atLeast" "within" Defines the type of interval for the issue delay. At least means that the issue will be created if at least issueDelayS seconds have passed since the first offending measurement was received and issueDelayCount measurements have been out of bounds. Within means that the issue will be created if there are issueDelayCount measurements out of bounds within issueDelayS seconds. |
boolean or boolean Default: true Will reset the issue counting when a good measurement is received | |
| disableSiPrefixes | boolean Will disable SI-prefixes for this quantity |
| deviceQuantityHashIds | Array of strings <= 30 items Device quantities, linked to this quantity |
{- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": 3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayCount": 2147483647,
- "issueDelayS": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true,
- "deviceQuantityHashIds": [
- "x18a92"
]
}Search through quantities
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: READ
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/quantity/quantities \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}, - "linkedSupplierQuantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
], - "environmentQuantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
}
]
}Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| generatedAt | string <date-time> The timestamp of the report itself. If not provided, the timestamp of the most recent measurement is taken. If no measurements are present, the existing generatedAt of the report is used. |
required | Array of objects <= 1000 items |
| reportTypeHashId required | string |
| pinGroupHashId required | string |
| fields | object How form fields should be sent to the server when creating them. |
{- "generatedAt": "2019-12-31T15:23Z",
- "measurements": [
- {
- "pinHashId": "e13d57",
- "quantityHashId": "sajia1",
- "generatedAt": "2019-12-31T15:23Z",
- "orderOfMagnitude": -3,
- "significand": -1500,
- "doNotCompareToThresholds": true
}
], - "reportTypeHashId": "l19a7s",
- "pinGroupHashId": "dao97",
- "fields": {
- "property1": true,
- "property2": true
}
}{- "hashId": "qoa978",
- "fields": {
- "id": "My report"
}
}Search through reports
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/report/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": null
}Delete a report.
Rights
| hashId required | string Example: qoa978 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/report/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific report identified by its hashId
Rights
| hashId required | string Example: qoa978 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/report/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "hashId": "qoa978",
- "observations": [
- {
- "measurement": {
- "generatedAt": "2019-12-31T15:23Z",
- "channelIndex": 0,
- "channelMeasurementIndex": 0,
- "reportHashId": "qoa978",
- "pinHashId": "e13d57",
- "orderOfMagnitude": -3,
- "significand": -1500,
- "performance": 0
}, - "quantityHashId": "sajia1"
}
], - "deviceType": null,
- "deviceHashId": "j1iha9",
- "fields": {
- "id": "My report"
}, - "type": null,
- "quantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
], - "pinGroupHashId": "dao97",
- "userName": null,
- "generatedAt": "2019-12-31T15:23Z",
- "createdAt": "2019-12-31T15:23Z"
}Rights
| hashId required | string Example: qoa978 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| generatedAt | string <date-time> The timestamp of the report itself. If not provided, the timestamp of the most recent measurement is taken. If no measurements are present, the existing generatedAt of the report is used. |
Array of objects <= 1000 items | |
object or (Array of objects or objects) (fieldsToServerUpdate) How form fields should be sent to the server when updating them. |
{- "generatedAt": "2019-12-31T15:23Z",
- "measurements": [
- {
- "pinHashId": "e13d57",
- "quantityHashId": "string",
- "generatedAt": "2019-08-24T14:15:22Z",
- "orderOfMagnitude": -128,
- "significand": -2147483648,
- "doNotCompareToThresholds": true
}
], - "fields": { }
}{- "fields": {
- "id": "My report"
}
}Get a specific report identified by the data of a single time-series point
Rights
| pinHashId required | string Example: e13d57 |
| quantityHashId required | string Example: sajia1 |
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/report/{pinHashId}/{quantityHashId}/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "hashId": "qoa978"
}Add a report type for human reports.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name required | string |
required | object See the chapter on open fields on how to use this |
required | Array of objects or objects <= 60 items |
{- "name": "Temperature",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pin": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "measurement": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "quantities": [
- {
- "name": "Temperature",
- "unit": "K",
- "defaultOrderOfMagnitude": 3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "disableSiPrefixes": true,
- "color": "#ff0000"
}
]
}{- "hashId": "l19a7s"
}Search through report types
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/report-type/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "reportType": {
- "hashId": "l19a7s",
- "name": "Temperature and inclination",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pin": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "measurement": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "type": "human",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": null
}
}
]
}Delete a report type.
Rights
| hashId required | string Example: l19a7s |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/report-type/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific report type identified by its hashId. For report types of type 'human', quantities that used to be in the report type but are now deleted from it are not included. Report types of type 'device' do not contain any quantities.
Rights
| hashId required | string Example: l19a7s |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/report-type/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "reportType": {
- "hashId": "l19a7s",
- "name": "Temperature and inclination",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pin": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "measurement": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "type": "human",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": null
}, - "quantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}
]
}Update a report type for human reports.
Rights
| hashId required | string Example: l19a7s |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name | string |
object See the chapter on open fields on how to use this | |
Array of objects or objects <= 60 items |
{- "name": "Temperature",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "pin": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "measurement": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
]
}, - "quantities": [
- {
- "name": "Temperature",
- "unit": "K",
- "defaultOrderOfMagnitude": 3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "disableSiPrefixes": true,
- "color": "#ff0000"
}
]
}Request the creation of a zip file containing a data export
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
required | object or object or object or object or object |
| delimiter required | string Enum: "," ";" |
| rowDelimiter required | string Enum: "\n" "\r\n" |
{- "content": {
- "type": "measurementFilter",
- "measurementFilterHashId": "k8gh3",
- "splitStrategy": "size"
}, - "delimiter": ",",
- "rowDelimiter": "\n"
}{- "hashId": "maay1"
}Search through export requests
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/settings/export \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "exportRequest": {
- "hashId": "maay1",
- "content": {
- "name": "Name",
- "description": "Description",
- "type": "measurementFilter",
- "from": "2019-12-01T00:00Z",
- "to": "2020-01-01T00:00Z",
- "splitStrategy": "size"
}, - "delimiter": ",",
- "rowDelimiter": "\n",
- "status": "available",
- "percentage": 0.5,
- "createdAt": "2019-12-31T15:23Z"
}
}
]
}Cancel a running export request
Rights
| hashId required | string Example: maay1 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X POST https://api.withthegrid.com/settings/export/{hashId}/cancel \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' \
Search the audit log
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: AUDIT_TRAIL
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/settings/log \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "log": {
- "hashId": "op09a",
- "userHashId": "b45zo0",
- "objectType": "command",
- "objectHashId": "ga9741s",
- "subObjectType": null,
- "subObjectHashId": null,
- "action": "delete",
- "diff": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "userName": "John Doe"
}
]
}Get information about the logged in user
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/settings/ \ -H 'Accept: text/json' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "environment": {
- "hashId": "f1a4w1",
- "name": "My monitoring environment",
- "mapLayers": [
- {
- "name": "My map layer",
- "key": "myLayer",
- "style": {
- "layers": [
- {
- "id": "pdok-layer",
- "type": "raster",
- "source": "pdok-source",
- "paint": { }
}
], - "sources": {
- "pdok-source": {
- "type": "raster",
- "bounds": [
- 3.1706551165717776,
- 50.5788239246427,
- 7.4887369433036834,
- 53.637607600687694
]
}
}
}, - "namedStyle": "pdok-bodemkaart"
}
], - "boundingBox": {
- "type": "LineString",
- "coordinates": [
- [
- 3.3135576,
- 47.9747658
], - [
- 5.1288442202798,
- 51.8145997
]
]
}, - "fieldConfigurations": {
- "pinGroups": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "edges": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "grids": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pins": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "locale": "en",
- "defaultGraphRange": "30d",
- "allowAutoCloseThresholdIssues": false,
- "issueAutoClosingTriggerAmount": 1,
- "issueAutoClosingTriggerUnitType": "count",
- "measurementsExpirationDays": 365,
- "measurementsRetentionPolicyRange": "string",
- "enforceTwoFactorAuthentication": false,
- "allowAutoCloseConnectivityIssues": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "defaultLandingPage": "map",
- "defaultLandingPageHashId": "string",
- "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "environmentRights": [
- "STATIC",
- "USERS"
], - "userEnvironmentSettings": {
- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt",
- "defaultLandingPage": "map",
- "lastAccessedAt": "2019-12-31T15:23Z",
- "settings": {
- "map": {
- "filters": {
- "groupHashIds": [
- "naud51"
], - "info": false,
- "critical": false,
- "serious": true,
- "ok": false,
- "connectivity": false,
- "hasMeasurements": false,
- "installedDevice": true
}, - "hiddenLayerKeys": [
- "myLayer"
], - "pinGroupsAsDotsAtLowZoomLevels": false,
- "opacity": 0.5
}
}, - "autosaveSettings": {
- "map": {
- "filters": true,
- "hiddenLayerKeys": true,
- "pinGroupsAsDotsAtLowZoomLevels": true,
- "opacity": true
}
}
}, - "user": {
- "hashId": "b45zo0",
- "email": "info@acme.com",
- "name": "John Doe",
- "timezone": "Europe/Amsterdam",
- "locale": "en",
- "phone": "string",
- "company": "string",
- "rights": [
- "STATIC",
- "USERS"
], - "twoFactorAuthenticationEnabled": true,
- "lastFeatureUpdateSeen": 32767,
- "federatedAuthentication": false
}
}Update the settings of this user
| Api-Version required | integer Example: 5 |
| name | string <= 255 characters |
| password | string >= 8 characters |
| locale | string Enum: "en" "nl" Locale code |
| timezone | string |
| phone | string or null |
| company | string or null |
{- "name": "Jane Doe",
- "password": "stringst",
- "locale": "en",
- "timezone": "string",
- "phone": "string",
- "company": "string"
}Get an export request by its hash ID
Rights
| hashId required | string Example: maay1 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/settings/export/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "hashId": "maay1",
- "content": {
- "name": "Name",
- "description": "Description",
- "type": "measurementFilter",
- "from": "2019-12-01T00:00Z",
- "to": "2020-01-01T00:00Z",
- "splitStrategy": "size"
}, - "delimiter": ",",
- "rowDelimiter": "\n",
- "status": "available",
- "percentage": 0.5,
- "createdAt": "2019-12-31T15:23Z"
}Update the environment settings of this user
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| notificationLevel | number or null <float> Enum: 0 1 2 The user is subscribed to every issue created on locations in this environment (0), when the issue gets serious (1) or when the issue gets critical (2). If null, the user is not automatically subscribed to new issues. |
| defaultAnalyticsPanelHashId | string or null |
| defaultLandingPage | string or null |
object or null | |
object or null |
{- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt",
- "defaultLandingPage": "map",
- "settings": {
- "map": {
- "filters": {
- "groupHashIds": [
- "naud51"
], - "info": false,
- "critical": false,
- "serious": true,
- "ok": false,
- "connectivity": false,
- "measurements": false,
- "installedDevice": true
}, - "hiddenLayerKeys": [
- "myLayer"
], - "pinGroupsAsDotsAtLowZoomLevels": false,
- "opacity": 0.5
}
}, - "autosaveSettings": {
- "map": {
- "filters": true,
- "hiddenLayerKeys": true,
- "pinGroupsAsDotsAtLowZoomLevels": true,
- "opacity": true
}
}
}Subscribe to alerts on objects (currently all of supplier type)
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| objectType required | string Enum: "supplierReportType" "deviceType" "supplierWebhook" "supplierCertificate" |
| objectHashId required | string |
{- "objectType": "deviceType",
- "objectHashId": "wasd2"
}{- "hashId": "dfa1p"
}Search through connectivity environments. Not useful for machine accounts, as they only have access to a single connectivity environment
object |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/subscription/ \ -H 'Accept: text/json' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "objectName": "My device",
- "subscription": {
- "hashId": "dfa1p",
- "objectType": "deviceType",
- "objectHashId": "wasd2",
- "lastNotification": "2020-01-31T11:17Z",
- "alertsSinceLastNotification": 0,
- "createdAt": "2019-12-31T15:23Z"
}, - "supplier": {
- "hashId": "f1a4w1",
- "name": "My connectivity environment",
- "enforceTwoFactorAuthentication": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "createdAt": "2019-12-31T15:23Z"
}
}
]
}Delete a subscription.
| hashId required | string Example: l19a7s |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/subscription/{hashId} \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Create a connectivity environment to connect external systems and individual IoT devices to our application, which can be used in one or more monitoring environments
| Api-Version required | integer Example: 5 |
| name required | string |
{- "name": "My connectivity environment"
}{- "supplier": {
- "hashId": "f1a4w1",
- "name": "My connectivity environment",
- "enforceTwoFactorAuthentication": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "createdAt": "2019-12-31T15:23Z"
}, - "supplierRights": [
- "STATIC",
- "USERS"
]
}Delete a connectivity environment. No user can access it afterwards.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/supplier/ \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Search through connectivity environments. Not useful for machine accounts, as they only have access to a single connectivity environment
object |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier/ \ -H 'Accept: text/json' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "supplier": {
- "hashId": "f1a4w1",
- "name": "My connectivity environment",
- "enforceTwoFactorAuthentication": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "createdAt": "2019-12-31T15:23Z"
}, - "supplierRights": [
- "STATIC",
- "USERS"
]
}
]
}Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name | string |
| enforceTwoFactorAuthentication | boolean Describes if users need to have two factor authentication enabled in order to access this environment. |
| logo | string or null [object Object]. Null clears the logo |
object or null |
{- "name": "My connectivity environment",
- "enforceTwoFactorAuthentication": false,
- "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
- "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}
}Get a specific connectivity environment identified by its hashId
| hashId required | string Example: f1a4w1 |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier/{hashId} \ -H 'Accept: text/json' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "supplier": {
- "hashId": "f1a4w1",
- "name": "My connectivity environment",
- "enforceTwoFactorAuthentication": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "createdAt": "2019-12-31T15:23Z"
}, - "supplierRights": [
- "STATIC",
- "USERS"
]
}Search through activity in the connectivity environment
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier-activity/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "activity": {
- "hashId": "2ad91p",
- "createdAt": "2019-12-31T15:23Z",
- "triggerType": "handleIncomingRequest",
- "failed": false
}, - "device": {
- "hashId": "j1iha9"
}, - "deviceType": {
- "name": "untranslated string"
}
}
]
}Get a specific activity in the connectivity environment
Rights
| hashId required | string Example: 2ad91p |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier-activity/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "device": {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "environmentHashId": "f1a4w1",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "deviceType": null,
- "activity": {
- "hashId": "2ad91p",
- "rootActivityHashId": "2ad91p",
- "createdAt": "2019-12-31T15:23Z",
- "triggerType": "dropCommand",
- "failed": false,
- "log": [
- {
- "type": "log",
- "message": "Debug information: [..]",
- "lineNumber": 0.1,
- "columnNumber": 0.1
}
], - "triggerData": {
- "command": {
- "hashId": "ga9741s",
- "deviceHashId": "j1iha9",
- "commandTypeHashId": "x18a92",
- "fields": { },
- "pinGroupHashId": "dao97",
- "userHashId": "b45zo0",
- "periodHashId": "l74mzwwe",
- "startAt": "2019-12-31T15:23Z",
- "delay": 0,
- "endAt": null,
- "channelIndices": [
- 0,
- 2
], - "email": [
- "info@acme.com"
], - "createdAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-12-31T15:23Z"
}, - "commandType": {
- "hashId": "x18a92",
- "name": "untranslated string",
- "start": "required",
- "end": "disabled",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channelSelect": "off",
- "environmentAccess": "none"
}, - "removeFromScheduledCommands": true,
- "markAsDeleted": false
}
}
}Add a certificate to the connectivity environment that can be used to create device client certificates.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| csr required | string A Base64 encoded PKCS#10 certificate signing request |
| identifier required | string <= 1000000 characters A javascript function that returns deviceType and identifier. See the chapter "User defined code" |
{- "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIHhMIGHAgEAMCUxEjAQBgNVBAoMCWRldmVsb3BlcjEPMA0GA1UEAwwGeGQycmQ0\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEyHDE7farWQdLw/HDgOcbt9BU8ba6\nfEvEY79Z47ozYQ6LAt6wYEW/4Aq4Eir1kSCw/DtououtnpaQokZQkGYf2aAAMAoG\nCCqGSM49BAMCA0kAMEYCIQCHf/bilJwxF+7V/0mifsXK4U0PUHDe0YNBorb2dBzc\nKAIhAK59odu1i8oxIJg237EOLKbf0k/Rhub/CKPrsQ50t0lK\n-----END CERTIFICATE REQUEST-----",
- "identifier": "function (command) {\n return JSON.stringify({\n hashId: command.hashId,\n commandTypeHashId: command.commandTypeHashId,\n startAt: command.startAt,\n endAt: command.endAt,\n settings: command.settings,\n });\n}"
}{- "hashId": "v19a12",
- "certificate": "-----BEGIN CERTIFICATE-----\nMIIBNzCB3gIBATAKBggqhkjOPQQDAjAkMREwDwYDVQQKDAhzdXBwbGllcjEPMA0G\nA1UEAwwGeGQycmQ0MB4XDTIwMDIyNDEzNTQwOVoXDTIxMDIyMzEzNTQwOVowLDEP\nMA0GA1UECgwGZGV2aWNlMRkwFwYDVQQDDBB1bnFpZSBpZGVudGlmaWVyMFkwEwYH\nKoZIzj0CAQYIKoZIzj0DAQcDQgAEUPyQwLuDlKw7CA41ADhxXRvD3n9ZFF0XCeI9\nOAgRIgl2mGmnO31wX1DD4weZoB2pswCBrC39FpyHgIz6LK10PzAKBggqhkjOPQQD\nAgNIADBFAiEAyz0Ha4eFfebqSoES4vxguipSHmR/zN8KjEEie7xpqo8CICFS5NWG\niaT6xhGfChGbQjpmQQYYabau8Ons8F2JNyLu\n-----END CERTIFICATE-----\n",
- "subscriptionHashId": "string"
}Search through certificates
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier-certificate/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "certificate": {
- "hashId": "v19a12",
- "name": "My certificate",
- "createdAt": "2019-12-31T15:23Z"
}
}
]
}Delete a certificate from a connectivity environment. When the certificate has been removed, access to the application by devices with a device certificate signed by this intermediate certificate is rejected.
Rights
| hashId required | string Example: v19a12 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/supplier-certificate/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific certificate identified by its hashId
Rights
| hashId required | string Example: f1a4w1 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier-certificate/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "certificate": {
- "hashId": "v19a12",
- "name": "My certificate",
- "certificate": "-----BEGIN CERTIFICATE-----\n MIIBNzCB3gIBATAKBggqhkjOPQQDAjAkMREwDwYDVQQKDAhzdXBwbGllcjEPMA0G\n A1UEAwwGeGQycmQ0MB4XDTIwMDIyNDEzNTQwOVoXDTIxMDIyMzEzNTQwOVowLDEP\n MA0GA1UECgwGZGV2aWNlMRkwFwYDVQQDDBB1bnFpZSBpZGVudGlmaWVyMFkwEwYH\n KoZIzj0CAQYIKoZIzj0DAQcDQgAEUPyQwLuDlKw7CA41ADhxXRvD3n9ZFF0XCeI9\n OAgRIgl2mGmnO31wX1DD4weZoB2pswCBrC39FpyHgIz6LK10PzAKBggqhkjOPQQD\n AgNIADBFAiEAyz0Ha4eFfebqSoES4vxguipSHmR/zN8KjEEie7xpqo8CICFS5NWG\n iaT6xhGfChGbQjpmQQYYabau8Ons8F2JNyLu\n -----END CERTIFICATE-----\n ",
- "createdAt": "2019-12-31T15:23Z"
}, - "identifier": "function (command) {\n return JSON.stringify({\n hashId: command.hashId,\n commandTypeHashId: command.commandTypeHashId,\n startAt: command.startAt,\n endAt: command.endAt,\n settings: command.settings,\n });\n}",
- "subscriptionHashId": "string"
}Update the properties of a certificate.
Rights
| hashId required | string Example: v19a12 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| identifier | string <= 1000000 characters A javascript function that returns deviceType and identifier. See the chapter "User defined code" |
{- "identifier": "string"
}Add a credential to the connectivity environment that can be used to authenticate requests.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name required | string |
| secret required | string |
{- "name": "My credential",
- "secret": "iamsecret"
}{- "hashId": "w5dshc"
}Search through credentials.
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier-credential/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "credential": {
- "hashId": "w5dshc",
- "name": "My credential"
}
}
]
}Delete a credential from a connectivity environment.
Rights
| hashId required | string Example: w5dshc |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/supplier-credential/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific credential identified by its hashId
Rights
| hashId required | string Example: w5dshc |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier-credential/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "credential": {
- "hashId": "w5dshc",
- "name": "My credential"
}
}Update the properties of a certificate.
Rights
| hashId required | string Example: w5dshc |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name | string |
| secret | string |
{- "name": "My credential",
- "secret": "iamsecret"
}Create a report type that devices can send in
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
required | untranslatedString (string) or translations (object) (stringOrTranslations) |
required | object See the chapter on open fields on how to use this |
| parser required | string <= 1000000 characters A javascript function that parses an incoming report. See the chapter "User defined code" |
{- "name": "untranslated string",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pin": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "measurement": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "parser": "[omitted]"
}{- "hashId": "y124as",
- "subscriptionHashId": "string"
}Search through device report types
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier-report-type/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "reportType": {
- "hashId": "l19a7s",
- "name": "untranslated string",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pin": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "measurement": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "deletedAt": null
}
}
]
}Delete a device report type.
Rights
| hashId required | string Example: y124as |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/supplier-report-type/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific device report type identified by its hashId
Rights
| hashId required | string Example: y124as |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier-report-type/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "reportType": {
- "hashId": "l19a7s",
- "name": "untranslated string",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pin": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "measurement": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "deletedAt": null
}, - "parser": "[omitted]",
- "subscriptionHashId": "string"
}Update a device report type.
Rights
| hashId required | string Example: y124as |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
untranslatedString (string) or translations (object) (stringOrTranslations) | |
object See the chapter on open fields on how to use this | |
| parser | string <= 1000000 characters A javascript function that parses an incoming report. See the chapter "User defined code" |
| retryFailedSince | string <date-time> If supplied, all incoming reports of this type that failed to decode since the provided date will be reparsed. |
{- "name": "untranslated string",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "pin": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
], - "measurement": [
- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
]
}, - "parser": "[omitted]",
- "retryFailedSince": "2019-08-24T14:15:22Z"
}Add a webhook to the connectivity environment.
Rights
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name required | string <= 255 characters |
| identifier required | string <= 1000000 characters A javascript function that returns deviceType and identifier. See the chapter "User defined code" |
{- "name": "My webhook",
- "identifier": "function (command) {\n return JSON.stringify({\n hashId: command.hashId,\n commandTypeHashId: command.commandTypeHashId,\n startAt: command.startAt,\n endAt: command.endAt,\n settings: command.settings,\n });\n}"
}{- "hashId": "z812a63",
- "subscriptionHashId": "string"
}Search through webhooks
Rights
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier-webhook/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "webhook": {
- "hashId": "z812a63",
- "name": "My webhook",
- "createdAt": "2019-12-31T15:23Z"
},
}
]
}Delete a webhook from a connectivity environment.
Rights
| hashId required | string Example: z812a63 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/supplier-webhook/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific webhook identified by its hashId
Rights
| hashId required | string Example: f1a4w1 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/supplier-webhook/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "webhook": {
- "hashId": "z812a63",
- "name": "My webhook",
- "createdAt": "2019-12-31T15:23Z"
}, - "identifier": "function (command) {\n return JSON.stringify({\n hashId: command.hashId,\n commandTypeHashId: command.commandTypeHashId,\n startAt: command.startAt,\n endAt: command.endAt,\n settings: command.settings,\n });\n}",
- "subscriptionHashId": "string"
}Update the properties of a webhook.
Rights
| hashId required | string Example: v19a12 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name | string |
| identifier | string <= 1000000 characters A javascript function that returns deviceType and identifier. See the chapter "User defined code" |
{- "name": "My webhook",
- "identifier": "string"
}Add a user to a monitoring environment or a connectivity environment.
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: USERS
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| name required | string <= 255 characters |
| email required | string <email> |
| rights required | Array of strings <= 12 items Items Enum: "READ" "STATIC" "ISSUES" "AUDIT_TRAIL" "USERS" "EXPORT" "SENSORS" "REPORTS" "THRESHOLDS" "IMPORT" "ENVIRONMENT_ADMIN" "ADMIN" See the getting started section about rights |
{- "name": "John Doe",
- "email": "info@acme.com",
- "rights": [
- "STATIC",
- "USERS"
]
}{- "hashId": "b45zo0"
}Search through users within a monitoring environment or a connectivity environment
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: READ
object |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/user/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "user": {
- "hashId": "b45zo0",
- "email": "info@acme.com",
- "name": "John Doe",
- "timezone": "Europe/Amsterdam",
- "locale": "en",
- "phone": "string",
- "company": "string",
- "rights": [
- "STATIC",
- "USERS"
], - "twoFactorAuthenticationEnabled": true,
- "lastFeatureUpdateSeen": 32767,
- "federatedAuthentication": false
}, - "rights": [
- "STATIC",
- "USERS"
]
}
]
}Get a specific user identified by its hashId
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: USERS
| hashId required | string Example: b45zo0 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
# You can also use wget curl -X GET https://api.withthegrid.com/user/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "user": {
- "hashId": "b45zo0",
- "email": "info@acme.com",
- "name": "John Doe",
- "timezone": "Europe/Amsterdam",
- "locale": "en",
- "phone": "string",
- "company": "string",
- "rights": [
- "STATIC",
- "USERS"
], - "twoFactorAuthenticationEnabled": true,
- "lastFeatureUpdateSeen": 32767,
- "federatedAuthentication": false
}, - "rights": [
- "STATIC",
- "USERS"
], - "notificationLevel": 0,
- "isSsoLinkedToThisEnvironment": false
}Update the rights of a user for this monitoring environment or connectivity environment.
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: USERS
| hashId required | string Example: b45zo0 |
| Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
| Api-Version required | integer Example: 5 |
| rights required | Array of strings <= 12 items Items Enum: "READ" "STATIC" "ISSUES" "AUDIT_TRAIL" "USERS" "EXPORT" "SENSORS" "REPORTS" "THRESHOLDS" "IMPORT" "ENVIRONMENT_ADMIN" "ADMIN" See the getting started section about rights |
{- "rights": [
- "STATIC",
- "USERS"
]
}| source required | string |
required | Array of objects or objects or objects or objects <= 60 items |
object | |
object | |
| offset | string |
Array of objects <= 60 items | |
| rowsPerPage | number <float> [ 10 .. 100 ] Default: 20 |
{- "source": "pinGroup",
- "columns": [
- {
- "field": "pinGroup.hashId",
- "name": "string",
- "dataTypeHint": "string"
}
], - "filter": {
- "type": "or",
- "restrictions": [
- {
- "type": "or",
- "restrictions": "{}"
}
]
}, - "limitBy": {
- "limitedTo": 0.1,
- "per": [ ],
- "sortedBy": [ ]
}, - "offset": "string",
- "sort": [ ],
- "rowsPerPage": 20
}| hashId required | string |
| deviceHashId required | string |
| commandTypeHashId required | string |
| fields required | object How form fields are returned by the server. |
| pinGroupHashId required | string or null |
| userHashId required | string or null |
| periodHashId required | string or null |
| startAt required | string or null <date-time> Timestamp the device should execute the command. The system tries to share the command with the device before that time. If null, the device should execute it at time of receival + command.delay |
| delay required | number <float> In seconds. Only relevant when startAt is null. The command should then be executed by the device at time of receival + delay |
| endAt required | string or null <date-time> Timestamp the device should stop execution of the command. |
| channelIndices required | Array of numbers <float> <= 60 items [ items <float > ] The device channels for which this command is relevant. See commandType.channelSelect for allowed values. |
Array of strings or null <email> <= 30 items [ items <email > ] | |
| createdAt | string <date-time> |
| deletedAt | string or null <date-time> |
| sentAt required | string or null <date-time> |
{- "hashId": "ga9741s",
- "deviceHashId": "j1iha9",
- "commandTypeHashId": "x18a92",
- "fields": { },
- "pinGroupHashId": "dao97",
- "userHashId": "b45zo0",
- "periodHashId": "l74mzwwe",
- "startAt": "2019-12-31T15:23Z",
- "delay": 0,
- "endAt": null,
- "channelIndices": [
- 0,
- 2
], - "email": [
- "info@acme.com"
], - "createdAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-12-31T15:23Z"
}| hashId required | string |
| commandHashId required | string |
| deviceHashId required | string |
required | string or object |
| nextPlanned required | string <date-time> |
| start required | string <date-time> |
| end | string or null <date-time> |
| deletedAt | string or null <date-time> |
{- "hashId": "l74mzwwe",
- "commandHashId": "ga9741s",
- "deviceHashId": "j1iha9",
- "period": "hourly",
- "nextPlanned": "2019-12-31T15:23Z",
- "start": "2019-12-31T15:23Z",
- "end": "2019-12-31T15:23Z",
- "deletedAt": "2019-12-31T15:23Z"
}| hashId required | string |
required | untranslatedString (string) or translations (object) (stringOrTranslations) |
| start required | string Enum: "required" "optional" "disabled" 'required': user must provide command.startAt. 'optional': user can provide command.startAt or a delay for the command to start after it is sent to the device. 'disabled': user cannot provide command.startAt nor a delay. |
| end required | string Enum: "required" "optional" "disabled" 'required': user must provide command.endAt. 'optional': user can provide command.endAt. 'disabled': user cannot provide command.endAt. |
required | Array of objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects <= 50 items See the chapter on open fields on how to use this |
| channelSelect required | string Enum: "single" "multiple" "off" When creating a command of this type, the user can then optionally choose one (in case of 'single') or more channelIndices (in case of 'multiple') for which this command is relevant. If 'off' is chosen, the user cannot specify channelIndices |
| environmentAccess required | string Enum: "full" "read" "none" 'full': end-users can view, create and delete commands of this type. 'read': end-users can view but not create and delete commands of this type. 'none': end-users cannot view, create or delete commands of this type. |
{- "hashId": "x18a92",
- "name": "untranslated string",
- "start": "required",
- "end": "disabled",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channelSelect": "off",
- "environmentAccess": "none"
}| hashId required | string |
| supplierHashId required | string |
| supplierDeviceIdentifier required | string <= 255 characters Should be unique within the connectivity environment |
| deviceTypeHashId required | string |
| environmentHashId | string or null |
| fields required | object How form fields are returned by the server. |
| measurementCycle | any or null |
| nextReportBefore required | string or null <date-time> |
| lastOnlineAt required | string or null <date-time> |
| validated required | boolean |
| userFacingIdentifier | string or null A value of field, specified as identifierFieldKey |
{- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "environmentHashId": "f1a4w1",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}| hashId required | string |
| name required | string [ 0 .. 255 ] characters |
{- "hashId": "l74xg825",
- "name": "My counter"
}| hashId required | string |
required | untranslatedString (string) or translations (object) (stringOrTranslations) |
required | Array of objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects <= 50 items See the chapter on open fields on how to use this |
required | Array of objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects or objects <= 50 items Defines deviceFields on the location (pinGroup) the device is connected to. Can be used in report type functions. See the chapter on open fields on how to use this |
required | Array of objects <= 60 items |
required | Array of objects <= 5 items |
| commandTypeHashIds required | Array of strings <= 60 items The hashIds of the command types a user can schedule for this device |
| identifierFieldKey | string or null Chosen field will serve as an identifier for device instead of hashId |
| updatedAt required | string <date-time> |
{- "hashId": "wasd2",
- "name": "untranslated string",
- "fieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pinGroupFieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "channels": [
- {
- "name": "untranslated string",
- "pinFieldConfigurations": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "defaultPinName": "untranslated string",
- "internal": true,
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff0000"
}
]
}
]
}
], - "charts": [
- {
- "name": "untranslated string",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff0000"
}
]
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey",
- "updatedAt": "2019-12-31T15:23Z"
}| hashId required | string |
object or object | |
| name required | string |
| fields required | object The field configuration is stored in the fieldConfigurations key of the monitoring environment object |
| level required | integer Enum: 0 1 2 0: no serious or critical open issues, 1: one or more serious open issues and no critical open issues, 2: one or more critical open issues |
| mapLayer required | string |
| mostRecentMeasurementAt required | string or null <date-time> |
| deletedAt required | string or null <date-time> |
{- "hashId": "ka08d",
- "geometry": [
- [
- 4.884707950517225,
- 52.37502141913572
], - [
- 4.882654974236971,
- 52.355321958806485
], - [
- 4.924301064507517,
- 52.364277347881085
]
], - "name": "My line",
- "fields": {
- "id": "My line"
}, - "level": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}| hashId required | string |
| name required | string <= 255 characters |
required | Array of objects (mapLayer) [ 1 .. 30 ] items |
required | object or null All pin groups and edges in this monitoring environment are contained in the rectangle described by this linestring. If null, no locations (pinGroups) or lines (edges) are present |
required | object See the chapter on open fields on how to use this |
| locale required | string Enum: "en" "nl" Locale code |
| defaultGraphRange required | string |
| allowAutoCloseThresholdIssues | boolean Default: false |
| issueAutoClosingTriggerAmount | integer Default: 1 |
| issueAutoClosingTriggerUnitType | string Default: "count" |
| measurementsExpirationDays required | integer [ 1 .. 9999 ] |
| measurementsRetentionPolicyRange | string or null Period to keep measurements in the database. If null, they are kept forever. |
| enforceTwoFactorAuthentication required | boolean Determines whether users need to have two factor authentication enabled in order to access this environment. |
| allowAutoCloseConnectivityIssues required | boolean |
required | object or null (fileFromServer) Information about a stored file that can be used to download or inline it |
object or null | |
| defaultLandingPage | string Default: "map" Enum: "map" "analytics" |
| defaultLandingPageHashId | string or null |
| expiresAt required | string or null <date-time> |
| createdAt required | string <date-time> |
{- "hashId": "f1a4w1",
- "name": "My monitoring environment",
- "mapLayers": [
- {
- "name": "My map layer",
- "key": "myLayer",
- "style": {
- "layers": [
- {
- "id": "pdok-layer",
- "type": "raster",
- "source": "pdok-source",
- "paint": { }
}
], - "sources": {
- "pdok-source": {
- "type": "raster",
- "bounds": [
- 3.1706551165717776,
- 50.5788239246427,
- 7.4887369433036834,
- 53.637607600687694
]
}
}
}, - "namedStyle": "pdok-bodemkaart"
}
], - "boundingBox": {
- "type": "LineString",
- "coordinates": [
- [
- 3.3135576,
- 47.9747658
], - [
- 5.1288442202798,
- 51.8145997
]
]
}, - "fieldConfigurations": {
- "pinGroups": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "edges": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "grids": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pins": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "locale": "en",
- "defaultGraphRange": "30d",
- "allowAutoCloseThresholdIssues": false,
- "issueAutoClosingTriggerAmount": 1,
- "issueAutoClosingTriggerUnitType": "count",
- "measurementsExpirationDays": 365,
- "measurementsRetentionPolicyRange": "string",
- "enforceTwoFactorAuthentication": false,
- "allowAutoCloseConnectivityIssues": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "defaultLandingPage": "map",
- "defaultLandingPageHashId": "string",
- "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}| hashId required | string |
| name required | string |
required | object See the chapter on open fields on how to use this |
| type required | string Enum: "human" "device" |
| updatedAt required | string <date-time> |
| deletedAt required | string or null <date-time> |
{- "hashId": "l19a7s",
- "name": "Temperature and inclination",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pin": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "measurement": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "type": "human",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": null
}| hashId required | string |
required | object or object or object or object |
| delimiter required | string Enum: "," ";" |
| rowDelimiter required | string Enum: "\n" "\r\n" |
| status required | string Enum: "waiting" "creating" "available" "cancelled" "timeoutError" "tooManyRowsError" "parsingError" "internalServerError" |
| percentage | number <float> [ 0 .. 1 ] Percentage of completion |
| downloadUrl | string Only available at status available |
| createdAt required | string <date-time> |
{- "hashId": "maay1",
- "content": {
- "name": "Name",
- "description": "Description",
- "type": "measurementFilter",
- "from": "2019-12-01T00:00Z",
- "to": "2020-01-01T00:00Z",
- "splitStrategy": "size"
}, - "delimiter": ",",
- "rowDelimiter": "\n",
- "status": "available",
- "percentage": 0.5,
- "createdAt": "2019-12-31T15:23Z"
}additional property | (boolean or number or string or (any or null)) or Array of fileToServer (objects) (fieldToServerFull) The values and files that can be stored in a form field. |
{ }| hashId required | string |
| requestorType required | string |
| requestorHashId required | string |
| url required | string |
| signature required | string |
| name required | string or null |
| mimeType required | string or null |
| bytes required | integer |
| md5 required | string |
| crc32 required | string |
| expiresAt required | string or null <date-time> |
{- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}| dataUrl required | string Layout should be "data: |
| name | string The filename including extension |
{- "dataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
- "name": "red-dot.png"
}| hashId required | string |
| typeKey required | string Enum: "pinGroup" "pin" |
| name required | string |
| fields required | object The field configuration is stored in the fieldConfigurations key of the monitoring environment object |
| deletedAt required | string or null <date-time> |
{- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}| hashId required | string |
| userHashId required | string or null |
| assignedUserHashId required | string or null |
| title required | string |
| pinGroupHashId required | string |
| level required | integer Enum: 0 1 2 |
| type | string Default: "manual" Enum: "manual" "connectivity" "measurement" "internal_channel" |
| doNotAutoClose | boolean Default: false |
| closedAt required | string or null <date-time> If null, the issue is still open |
| createdAt required | string <date-time> |
| updatedAt required | string <date-time> |
| deletedAt | string or null <date-time> |
{- "hashId": "c19aid",
- "userHashId": "b45zo0",
- "assignedUserHashId": null,
- "title": "Temperature is too high",
- "pinGroupHashId": "dao97",
- "level": 0,
- "type": "manual",
- "doNotAutoClose": false,
- "closedAt": null,
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}| hashId required | string |
| userHashId required | string or null If null, the comment is created by an automated process |
| comment required | string |
Array of objects or null (fileFromServer) <= 10 items Default: [] | |
| createdAt required | string <date-time> |
| updatedAt required | string <date-time> |
| deletedAt | string or null <date-time> |
{- "hashId": "a9hhi0",
- "userHashId": "b45zo0",
- "comment": "This looks serious.",
- "files": [ ],
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}| hashId required | string |
| name required | string <= 255 characters |
| color required | string^#[a-fA-F\d]{6}$ A hex color string. #, followed by six hexadecimal characters |
| createdAt required | string <date-time> |
| updatedAt required | string <date-time> |
| deletedAt | string or null <date-time> |
{- "hashId": "u98a24",
- "name": "Fix this month",
- "color": "#ff0000",
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}| hashId required | string |
| userHashId required | string or null |
| objectType required | string or null |
| objectHashId required | string or null |
| subObjectType required | string or null |
| subObjectHashId required | string or null |
| action required | string <= 32 characters |
required | object or null |
| createdAt required | string <date-time> |
{- "hashId": "op09a",
- "userHashId": "b45zo0",
- "objectType": "command",
- "objectHashId": "ga9741s",
- "subObjectType": null,
- "subObjectHashId": null,
- "action": "delete",
- "diff": null,
- "createdAt": "2019-12-31T15:23Z"
}| name required | string |
| key required | string |
| style | any If provided, the layer renders from an external source. See https://docs.mapbox.com/mapbox-gl-js/style-spec/ for the Mapbox Style Specification. Only the layers and sources keys are currently supported. |
| namedStyle | string If provided, a style predefined by withthegrid is used. Style is ignored if it is also provided. |
{- "name": "My map layer",
- "key": "myLayer",
- "style": {
- "layers": [
- {
- "id": "pdok-layer",
- "type": "raster",
- "source": "pdok-source",
- "paint": { }
}
], - "sources": {
- "pdok-source": {
- "type": "raster",
- "bounds": [
- 3.1706551165717776,
- 50.5788239246427,
- 7.4887369433036834,
- 53.637607600687694
]
}
}
}, - "namedStyle": "pdok-bodemkaart"
}| generatedAt required | string <date-time> |
| channelIndex required | integer or null The channel of the installed device. When null, the measurement is not taken by a device but manually entered |
| channelMeasurementIndex | integer or null Not null for device measurements. Represents the device channel this measurement is taken from, see the channels key in the device type object. |
| reportHashId required | string |
| pinHashId required | string or null |
| orderOfMagnitude required | integer [ -128 .. 127 ] The measured value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) |
| significand required | integer [ -2147483648 .. 2147483647 ] The measured value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) |
| performance | integer -1: not compared to thresholds, 0: within thresholds, 1: outside serious thresholds but inside critical thresholds, 2: outside critical thresholds |
{- "generatedAt": "2019-12-31T15:23Z",
- "channelIndex": 0,
- "channelMeasurementIndex": 0,
- "reportHashId": "qoa978",
- "pinHashId": "e13d57",
- "orderOfMagnitude": -3,
- "significand": -1500,
- "performance": 0
}| hashId required | string |
| name required | string <= 100 characters |
| description required | string <= 255 characters |
required | string or object |
| includePinsWithoutReports required | boolean |
| createdAt required | string <date-time> |
| updatedAt required | string <date-time> |
| deletedAt | string or null <date-time> |
{- "hashId": "k8gh3",
- "name": "North",
- "description": "Temperatures in the North",
- "period": "lastMonth",
- "includePinsWithoutReports": true,
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}required | object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) |
required | object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) |
required | object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) |
required | object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) |
| issueDelayS | integer or null [ 0 .. 2147483647 ] |
| issueDelayCount | integer or null [ 0 .. 2147483647 ] |
| issueDelayIntervalType | string Default: "atLeast" Enum: "atLeast" "within" |
boolean or boolean Default: true | |
| hashId required | string |
| pinHashId required | string |
{- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "hashId": "tap192",
- "pinHashId": "e13d57"
}| hashId required | string |
| pinGroupHashId required | string |
| name required | string |
| fields required | object The field configuration is stored in the fieldConfigurations key of the monitoring environment object |
| deviceFields required | object The field configuration is stored in the pinFieldConfigurations key of the channel key in the device type object |
| level required | integer Enum: 0 1 2 0: no serious or critical open issues, 1: one or more serious open issues and no critical open issues, 2: one or more critical open issues |
| edgeHashId | string or null |
| typeKey | string or null |
| deletedAt required | string or null <date-time> |
{- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}| hashId required | string |
required | object or null |
| name required | string |
| symbolKey required | string |
| deviceFields required | object The field configuration is stored in the pinGroupFieldConfigurations key of the device type object |
| fields required | object The field configuration is stored in the fieldConfigurations key of the monitoring environment object |
| deviceLinkHashId required | string or null If null, there is no device installed at this location |
| level required | integer Enum: 0 1 2 0: no serious or critical open issues, 1: one or more serious open issues and no critical open issues, 2: one or more critical open issues |
| deviceLevel required | integer Enum: 0 1 2 0: no serious or critical open issues with the device, 1: one or more serious open issues and no critical open issues with the device, 2: one or more critical open issues with the device |
| mapLayer required | string |
| mostRecentMeasurementAt required | string or null <date-time> |
| deviceTypeDashboardIndex required | integer The index of the device type dashboard for graphs |
| deletedAt required | string or null <date-time> |
{- "hashId": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "deviceLevel": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deviceTypeDashboardIndex": 0,
- "deletedAt": null
}| hashId required | string |
required | untranslatedString (string) or translations (object) (stringOrTranslations) |
| color required | string^#[a-fA-F\d]{6}$ A hex color string. #, followed by six hexadecimal characters |
| unit | string or null <= 10 characters Will be displayed with an SI-prefix (eg. k or M) if relevant |
| defaultOrderOfMagnitude | integer [ -128 .. 127 ] Defines default order of magnitude to be selected at manual report form |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) | |
| issueDelayS | integer [ 0 .. 2147483647 ] |
| issueDelayCount | integer [ 0 .. 2147483647 ] |
| issueDelayIntervalType | string Default: "atLeast" Enum: "atLeast" "within" |
boolean or boolean Default: true | |
| disableSiPrefixes | boolean Default: false Will disable SI-prefixes for this quantity if true |
{- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff0000",
- "unit": "K",
- "defaultOrderOfMagnitude": -3,
- "defaultCriticallyLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultLowThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "defaultCriticallyHighThreshold": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true,
- "disableSiPrefixes": true
}| orderOfMagnitude required | integer [ -128 .. 127 ] |
| significand required | integer [ -2147483648 .. 2147483647 ] |
{- "orderOfMagnitude": 0,
- "significand": 1500
}| hashId required | string |
| name required | string |
| enforceTwoFactorAuthentication required | boolean Determines whether users need to have two factor authentication enabled in order to access this environment. |
required | object or null (fileFromServer) Information about a stored file that can be used to download or inline it |
object or null | |
| createdAt required | string <date-time> |
{- "hashId": "f1a4w1",
- "name": "My connectivity environment",
- "enforceTwoFactorAuthentication": false,
- "logo": {
- "hashId": "3a78q91",
- "requestorType": "client",
- "requestorHashId": "f1a4w1",
- "signature": "795d221ccd09fb0bfadfb74770fe0b7c",
- "name": "my photo.png",
- "mimeType": "image/png",
- "bytes": 5312,
- "md5": "56ac656c7f932c5b775be28949e90af9a2356eae2826539f10ab6526a0eec762",
- "crc32": "1ae39519",
- "expiresAt": null
}, - "theme": {
- "light": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}, - "dark": {
- "primary": "#ff00ff",
- "secondary": "#ff00ff",
- "accent": "#ff00ff",
- "error": "#ff00ff",
- "warning": "#ff00ff",
- "info": "#ff00ff",
- "success": "#ff00ff",
- "neutral": "#ff00ff"
}
}, - "createdAt": "2019-12-31T15:23Z"
}| hashId required | string |
| name required | string |
| certificate required | string A Base64 encoded intermediate certificate. Should be used to create device certificates. |
| createdAt required | string <date-time> |
{- "hashId": "v19a12",
- "name": "My certificate",
- "certificate": "-----BEGIN CERTIFICATE-----\n MIIBNzCB3gIBATAKBggqhkjOPQQDAjAkMREwDwYDVQQKDAhzdXBwbGllcjEPMA0G\n A1UEAwwGeGQycmQ0MB4XDTIwMDIyNDEzNTQwOVoXDTIxMDIyMzEzNTQwOVowLDEP\n MA0GA1UECgwGZGV2aWNlMRkwFwYDVQQDDBB1bnFpZSBpZGVudGlmaWVyMFkwEwYH\n KoZIzj0CAQYIKoZIzj0DAQcDQgAEUPyQwLuDlKw7CA41ADhxXRvD3n9ZFF0XCeI9\n OAgRIgl2mGmnO31wX1DD4weZoB2pswCBrC39FpyHgIz6LK10PzAKBggqhkjOPQQD\n AgNIADBFAiEAyz0Ha4eFfebqSoES4vxguipSHmR/zN8KjEEie7xpqo8CICFS5NWG\n iaT6xhGfChGbQjpmQQYYabau8Ons8F2JNyLu\n -----END CERTIFICATE-----\n ",
- "createdAt": "2019-12-31T15:23Z"
}| hashId required | string |
| name required | string |
{- "hashId": "w5dshc",
- "name": "My credential"
}| hashId required | string |
required | untranslatedString (string) or translations (object) (stringOrTranslations) |
required | object See the chapter on open fields on how to use this |
| deletedAt required | string or null <date-time> |
{- "hashId": "l19a7s",
- "name": "untranslated string",
- "fieldConfigurations": {
- "pinGroup": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "pin": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
], - "measurement": [
- {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
]
}, - "deletedAt": null
}| hashId required | string |
| name required | string <= 255 characters |
| createdAt required | string <date-time> |
{- "hashId": "z812a63",
- "name": "My webhook",
- "createdAt": "2019-12-31T15:23Z"
}required | object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) |
required | object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) |
required | object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) |
required | object or null (siNumber) Significant number. Its value is significand * 10 ^ orderOfMagnitude. It has as many significant figures as the significand has (except when the significand is 0, then the number of significant figures is not defined) |
| issueDelayS | integer or null [ 0 .. 2147483647 ] |
| issueDelayCount | integer or null [ 0 .. 2147483647 ] |
| issueDelayIntervalType | string Default: "atLeast" Enum: "atLeast" "within" |
boolean or boolean Default: true |
{- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "issueDelayS": 2147483647,
- "issueDelayCount": 2147483647,
- "issueDelayIntervalType": "atLeast",
- "issueDelayResetCount": true
}| existingKey | string^[a-z][a-zA-Z\d]*$ |
required | object or object or object or object or object or object or object or object or object or object or object or object or object or object Defines which data can be stored in form fields. |
[- {
- "existingKey": "string",
- "fieldConfiguration": {
- "key": "id",
- "name": "untranslated string",
- "showIf": {
- "key": "string",
- "value": "string"
}, - "hint": "untranslated string",
- "allowNull": null,
- "valueOptions": null,
- "type": "string",
- "defaultValue": "string",
- "inputType": "text",
- "regex": "string",
- "prefix": "untranslated string",
- "suffix": "untranslated string"
}
}
]| hashId required | string |
| email required | string or null <email> Is null for machine accounts |
| name required | string <= 255 characters |
| timezone required | string A IANA zone or a fixed-offset name of the form 'UTC+3', or the strings 'utc'. |
| locale | string Default: "en" Enum: "en" "nl" Locale code |
| phone | string or null |
| company | string or null |
| rights | Array of strings <= 12 items Items Enum: "READ" "STATIC" "ISSUES" "AUDIT_TRAIL" "USERS" "EXPORT" "SENSORS" "REPORTS" "THRESHOLDS" "IMPORT" "ENVIRONMENT_ADMIN" "ADMIN" See the getting started section about rights |
| twoFactorAuthenticationEnabled required | boolean or null Is true if user has 2FA enabled |
| lastFeatureUpdateSeen required | number <float> [ 0 .. 32767 ] The last feature update seen |
| federatedAuthentication required | boolean Default: false Is true if user is authenticated through a federated identity provider |
{- "hashId": "b45zo0",
- "email": "info@acme.com",
- "name": "John Doe",
- "timezone": "Europe/Amsterdam",
- "locale": "en",
- "phone": "string",
- "company": "string",
- "rights": [
- "STATIC",
- "USERS"
], - "twoFactorAuthenticationEnabled": true,
- "lastFeatureUpdateSeen": 32767,
- "federatedAuthentication": false
}| notificationLevel required | number or null <float> Enum: 0 1 2 The user is subscribed to every issue created on locations in this environment (0), when the issue gets serious (1) or when the issue gets critical (2). If null, the user is not automatically subscribed to new issues. |
| defaultAnalyticsPanelHashId required | string or null |
| defaultLandingPage | string or null The default landing page for this environment and user. If null, the default landing page is the global default for environment. |
| lastAccessedAt required | string or null <date-time> |
required | object or null |
required | object or null |
{- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt",
- "defaultLandingPage": "map",
- "lastAccessedAt": "2019-12-31T15:23Z",
- "settings": {
- "map": {
- "filters": {
- "groupHashIds": [
- "naud51"
], - "info": false,
- "critical": false,
- "serious": true,
- "ok": false,
- "connectivity": false,
- "hasMeasurements": false,
- "installedDevice": true
}, - "hiddenLayerKeys": [
- "myLayer"
], - "pinGroupsAsDotsAtLowZoomLevels": false,
- "opacity": 0.5
}
}, - "autosaveSettings": {
- "map": {
- "filters": true,
- "hiddenLayerKeys": true,
- "pinGroupsAsDotsAtLowZoomLevels": true,
- "opacity": true
}
}
}| hashId required | string |
| objectType required | string Enum: "supplierReportType" "deviceType" "supplierWebhook" "supplierCertificate" |
| objectHashId required | string |
| lastNotification required | string or null <date-time> |
| alertsSinceLastNotification required | integer |
| createdAt required | string <date-time> |
{- "hashId": "dfa1p",
- "objectType": "deviceType",
- "objectHashId": "wasd2",
- "lastNotification": "2020-01-31T11:17Z",
- "alertsSinceLastNotification": 0,
- "createdAt": "2019-12-31T15:23Z"
}| hashId required | string |
| incoming required | boolean |
| createdAt required | string <date-time> |
required | object |
required | object or null |
{- "hashId": "1a532q",
- "incoming": true,
- "createdAt": "2019-12-31T15:23Z",
- "request": {
- "url": {
- "protocol": "https",
- "host": "api.amp.withthegrid.com",
- "path": "/something",
- "query": {
- "e": "f1a4w1",
- "t": "asd193gaf11234"
}
}, - "ip": "8.8.8.8",
- "method": "post",
- "headers": {
- "content-type": "application/json;charset=UTF-8"
}, - "body": {
- "type": "json",
- "data": {
- "key": "value"
}
}, - "certificate": {
- "subjects": [
- [
- {
- "key": {
- "encoding": "utf8",
- "value": "cn"
}, - "value": {
- "encoding": "utf8",
- "value": "common name"
}
}
]
]
}, - "pskIdentityHint": "=d37d7&&dhdkf2"
}, - "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json;charset=UTF-8"
}, - "body": {
- "type": "json",
- "data": {
- "key": "value"
}
}
}
}