Download OpenAPI specification:Download
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. Next to the raw HTTP queries (with examples in cURL), we provide a Javascript(Typescript) SDK. Select in the top bar whether you want to see the documentation for cURL or the Javascript SDK.
To add the SDK to your javascript package, type npm i @withthegrid/platform-sdk
into your console.
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.
There is a SDK available that can be used to make calling the api more easy. The following is an example for creating a location (pinGroup).
import PlatformSdk, { errors } from '@withthegrid/platform-sdk';
const example = async () => {
const platformSdk = new PlatformSdk();
// Here you use the assertion that is provided to you when the machine account is created
await platformSdk.machineLogin('your assertion');
/*
A controller (addPinGroup in this example) takes a single parameter, which
is an object with three possible keys: params, query and body. It depends on
the route what the signature should be.
A controller returns an object with the following signature:
{
request: {
query: validatedQuery,
body: validatedBody,
params: validatedParams,
} as EffectiveRequestImplementation,
response: responsePromise as Promise<ResponseImplementation>,
}
The request is based on the provided parameter, with default values added to
it. Response is an object with a signature that depends on the route. An
application of the cancelToken is shown below.
*/
const result = await platformSdk.routes.graph.addPinGroup({
body: {
symbolKey: 'cp-pole',
geometry: {
type: 'Point',
coordinates: [5.078397, 52.100985],
},
fields: {},
},
});
/*
With a 1 in 10 chance, cancel the request. this does not make sense in
practice, but demonstrates the use of cancel tokens A more useful
application is an autocomplete text field, where suggestions are updated as
the user is typing. New user input would trigger a new request. The old one
should then be canceled as its response will be ignored.
As the request might have already reached the server, you do not know
whether the request has been processed. Using this on requests that change
the state of an object on the server (PUT, POST and DELETE requests) does
not make sense.
*/
if (Math.random() > 0.9) {
setImmediate(() => {
result.cancelToken.cancel();
});
}
const response = await result.response;
console.log(`Added a new pinGroup with hashId ${response.hashId}`);
process.exit(0);
}
example().catch((e) => {
if (e instanceof errors.CommsCanceled) {
// will be triggered when you call result.cancelToken.cancel();
console.log('You have canceled the request');
} else if (e instanceof errors.Base) {
console.log(e.formattedMessage);
console.error(`Stack trace: ${e.stack}`);
} else if (e instanceof Error) {
console.error(`Error: ${e.message}`);
console.error(`Stack trace: ${e.stack}`);
} else {
console.error(`Not-an-object error: ${e}`);
}
process.exit(1);
});
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. |
Create an analytics dashboard
Rights
Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
Api-Version required | integer Example: 5 |
title required | string |
Array of objects Default: [] | |
required | Array of objects |
{- "title": "My dashboard",
- "layout": [ ],
- "cards": [
- {
- "title": "My widget",
- "subtitle": "My widget description",
- "query": {
- "source": "pinGroup",
- "columns": [
- {
- "field": "pinGroup.hashId",
- "name": "string",
- "dataTypeHint": "string"
}
], - "filter": {
- "type": "or",
- "restrictions": [
- {
- "type": "or",
- "restrictions": "{}"
}
]
}, - "limitBy": {
- "limitedTo": 0,
- "per": [ ],
- "sortedBy": [ ]
}, - "offset": "string",
- "sort": [ ],
- "rowsPerPage": 20
}, - "visualisation": {
- "colors": [
- "#202f0c"
], - "xAxisColumnIndex": null,
- "forceOrdinal": false,
- "showAllXAxisLabels": false,
- "type": "line",
- "yMin": 10,
- "yMax": 10
}
}
]
}
{- "hashId": "7usgt"
}
Search through analytics dashboards
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/analytics/panel \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "panel": {
- "hashId": "j1iha9",
- "title": "My dashboard",
- "layout": [ ],
- "cards": [
- {
- "title": "My widget",
- "subtitle": "My widget description",
- "query": {
- "source": "pinGroup",
- "columns": [
- {
- "field": "pinGroup.hashId",
- "name": "string",
- "dataTypeHint": "string"
}
], - "filter": {
- "type": "or",
- "restrictions": [
- {
- "type": null,
- "restrictions": { }
}
]
}, - "limitBy": {
- "limitedTo": 0,
- "per": [ ],
- "sortedBy": [ ]
}, - "offset": "string",
- "sort": [ ],
- "rowsPerPage": 20
}, - "visualisation": {
- "colors": [
- "#202f0c"
], - "xAxisColumnIndex": null,
- "forceOrdinal": false,
- "showAllXAxisLabels": false,
- "type": "line",
- "yMin": 10,
- "yMax": 10
}
}
]
}
}
]
}
Get the results for an analytics dashboard
Rights
object (analyticsQuery) An object describing an analytics query. |
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/analytics/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- [
- "dao97"
]
]
}
Get a specific analytics dashboard identified by its hashId
Rights
hashId required | string Example: 7usgt |
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/analytics/panel/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "panel": {
- "hashId": "j1iha9",
- "title": "My dashboard",
- "layout": [ ],
- "cards": [
- {
- "title": "My widget",
- "subtitle": "My widget description",
- "query": {
- "source": "pinGroup",
- "columns": [
- {
- "field": "pinGroup.hashId",
- "name": "string",
- "dataTypeHint": "string"
}
], - "filter": {
- "type": "or",
- "restrictions": [
- {
- "type": "or",
- "restrictions": "{}"
}
]
}, - "limitBy": {
- "limitedTo": 0,
- "per": [ ],
- "sortedBy": [ ]
}, - "offset": "string",
- "sort": [ ],
- "rowsPerPage": 20
}, - "visualisation": {
- "colors": [
- "#202f0c"
], - "xAxisColumnIndex": null,
- "forceOrdinal": false,
- "showAllXAxisLabels": false,
- "type": "line",
- "yMin": 10,
- "yMax": 10
}
}
]
}
}
Delete an analytics dashboard.
Rights
hashId required | string Example: 7usgt |
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/analytics/panel/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Update an analytics dashboard
Rights
hashId required | string Example: 7usgt |
Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
Api-Version required | integer Example: 5 |
title | string |
Array of objects | |
Array of objects |
{- "title": "My dashboard",
- "layout": [
- {
- "x": 5,
- "y": 0,
- "width": 2,
- "height": 4
}
], - "cards": [
- {
- "title": "My widget",
- "subtitle": "My widget description",
- "query": {
- "source": "pinGroup",
- "columns": [
- {
- "field": "pinGroup.hashId",
- "name": "string",
- "dataTypeHint": "string"
}
], - "filter": {
- "type": "or",
- "restrictions": [
- {
- "type": "or",
- "restrictions": "{}"
}
]
}, - "limitBy": {
- "limitedTo": 0,
- "per": [ ],
- "sortedBy": [ ]
}, - "offset": "string",
- "sort": [ ],
- "rowsPerPage": 20
}, - "visualisation": {
- "colors": [
- "#202f0c"
], - "xAxisColumnIndex": null,
- "forceOrdinal": false,
- "showAllXAxisLabels": false,
- "type": "line",
- "yMin": 10,
- "yMax": 10
}
}
]
}
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
}, - "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"
}
], - "nodes": [
- {
- "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",
- "measurementsExpirationDays": 365,
- "enforceTwoFactorAuthentication": false,
- "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"
}
}, - "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "environmentRights": [
- "STATIC",
- "USERS"
], - "userEnvironmentSettings": {
- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt"
}
}
Get the measurement data for one or more time series for a specified period
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/chart/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "series": [
- {
- "pinHashId": "e13d57",
- "quantityHashId": "sajia1",
- "measurements": [
- {
- "hashId": "po177",
- "generatedAt": "2019-12-31T15:23Z",
- "channelIndex": 0,
- "channelMeasurementIndex": 0,
- "reportHashId": "qoa978",
- "pinHashId": "e13d57",
- "orderOfMagnitude": -3,
- "significand": -1500,
- "performance": 0
}
]
}
]
}
Get the chart panel for a pinGroup, grid, edge or pin
Rights
object or object or object or 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/chart/panel \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "lastMode": "automatic",
- "charts": {
- "automatic": [
- {
- "title": null,
- "series": [
- {
- "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}, - "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "nodeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}, - "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "color": "#ff0000",
- "pinThreshold": {
- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "hashId": "tap192",
- "pinHashId": "e13d57"
}
}
]
}
], - "manual": [
- {
- "title": null,
- "series": [
- {
- "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}, - "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "nodeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}, - "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "color": "#ff0000",
- "pinThreshold": {
- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "hashId": "tap192",
- "pinHashId": "e13d57"
}
}
]
}
]
}
}
Update a chart panel
Rights
object or object or object or object |
Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
Api-Version required | integer Example: 5 |
lastMode | string Enum: "manual" "automatic" |
Array of objects |
{- "lastMode": "manual",
- "manualCharts": [
- {
- "title": null,
- "series": [
- {
- "quantityHashId": "sajia1",
- "pinHashId": "e13d57",
- "color": "#ff0000"
}
]
}
]
}
Get multiple chart panels from pinGroups and 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/chart/panels \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "pinGroups": [
- {
- "hashId": "dao97",
- "panel": {
- "lastMode": "automatic",
- "charts": {
- "automatic": [
- {
- "title": null,
- "series": [
- {
- "quantity": {
- "hashId": null,
- "name": null,
- "color": null,
- "unit": null,
- "defaultOrderOfMagnitude": null,
- "defaultCriticallyLowThreshold": null,
- "defaultLowThreshold": null,
- "defaultHighThreshold": null,
- "defaultCriticallyHighThreshold": null,
- "disableSiPrefixes": null
}, - "pin": {
- "hashId": null,
- "pinGroupHashId": null,
- "name": null,
- "fields": { },
- "deviceFields": { },
- "level": null,
- "edgeHashId": null,
- "nodeHashId": null,
- "typeKey": null,
- "deletedAt": null
}, - "pinGroup": {
- "hashId": null,
- "geometry": { },
- "name": null,
- "symbolKey": null,
- "deviceFields": { },
- "fields": { },
- "deviceLinkHashId": null,
- "level": null,
- "mapLayer": null,
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "color": "#ff0000",
- "pinThreshold": {
- "criticallyLow": null,
- "low": null,
- "high": null,
- "criticallyHigh": null,
- "hashId": null,
- "pinHashId": null
}
}
]
}
], - "manual": [
- {
- "title": null,
- "series": [
- {
- "quantity": {
- "hashId": null,
- "name": null,
- "color": null,
- "unit": null,
- "defaultOrderOfMagnitude": null,
- "defaultCriticallyLowThreshold": null,
- "defaultLowThreshold": null,
- "defaultHighThreshold": null,
- "defaultCriticallyHighThreshold": null,
- "disableSiPrefixes": null
}, - "pin": {
- "hashId": null,
- "pinGroupHashId": null,
- "name": null,
- "fields": { },
- "deviceFields": { },
- "level": null,
- "edgeHashId": null,
- "nodeHashId": null,
- "typeKey": null,
- "deletedAt": null
}, - "pinGroup": {
- "hashId": null,
- "geometry": { },
- "name": null,
- "symbolKey": null,
- "deviceFields": { },
- "fields": { },
- "deviceLinkHashId": null,
- "level": null,
- "mapLayer": null,
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "color": "#ff0000",
- "pinThreshold": {
- "criticallyLow": null,
- "low": null,
- "high": null,
- "criticallyHigh": null,
- "hashId": null,
- "pinHashId": null
}
}
]
}
]
}
}
}
], - "pins": [
- {
- "hashId": "e13d57",
- "panel": {
- "lastMode": "automatic",
- "charts": {
- "automatic": [
- {
- "title": null,
- "series": [
- {
- "quantity": {
- "hashId": null,
- "name": null,
- "color": null,
- "unit": null,
- "defaultOrderOfMagnitude": null,
- "defaultCriticallyLowThreshold": null,
- "defaultLowThreshold": null,
- "defaultHighThreshold": null,
- "defaultCriticallyHighThreshold": null,
- "disableSiPrefixes": null
}, - "pin": {
- "hashId": null,
- "pinGroupHashId": null,
- "name": null,
- "fields": { },
- "deviceFields": { },
- "level": null,
- "edgeHashId": null,
- "nodeHashId": null,
- "typeKey": null,
- "deletedAt": null
}, - "pinGroup": {
- "hashId": null,
- "geometry": { },
- "name": null,
- "symbolKey": null,
- "deviceFields": { },
- "fields": { },
- "deviceLinkHashId": null,
- "level": null,
- "mapLayer": null,
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "color": "#ff0000",
- "pinThreshold": {
- "criticallyLow": null,
- "low": null,
- "high": null,
- "criticallyHigh": null,
- "hashId": null,
- "pinHashId": null
}
}
]
}
], - "manual": [
- {
- "title": null,
- "series": [
- {
- "quantity": {
- "hashId": null,
- "name": null,
- "color": null,
- "unit": null,
- "defaultOrderOfMagnitude": null,
- "defaultCriticallyLowThreshold": null,
- "defaultLowThreshold": null,
- "defaultHighThreshold": null,
- "defaultCriticallyHighThreshold": null,
- "disableSiPrefixes": null
}, - "pin": {
- "hashId": null,
- "pinGroupHashId": null,
- "name": null,
- "fields": { },
- "deviceFields": { },
- "level": null,
- "edgeHashId": null,
- "nodeHashId": null,
- "typeKey": null,
- "deletedAt": null
}, - "pinGroup": {
- "hashId": null,
- "geometry": { },
- "name": null,
- "symbolKey": null,
- "deviceFields": { },
- "fields": { },
- "deviceLinkHashId": null,
- "level": null,
- "mapLayer": null,
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "color": "#ff0000",
- "pinThreshold": {
- "criticallyLow": null,
- "low": null,
- "high": null,
- "criticallyHigh": null,
- "hashId": null,
- "pinHashId": null
}
}
]
}
]
}
}
}
]
}
Update multiple chart panels
Rights
Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
Api-Version required | integer Example: 5 |
Array of objects | |
Array of objects |
{- "pinGroups": [
- {
- "hashId": "dao97",
- "panel": {
- "lastMode": "manual",
- "manualCharts": [
- {
- "title": null,
- "series": [
- {
- "quantityHashId": "sajia1",
- "pinHashId": "e13d57",
- "color": "#ff0000"
}
]
}
]
}
}
], - "pins": [
- {
- "hashId": "e13d57",
- "panel": {
- "lastMode": "manual",
- "manualCharts": [
- {
- "title": null,
- "series": [
- {
- "quantityHashId": "sajia1",
- "pinHashId": "e13d57",
- "color": "#ff0000"
}
]
}
]
}
}
]
}
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 non-empty |
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> [ items <float > ] Default: [] The device channels for which this command is relevant. See commandType.channelSelect for allowed values. |
email required | Array of strings <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,
- "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 |
{- "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",
- "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "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",
- "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 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) 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"
}
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 non-empty |
{- "claimTokens": [
- "aklasjkl13a23"
]
}
{- "devices": [
- {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "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 non-empty |
{- "hashIds": [
- "aklasjkl13a23"
]
}
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",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": null,
- "color": null
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}, - "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}
}
]
}
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 |
{- "deviceHashIds": [
- "j1iha9"
]
}
{- "claimTokens": [
- {
- "deviceHashId": "j1iha9",
- "claimToken": "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",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}, - "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "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",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}
}
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 |
{- "pinGroupHashId": "dao97",
- "channelMapping": [
- {
- "channel": 0,
- "pinHashId": "e13d57",
- "deviceFields": { }
}
]
}
{- "device": {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}, - "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 non-empty |
{- "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 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 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 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 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). |
Array of objects | |
commandTypeHashIds required | Array of strings 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 insetad 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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": null,
- "color": null
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}
}
]
}
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": {
- "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}, - "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": "#ff00ff",
- "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
}
]
}
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) See the chapter on open fields on how to use this | |
Array of objects (updatableFieldConfigurations) See the chapter on open fields on how to use this | |
Array of objects 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 | |
commandTypeHashIds | Array of strings 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 insetad 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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "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"
}
], - "nodes": [
- {
- "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",
- "measurementsExpirationDays": 365,
- "enforceTwoFactorAuthentication": false,
- "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"
}
}, - "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "environmentRights": [
- "STATIC",
- "USERS"
], - "userEnvironmentSettings": {
- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt"
}
}
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"
}
], - "nodes": [
- {
- "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",
- "measurementsExpirationDays": 365,
- "enforceTwoFactorAuthentication": false,
- "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"
}
}, - "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "environmentRights": [
- "STATIC",
- "USERS"
], - "userEnvironmentSettings": {
- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt"
}
}
]
}
Rights
Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
Api-Version required | integer Example: 5 |
name | string |
Array of objects (mapLayer) non-empty | |
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 |
measurementsExpirationDays | integer [ 1 .. 9999 ] |
enforceTwoFactorAuthentication | boolean Describes if users need to have two factor authentication enabled in order to access this environment. |
object 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"
}
}
], - "nodes": [
- {
- "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",
- "measurementsExpirationDays": 365,
- "enforceTwoFactorAuthentication": false,
- "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"
}
}
}
{- "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"
}
], - "nodes": [
- {
- "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",
- "measurementsExpirationDays": 365,
- "enforceTwoFactorAuthentication": false,
- "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"
}
}, - "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"
}
], - "nodes": [
- {
- "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",
- "measurementsExpirationDays": 365,
- "enforceTwoFactorAuthentication": false,
- "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"
}
}, - "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "environmentRights": [
- "STATIC",
- "USERS"
], - "userEnvironmentSettings": {
- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt"
}
}
Create an edge
Rights
Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
Api-Version required | integer Example: 5 |
nodeHashIds required | Array of strings or null [ 1 .. 2 ] items The first node is assumed to correspond with the first coordinate in the geometry of the edge, and the second one to the last. If null, a node is created. If only one node is supplied, it is assumed to be both start and end point. |
required | object |
fields required | object How form fields should be sent to the server when creating them. |
properties | any deprecated |
mapLayer | string |
photo | string Should be a dataurl |
{- "geometry": {
- "type": "MultiLineString",
- "coordinates": [
- [
- [
- -180,
- -180
], - [
- -180,
- -180
]
]
]
}, - "fields": {
- "id": "My line"
}, - "properties": null,
- "mapLayer": "string",
- "photo": "string"
}
{- "hashId": "ka08d",
- "edge": {
- "hashId": "ka08d",
- "node1HashId": "qp111a",
- "node2HashId": "qp111a",
- "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",
- "node1HashId": "qp111a",
- "node2HashId": "qp111a",
- "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 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 Should be a dataurl |
pinGroupHashIds | Array of strings Default: [] Determines the set (and the order) of the pin groups in the grid |
{- "fields": {
- "id": "My grid"
}, - "photo": "string",
- "pinGroupHashIds": [ ]
}
{- "hashId": "naud51",
- "grid": {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}
}
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
}
]
}
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 Should be a dataurl |
pinHashIds | Array of strings Default: [] Determines the set (and the order) of the pins in the grid |
{- "fields": {
- "id": "My grid"
}, - "photo": "string",
- "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 Should be a dataurl |
pinGroupHashIds | Array of strings Default: [] Determines the set (and the order) of the pin groups in the grid |
{- "fields": {
- "id": "My grid"
}, - "photo": "string",
- "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 Should be a dataurl |
gridHashIds | Array of strings 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": "string",
- "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "device": {
- "hashId": "j1iha9",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}
}
]
}
Create a node
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. |
{- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "fields": {
- "id": "My node"
}
}
{- "hashId": "qp111a",
- "node": {
- "hashId": "qp111a",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My node",
- "fields": {
- "id": "My node"
}, - "gridHashId": "naud52",
- "deletedAt": null
}
}
Search through nodes
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/node \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "nextPageOffset": null,
- "rows": [
- {
- "node": {
- "hashId": "qp111a",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My node",
- "fields": {
- "id": "My node"
}, - "gridHashId": "naud52",
- "deletedAt": null
}
}
]
}
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 |
{- "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",
- "nodeHashId": "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",
- "node1HashId": "qp111a",
- "node2HashId": "qp111a",
- "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",
- "nodeHashId": "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "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
}, - "hashId": "tap192",
- "pinHashId": "e13d57"
}, - "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}
}
],
}
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 |
nodeHashIds | Array of strings = 2 items The first node is assumed to correspond with the first coordinate in the geometry of the edge, and the second one to the last. If not supplied, it is not updated, unless formerly the edge had a MultiLineString geometry, then 2 new nodes are created. |
object | |
photo | string or null Should be a dataurl. Null clears the photo |
{- "fields": { },
- "mapLayer": "string",
- "geometry": {
- "type": "MultiLineString",
- "coordinates": [
- [
- [
- -180,
- -180
], - [
- -180,
- -180
]
]
]
}, - "photo": "string"
}
{- "edge": {
- "hashId": "ka08d",
- "node1HashId": "qp111a",
- "node2HashId": "qp111a",
- "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}'
Get a specific grid 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/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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "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 Should be a dataurl. Null clears the photo |
pinGroupHashIds | Array of strings Determines the set (and the order) of the pin groups in the grid |
{- "fields": { },
- "photo": "string",
- "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}
], - "lastReports": [
- {
- "pinGroupHashId": "dao97",
- "generatedAt": "2019-12-31T15:23Z"
}
]
}
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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "pins": [
- {
- "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "nodeHashId": "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",
- "node1HashId": "qp111a",
- "node2HashId": "qp111a",
- "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",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}, - "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
}, - "hashId": "tap192",
- "pinHashId": "e13d57"
}, - "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}
}
], - "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 Should be a dataurl. Null clears the photo |
gridHashIds | Array of strings 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-rect",
- "geometry": {
- "type": "Point",
- "coordinates": [
- -180,
- -180
]
}, - "fields": { },
- "mapLayer": "string",
- "deviceFields": { },
- "photo": "string",
- "gridHashIds": [
- "string"
], - "gridName": "string"
}
{- "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "grids": [
- {
- "hashId": "naud51",
- "typeKey": "pinGroup",
- "name": "My grid",
- "fields": {
- "id": "My grid"
}, - "deletedAt": null
}
]
}
Delete a node.
Rights
hashId required | string Example: qp111a |
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/node/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
Get a specific node identified by its hashId
Rights
hashId required | string Example: qp111a |
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/node/{hashId} \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "node": {
- "hashId": "qp111a",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My node",
- "fields": {
- "id": "My node"
}, - "gridHashId": "naud52",
- "deletedAt": null
}, - "edges": [
- {
- "hashId": "ka08d",
- "node1HashId": "qp111a",
- "node2HashId": "qp111a",
- "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
}
]
}
Updates a specific node
Rights
hashId required | string Example: qp111a |
Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
Api-Version required | integer Example: 5 |
object | |
object or (Array of objects or objects) (fieldsToServerUpdate) How form fields should be sent to the server when updating them. |
{- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "fields": { }
}
{- "node": {
- "hashId": "qp111a",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My node",
- "fields": {
- "id": "My node"
}, - "gridHashId": "naud52",
- "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",
- "nodeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}, - "edges": [
- {
- "hashId": "ka08d",
- "node1HashId": "qp111a",
- "node2HashId": "qp111a",
- "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
}, - "hashId": "tap192",
- "pinHashId": "e13d57"
}, - "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}
}
]
}
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 |
{- "fields": { },
- "edgeHashId": "ka08d",
- "pinGridsHashIds": [
- "string"
]
}
{- "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "nodeHashId": "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 geoemtries 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 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",
- "nodeHashId": "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",
- "nodeHashId": "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 Should be a dataurl. Null clears the photo |
pinHashIds | Array of strings Determines the set (and the order) of the pins in the grid |
{- "fields": { },
- "photo": "string",
- "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",
- "nodeHashId": "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "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 Should be a dataurl. Null clears the photo |
pinGroupHashIds | Array of strings Determines the set (and the order) of the pin groups in the grid |
{- "fields": { },
- "photo": "string",
- "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "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
}, - "measurements": {
- "good": 10,
- "serious": 10,
- "critical": 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": "#ff00ff",
- "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
}, - "pinThreshold": {
- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "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}'
null
Subscribe 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 |
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": [
- "The provided XLSX file is malformed"
], - "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 wihtin 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": [
- "The provided XLSX file is malformed"
], - "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}'
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 |
closeIssue | boolean Default: false |
{- "comment": "This looks serious.",
- "closeIssue": false
}
{- "newComments": [
- {
- "comment": {
- "hashId": "a9hhi0",
- "userHashId": "b45zo0",
- "comment": "This looks serious.",
- "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 an issue
Rights
Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
Api-Version required | integer Example: 5 |
Array of objects [ 1 .. 20 ] items | |
assignedUserHashId | string or null |
pinGroupHashId | string |
pinHashIds | Array of strings When empty, all pins are affected |
(object or null) or (object or null) | |
title required | string <= 100 characters |
level required | number <float> Enum: 0 1 2 |
typeKey | string Enum: "missing" "incorrect" "unexpected" "unrelated" |
comment required | string <= 65536 characters |
quantityHashIds | Array of strings <= 10 items |
labelHashIds | Array of strings <= 10 items Default: [] |
startAt | string <date-time> |
endAt | string or null <date-time> |
{- "links": [
- {
- "pinGroupHashId": "dao97",
- "pinHashId": null
}
], - "assignedUserHashId": "string",
- "pinGroupHashId": [
- "dao97"
], - "pinHashIds": [
- "e13d57"
], - "automation": null,
- "title": "Temperature is too high",
- "level": 0,
- "typeKey": "missing",
- "comment": "This looks serious.",
- "quantityHashIds": [
- "string"
], - "labelHashIds": [
- "u98a24"
], - "startAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z"
}
{- "hashId": "c19aid",
- "mentionedUsers": [
- {
- "hashId": "ba5qq1",
- "name": "Jane Doe"
}
]
}
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,
- "typeKey": "missing",
- "startAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z",
- "closedAt": null,
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "subscribed": false,
- "links": [
- {
- "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "nodeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}
}
]
}
]
}
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,
- "typeKey": "missing",
- "startAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z",
- "closedAt": null,
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "userName": "John Doe",
- "assignedUserName": null,
- "quantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}
], - "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "pins": [
- {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "nodeHashId": "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.",
- "createdAt": "2019-12-31T15:23Z",
- "updatedAt": "2019-12-31T15:23Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "userName": "John Doe"
}
], - "subscribed": false,
- "links": [
- {
- "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "nodeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}
}
]
}
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 |
Array of objects [ 1 .. 20 ] items | |
title | string <= 100 characters |
pinGroupHashId | string |
pinHashIds | Array of strings When empty, all pins are affected |
(object or null) or (object or null) | |
assignedUserHashId | string or null |
pinHashId | string or null |
quantityHashIds | Array of strings <= 10 items |
labelHashIds | Array of strings <= 10 items |
closed | boolean |
level | number <float> Enum: 0 1 2 |
typeKey | string Enum: "missing" "incorrect" "unexpected" "unrelated" |
startAt | string <date-time> |
endAt | string or null <date-time> |
{- "links": [
- {
- "pinGroupHashId": "dao97",
- "pinHashId": null
}
], - "title": "Temperature is too high",
- "pinGroupHashId": "string",
- "pinHashIds": [
- "string"
], - "automation": {
- "type": "missing"
}, - "assignedUserHashId": "string",
- "pinHashId": "string",
- "quantityHashIds": [
- "string"
], - "labelHashIds": [
- "string"
], - "closed": true,
- "level": 0,
- "typeKey": "missing",
- "startAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z"
}
{- "newComment": {
- "hashId": "a9hhi0",
- "userHashId": "b45zo0",
- "comment": "This looks serious.",
- "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
}
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.",
- "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"
}
]
}
]
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,
- "deviceTypeHashId": 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": {
- "deviceTypeHashId": "xd2rd4",
- "priorityLevel": "1",
- "missedReports": "12",
- "offlineForSeconds": "1800"
}, - "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": null,
- "color": null
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}
}
]
}
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}$ #, 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}$ #, followed by six hexadecimal characters |
{- "name": "string",
- "color": "string"
}
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": {
- "hashId": "po177",
- "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 |
edgeFieldKeys | Array of strings |
{- "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",
- "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}
], - "quantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}
], - "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 |
edgeFieldKeys | Array of strings |
{- "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
}
}
}
]
}
Sets issue triggers (thresholds) on a specific quantitity 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 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 Default: "#ff00ff" |
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) | |
disableSiPrefixes | boolean Default: false Will disable SI-prefixes for this quantity if true |
deviceQuantityHashIds | Array of strings Device quantities, linked to this quantity |
{- "name": "untranslated string",
- "color": "#ff00ff",
- "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,
- "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",
- "deletedAt": null
}
], - "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}, - "linkedSupplierQuantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}
]
}
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 |
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) | |
disableSiPrefixes | boolean Will disable SI-prefixes for this quantity |
deviceQuantityHashIds | Array of strings Device quantities, linked to this quantity |
{- "name": "untranslated string",
- "color": "#ff00ff",
- "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,
- "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": "#ff00ff",
- "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
}, - "environmentQuantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}
}
]
}
Put all measurements of the source quantity on the target quantity (asynchronously) and remove the source quantity (synchronously). This cannot be reverted!
Rights
Connectivity environment: ENVIRONMENT_ADMIN
Monitoring environment: ENVIRONMENT_ADMIN
sourceQuantityHashId required | string Example: sajia1 |
Environment-Hash-Id required | string Example: yourAssetEnvironmentHashId |
Api-Version required | integer Example: 5 |
targetQuantityHashId required | string |
{- "targetQuantityHashId": "sajia1"
}
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 |
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": [
- {
- "report": {
- "hashId": "qoa978",
- "deviceHashId": "j1iha9",
- "reportTypeHashId": "l19a7s",
- "reportTypeType": "human",
- "generatedAt": "2019-12-31T15:23Z"
}, - "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "reportTypeName": "Temperature and inclination"
}
]
}
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": {
- "hashId": "po177",
- "generatedAt": "2019-12-31T15:23Z",
- "channelIndex": 0,
- "channelMeasurementIndex": 0,
- "reportHashId": "qoa978",
- "pinHashId": "e13d57",
- "orderOfMagnitude": -3,
- "significand": -1500,
- "performance": 0
}, - "quantityHashId": "sajia1"
}
], - "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}, - "deviceHashId": "j1iha9",
- "fields": {
- "id": "My report"
}, - "type": {
- "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",
- "deletedAt": null
}, - "quantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}
], - "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 or objects | |
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": [
- {
- "measurementHashId": "po177",
- "generatedAt": "2019-12-31T15:23Z",
- "orderOfMagnitude": -3,
- "significand": -1400,
- "doNotCompareToThresholds": true
}
], - "fields": { }
}
{- "fields": {
- "id": "My report"
}
}
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 |
{- "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": "#ff00ff"
}
]
}
{- "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",
- "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",
- "deletedAt": null
}, - "quantities": [
- {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}
]
}
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 |
{- "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": "#ff00ff"
}
]
}
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 |
delimiter required | string Enum: "," ";" |
rowDelimiter required | string Enum: "\n" "\r\n" |
{- "content": {
- "type": "measurementFilter",
- "measurementFilterHashId": "k8gh3"
}, - "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": {
- "type": "all",
- "staticOnly": false,
- "gridHashId": null,
- "from": "2019-12-01T00:00Z",
- "to": "2020-01-01T00:00Z"
}, - "delimiter": ",",
- "rowDelimiter": "\n",
- "status": "available",
- "createdAt": "2019-12-31T15:23Z"
}
}
]
}
Send email with feedback
Api-Version required | integer Example: 5 |
theme | string or null <= 255 characters |
feedback required | string <= 1000 characters |
{- "theme": "Email theme",
- "feedback": "Text with feedback about withthegrid"
}
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"
}
], - "nodes": [
- {
- "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",
- "measurementsExpirationDays": 365,
- "enforceTwoFactorAuthentication": false,
- "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"
}
}, - "expiresAt": null,
- "createdAt": "2019-12-31T15:23Z"
}, - "environmentRights": [
- "STATIC",
- "USERS"
], - "userEnvironmentSettings": {
- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt"
}, - "user": {
- "hashId": "b45zo0",
- "email": "info@acme.com",
- "name": "John Doe",
- "timezone": "Europe/Amsterdam",
- "locale": "en",
- "phone": "string",
- "company": "string",
- "rights": [
- "STATIC",
- "USERS"
], - "twoFactorAuthenticationEnabled": true
}
}
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"
}
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 autmatically subscribed to new issues. |
defaultAnalyticsPanelHashId | string or null |
{- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt"
}
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,
- "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}'
Get suggestions for field of type, filtered by search
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/suggestions/ \ -H 'Accept: text/json' \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
{- "results": [
- "Installed v1.1.0-rc4",
- "Installed v1.1.0-rc5",
- "Installed v1.1.0-rc6"
]
}
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,
- "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,
- "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. |
object or null |
{- "name": "My connectivity environment",
- "enforceTwoFactorAuthentication": false,
- "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,
- "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",
- "supplierHashId": "f1a4w1",
- "supplierDeviceIdentifier": "390044000351352237353037",
- "deviceTypeHashId": "wasd2",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": null,
- "color": null
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}
}
]
}
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",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}, - "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}, - "activity": {
- "hashId": "2ad91p",
- "rootActivityHashId": "2ad91p",
- "createdAt": "2019-12-31T15:23Z",
- "triggerType": "dropCommand",
- "failed": false,
- "log": [
- {
- "type": "log",
- "message": "Debug information: [..]",
- "lineNumber": 0,
- "columnNumber": 0
}
], - "triggerData": {
- "command": {
- "hashId": "ga9741s",
- "deviceHashId": "j1iha9",
- "commandTypeHashId": "x18a92",
- "fields": { },
- "pinGroupHashId": "dao97",
- "userHashId": "b45zo0",
- "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"
}
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"
}
Checks whether user entered correct code from authenticator app and enables 2FA for user. The existing JWT cannot be used in the Authorization header anymore, instead the returned JWT must be used.
Api-Version required | integer Example: 5 |
code required | string <= 255 characters |
{- "code": "123456"
}
{- "jwt": "a1234"
}
Generates a secret and keyuri for user to set up 2FA
Api-Version required | integer Example: 5 |
password required | string |
{- "password": "imapassword"
}
{- "keyuri": "iamkeyuri",
- "secret": "iamsecret"
}
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 See the getting started section about rights |
{- "name": "John Doe",
- "email": "info@acme.com",
- "rights": [
- "STATIC",
- "USERS"
]
}
{- "hashId": "b45zo0"
}
Search through users wihtin a monitoring environment or a connectivity 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/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
}, - "rights": [
- "STATIC",
- "USERS"
]
}
]
}
Delete a user from a monitoring environment or a 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 |
# You can also use wget curl -X DELETE https://api.withthegrid.com/user/{hashId} \ -H 'Environment-Hash-Id: yourAssetEnvironmentHashId' \ -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}'
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
}, - "rights": [
- "STATIC",
- "USERS"
]
}
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 See the getting started section about rights |
{- "rights": [
- "STATIC",
- "USERS"
]
}
hashId required | string |
title required | string <= 100 characters |
Array of objects Default: [] | |
required | Array of objects |
{- "hashId": "j1iha9",
- "title": "My dashboard",
- "layout": [ ],
- "cards": [
- {
- "title": "My widget",
- "subtitle": "My widget description",
- "query": {
- "source": "pinGroup",
- "columns": [
- {
- "field": "pinGroup.hashId",
- "name": "string",
- "dataTypeHint": "string"
}
], - "filter": {
- "type": "or",
- "restrictions": [
- {
- "type": "or",
- "restrictions": "{}"
}
]
}, - "limitBy": {
- "limitedTo": 0,
- "per": [ ],
- "sortedBy": [ ]
}, - "offset": "string",
- "sort": [ ],
- "rowsPerPage": 20
}, - "visualisation": {
- "colors": [
- "#202f0c"
], - "xAxisColumnIndex": null,
- "forceOrdinal": false,
- "showAllXAxisLabels": false,
- "type": "line",
- "yMin": 10,
- "yMax": 10
}
}
]
}
source required | string |
required | Array of objects or objects or objects or objects |
object | |
object | |
offset | string |
Array of objects | |
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,
- "per": [ ],
- "sortedBy": [ ]
}, - "offset": "string",
- "sort": [ ],
- "rowsPerPage": 20
}
colors required | Array of strings |
xAxisColumnIndex required | integer or null |
forceOrdinal required | boolean |
showAllXAxisLabels | boolean Default: false |
type required | string Enum: "line" "scatter" |
yMin | number or null <float> |
yMax | number or null <float> |
{- "type": "table"
}
title required | string or null |
required | Array of objects |
{- "title": null,
- "series": [
- {
- "quantity": {
- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}, - "pin": {
- "hashId": "e13d57",
- "pinGroupHashId": "dao97",
- "name": "My port",
- "fields": {
- "id": "My port"
}, - "deviceFields": { },
- "level": 0,
- "edgeHashId": "string",
- "nodeHashId": "string",
- "typeKey": "string",
- "deletedAt": "2019-12-31T15:23Z"
}, - "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,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}, - "color": "#ff0000",
- "pinThreshold": {
- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "hashId": "tap192",
- "pinHashId": "e13d57"
}
}
]
}
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 |
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> [ items <float > ] The device channels for which this command is relevant. See commandType.channelSelect for allowed values. |
Array of strings or null <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",
- "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 |
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 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 Should be unique within the connectivity environment |
deviceTypeHashId required | string |
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",
- "fields": { },
- "measurementCycle": null,
- "nextReportBefore": "2019-12-31T15:25Z",
- "lastOnlineAt": "2019-12-31T15:23Z",
- "validated": true,
- "userFacingIdentifier": "Field value"
}
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 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 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 |
required | Array of objects |
commandTypeHashIds required | Array of strings 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 |
{- "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",
- "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
]
}
], - "charts": [
- {
- "title": "untranslated string",
- "series": [
- {
- "channelIndex": 0,
- "quantityHashId": "x18a92",
- "color": "#ff00ff"
}
]
}
], - "commandTypeHashIds": [
- "x18a92"
], - "identifierFieldKey": "fieldKey"
}
hashId required | string |
node1HashId required | string or null |
node2HashId required | string or null |
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 an 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",
- "node1HashId": "qp111a",
- "node2HashId": "qp111a",
- "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) non-empty |
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 |
measurementsExpirationDays required | integer [ 1 .. 9999 ] |
enforceTwoFactorAuthentication required | boolean Determines whether users need to have two factor authentication enabled in order to access this environment. |
object 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"
}
], - "nodes": [
- {
- "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",
- "measurementsExpirationDays": 365,
- "enforceTwoFactorAuthentication": false,
- "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"
}
}, - "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" |
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",
- "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" "deleted" |
downloadUrl | string Only available at status available |
createdAt required | string <date-time> |
{- "hashId": "maay1",
- "content": {
- "type": "all",
- "staticOnly": false,
- "gridHashId": null,
- "from": "2019-12-01T00:00Z",
- "to": "2020-01-01T00:00Z"
}, - "delimiter": ",",
- "rowDelimiter": "\n",
- "status": "available",
- "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: "node" "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 or null |
level required | integer Enum: 0 1 2 |
typeKey | string Enum: "missing" "incorrect" "unexpected" "unrelated" |
startAt | string <date-time> |
endAt | string or null <date-time> If null, the issue is still open |
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,
- "typeKey": "missing",
- "startAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z",
- "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 |
createdAt required | string <date-time> |
updatedAt required | string <date-time> |
deletedAt | string or null <date-time> |
{- "hashId": "a9hhi0",
- "userHashId": "b45zo0",
- "comment": "This looks serious.",
- "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}$ #, 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"
}
hashId required | string |
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 |
{- "hashId": "po177",
- "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) |
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
}, - "hashId": "tap192",
- "pinHashId": "e13d57"
}
hashId required | string |
required | object |
name required | string |
fields required | object The field configuration is stored in the fieldConfigurations key of the monitoring environment object |
gridHashId required | string |
deletedAt required | string or null <date-time> |
{- "hashId": "qp111a",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My node",
- "fields": {
- "id": "My node"
}, - "gridHashId": "naud52",
- "deletedAt": null
}
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 an no critical open issues, 2: one or more critical open issues |
edgeHashId | string or null |
nodeHashId | 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",
- "nodeHashId": "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 an 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": "dao97",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 4.884707950517225,
- 52.37502141913572
]
}, - "name": "My location",
- "symbolKey": "cp-pole",
- "deviceFields": { },
- "fields": {
- "id": "My location"
}, - "deviceLinkHashId": null,
- "level": 0,
- "mapLayer": "myLayer",
- "mostRecentMeasurementAt": null,
- "deletedAt": null
}
hashId required | string |
required | untranslatedString (string) or translations (object) (stringOrTranslations) |
color required | string |
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) | |
disableSiPrefixes | boolean Default: false Will disable SI-prefixes for this quantity if true |
{- "hashId": "sajia1",
- "name": "untranslated string",
- "color": "#ff00ff",
- "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
}
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. |
object or null | |
createdAt required | string <date-time> |
{- "hashId": "f1a4w1",
- "name": "My connectivity environment",
- "enforceTwoFactorAuthentication": false,
- "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 |
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) |
{- "criticallyLow": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "low": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "high": {
- "orderOfMagnitude": 0,
- "significand": 1500
}, - "criticallyHigh": {
- "orderOfMagnitude": 0,
- "significand": 1500
}
}
object or string | |
object or string |
{- "en": {
- "plural": "string",
- "singular": "string"
}, - "nl": {
- "plural": "string",
- "singular": "string"
}
}
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 required | Array of strings See the getting started section about rights |
twoFactorAuthenticationEnabled required | boolean or null Is true if user has 2FA enabled |
{- "hashId": "b45zo0",
- "email": "info@acme.com",
- "name": "John Doe",
- "timezone": "Europe/Amsterdam",
- "locale": "en",
- "phone": "string",
- "company": "string",
- "rights": [
- "STATIC",
- "USERS"
], - "twoFactorAuthenticationEnabled": true
}
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 autmatically subscribed to new issues. |
defaultAnalyticsPanelHashId required | string or null |
{- "notificationLevel": 0,
- "defaultAnalyticsPanelHashId": "7usgt"
}
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.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"
}
}
}
}