platform-sdk (8)

Download OpenAPI specification:Download

Getting started

Introduction

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.

Environment types

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:

  • manage the provisioning of their devices by means of HTTPS webhooks or client certificates (through CoAP over DTLS or HTTPS)
  • define event handlers in TypeScript that parse incoming payloads into condition reports, return instructions to devices (including FOTA) and monitor device health.
  • monitor activity of your devices
  • Generate claim tokens to share with the customer so they can securely claim the devices in their monitoring environment.

Rights & Routes

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.

Headers

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).

Schemas

Some objects in requests or responses are used multiple times. Those are extracted as models and listed separately under the schemas section.

Sdk

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);
});

Hashids

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.

Form fields

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

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.

Analytics

addPanel

Create an analytics dashboard

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
title
required
string
Array of objects
Default: []
required
Array of objects

Responses

Request samples

Content type
text/json
{
  • "title": "My dashboard",
  • "layout": [ ],
  • "cards": [
    ]
}

Response samples

Content type
text/json
{
  • "hashId": "7usgt"
}

findPanel

Search through analytics dashboards

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

find

Get the results for an analytics dashboard

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object (analyticsQuery)

An object describing an analytics query.

header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

getPanel

Get a specific analytics dashboard identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: 7usgt
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "panel": {
    }
}

deletePanel

Delete an analytics dashboard.

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: 7usgt
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

updatePanel

Update an analytics dashboard

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: 7usgt
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
title
string
Array of objects
Array of objects

Responses

Request samples

Content type
text/json
{
  • "title": "My dashboard",
  • "layout": [
    ],
  • "cards": [
    ]
}

Login

machineLogin

Acquire a JSON web token that can be used to perform authenticated requests. The jwt expiration is typically 30 days.

header Parameters
Api-Version
required
integer
Example: 5
Request Body schema: text/json
assertion
required
string

Is provided when you create a machine account (also called an API account)

Responses

Request samples

Content type
text/json
{
  • "assertion": "12as:7d6a4123"
}

Response samples

Content type
text/json
{
  • "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpcCI6InJvYkB3aXRodGhlZ3JpZC5jb20iLCJpA9qiOjE1Nzc3MTA5NjksImV4cCI6MTU4MDMwMjk2OSwiaXNzIjoid2l0aHRoZWdyaWQifQ.7PbwwsWU7x63Pd-J_KZQL22r185GfiufixyXQGOyQs8",
  • "user": {
    },
  • "environment": {
    },
  • "environmentRights": [
    ],
  • "userEnvironmentSettings": {
    }
}

Chart

get

Get the measurement data for one or more time series for a specified period

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "series": [
    ]
}

getPanel

Get the chart panel for a pinGroup, grid, edge or pin

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object or object or object or object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "lastMode": "automatic",
  • "charts": {
    }
}

updatePanel

Update a chart panel

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
query Parameters
object or object or object or object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
lastMode
string
Enum: "manual" "automatic"
Array of objects

Responses

Request samples

Content type
text/json
{
  • "lastMode": "manual",
  • "manualCharts": [
    ]
}

getPanels

Get multiple chart panels from pinGroups and grids

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "pinGroups": [
    ],
  • "pins": [
    ]
}

updatePanels

Update multiple chart panels

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
Array of objects
Array of objects

Responses

Request samples

Content type
text/json
{
  • "pinGroups": [
    ],
  • "pins": [
    ]
}

Command

add

Add a command that should be sent to a specific device

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: SENSORS

Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "objectType": "device",
  • "objectHashIds": [
    ],
  • "commandTypeHashId": "x18a92",
  • "fields": {
    },
  • "startAt": "2019-12-31T15:23Z",
  • "delay": 0,
  • "endAt": null,
  • "channelIndices": [ ],
  • "email": [ ]
}

deleteMulti

Delete multiple commands. Will return an array showing which commands were deleted or not.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: SENSORS

Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
hashIds
required
Array of strings

Responses

Request samples

Content type
text/json
{
  • "hashIds": [
    ]
}

Response samples

Content type
text/json
[
  • {
    }
]

find

Search through commands

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: READ

Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

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

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: ga9741s
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific command identified by its hashId

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: READ

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: ga9741s
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "command": {
    },
  • "commandType": {
    },
  • "createdByUserName": "John Doe"
}

Command-type

add

Create a command type that can be sent to devices

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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.

Responses

Request samples

Content type
text/json
{
  • "name": "untranslated string",
  • "start": "required",
  • "end": "required",
  • "fieldConfigurations": [
    ],
  • "channelSelect": "single",
  • "environmentAccess": "full"
}

Response samples

Content type
text/json
{
  • "hashId": "x18a92"
}

find

Search through command types

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: READ

Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Delete a command type.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: x18a92
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific command type identified by its hashId

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: READ

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: x18a92
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "commandType": {
    }
}

update

Update a command type.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: x18a92
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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.

Responses

Request samples

Content type
text/json
{
  • "name": "untranslated string",
  • "start": "required",
  • "end": "required",
  • "fieldConfigurations": [
    ],
  • "channelSelect": "single",
  • "environmentAccess": "full"
}

Device

claim

Add one or more devices to this monitoring environment by providing their claim tokens. This invalidates the claim token

Rights

  • Monitoring environment: SENSORS
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
claimTokens
required
Array of strings non-empty

Responses

Request samples

Content type
text/json
{
  • "claimTokens": [
    ]
}

Response samples

Content type
text/json
{
  • "devices": [
    ]
}

delete

Delete one or more devices. If a device is claimed by a monitoring environment, it cannot be deleted.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
hashIds
required
Array of strings non-empty

Responses

Request samples

Content type
text/json
{
  • "hashIds": [
    ]
}

find

Search through devices

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: READ

Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

getClaimToken

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

Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
deviceHashIds
required
Array of strings

Responses

Request samples

Content type
text/json
{
  • "deviceHashIds": [
    ]
}

Response samples

Content type
text/json
{
  • "claimTokens": [
    ]
}

get

Get a specific device identified by its hashId

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: READ

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: j1iha9
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "device": {
    },
  • "deviceType": {
    },
  • "environmentName": "My monitoring environment",
  • "environmentHashId": "f1a4w1",
  • "pinGroup": {
    }
}

update

Update a device.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: j1iha9
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
required
object or (Array of objects or objects) (fieldsToServerUpdate)

How form fields should be sent to the server when updating them.

Responses

Request samples

Content type
text/json
{
  • "fields": { }
}

Response samples

Content type
text/json
{
  • "device": {
    }
}

link

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

  • Monitoring environment: SENSORS
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: j1iha9
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
pinGroupHashId
required
string
required
Array of objects

Responses

Request samples

Content type
text/json
{
  • "pinGroupHashId": "dao97",
  • "channelMapping": [
    ]
}

Response samples

Content type
text/json
{
  • "device": {
    },
  • "deviceType": {
    },
  • "measurementCycle": null,
  • "nextReportBefore": "2019-12-31T15:25Z"
}

unclaim

Remove one or more devices from this monitoring environment. Only use this if you want to return the device to the supplier

Rights

  • Monitoring environment: SENSORS
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
hashIds
required
Array of strings non-empty

Responses

Request samples

Content type
text/json
{
  • "hashIds": [
    ]
}

unlink

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

  • Monitoring environment: SENSORS
Authorizations:
jwt-token
path Parameters
deviceHashId
required
string
Example: j1iha9
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}' \

Device-type

add

Add a new device type.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "name": "untranslated string",
  • "eventHandler": "[omitted]",
  • "fieldConfigurations": [
    ],
  • "pinGroupFieldConfigurations": [
    ],
  • "channels": [
    ],
  • "charts": [
    ],
  • "commandTypeHashIds": [
    ],
  • "identifierFieldKey": "deviceFormFieldKey"
}

Response samples

Content type
text/json
{
  • "hashId": "wasd2",
  • "subscriptionHashId": "string"
}

find

Search through device types within a supplier, or within devices registered by client

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: READ

Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Delete a device type. All devices of this device type do no longer get access to the application!

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: wasd2
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific device type identified by its hashId

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: wasd2
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "deviceType": {
    },
  • "eventHandler": "[omitted]",
  • "commandTypes": [
    ],
  • "subscriptionHashId": "string",
  • "chartQuantities": [
    ]
}

update

Update the settings of a device type.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: wasd2
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "name": "untranslated string",
  • "eventHandler": "string",
  • "fieldConfigurations": [
    ],
  • "pinGroupFieldConfigurations": [
    ],
  • "channels": [
    ],
  • "charts": [
    ],
  • "commandTypeHashIds": [
    ],
  • "identifierFieldKey": "deviceFormFieldKey"
}

Environment

add

Create a monitoring environment

Authorizations:
jwt-token
header Parameters
Api-Version
required
integer
Example: 5
Request Body schema: text/json
name
required
string <= 255 characters

Responses

Request samples

Content type
text/json
{
  • "name": "My monitoring environment"
}

Response samples

Content type
text/json
{
  • "environment": {
    },
  • "environmentRights": [
    ],
  • "userEnvironmentSettings": {
    }
}

delete

Delete a monitoring environment. No user can access it afterwards.

Rights

  • Monitoring environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

find

Search through monitoring environments. Not useful for machine accounts, as they only have access to a single monitoring environment

Authorizations:
jwt-token
query Parameters
object
header Parameters
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

update

Rights

  • Monitoring environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "name": "My monitoring environment",
  • "mapLayers": [],
  • "fieldConfigurations": {
    },
  • "locale": "en",
  • "defaultGraphRange": "30d",
  • "measurementsExpirationDays": 365,
  • "enforceTwoFactorAuthentication": false,
  • "theme": {
    }
}

Response samples

Content type
text/json
{
  • "environment": {
    }
}

get

Get a specific monitoring environment identified by its hashId

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: f1a4w1
header Parameters
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "environment": {
    },
  • "environmentRights": [
    ],
  • "userEnvironmentSettings": {
    }
}

Graph

addEdge

Create an edge

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
Any of
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

Responses

Request samples

Content type
text/json
{
  • "geometry": {
    },
  • "fields": {
    },
  • "properties": null,
  • "mapLayer": "string",
  • "photo": "string"
}

Response samples

Content type
text/json
{
  • "hashId": "ka08d",
  • "edge": {
    }
}

findEdge

Search through edges

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

addGrid

Create a pin group grid

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "fields": {
    },
  • "photo": "string",
  • "pinGroupHashIds": [ ]
}

Response samples

Content type
text/json
{
  • "hashId": "naud51",
  • "grid": {
    }
}

findGrid

Search through grids

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

addPinGrid

Create a pin grid

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "fields": {
    },
  • "photo": "string",
  • "pinHashIds": [ ]
}

Response samples

Content type
text/json
{
  • "hashId": "naud51",
  • "grid": {
    }
}

addPinGroupGrid

Create a pin group grid

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "fields": {
    },
  • "photo": "string",
  • "pinGroupHashIds": [ ]
}

Response samples

Content type
text/json
{
  • "hashId": "naud51",
  • "grid": {
    }
}

addPinGroup

Create a pin group

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "symbolKey": "cp-pole",
  • "geometry": {
    },
  • "fields": {
    },
  • "mapLayer": "string",
  • "photo": "string",
  • "gridHashIds": [
    ],
  • "gridName": "string"
}

Response samples

Content type
text/json
{
  • "hashId": "dao97",
  • "pinGroup": {
    }
}

findPinGroup

Search through pin groups

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

addNode

Create a node

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
required
object
fields
required
object

How form fields should be sent to the server when creating them.

Responses

Request samples

Content type
text/json
{
  • "geometry": {
    },
  • "fields": {
    }
}

Response samples

Content type
text/json
{
  • "hashId": "qp111a",
  • "node": {
    }
}

findNode

Search through nodes

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

addPin

Create a pin within a pin group

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
pinGroupHashId
required
string
Example: dao97
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "fields": {
    },
  • "typeKey": "string",
  • "edgeHashId": "ka08d",
  • "pinGridsHashIds": [
    ]
}

Response samples

Content type
text/json
{
  • "pin": {
    },
  • "grids": [
    ]
}

deleteEdge

Delete an edge.

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: ka08d
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

getEdge

Get a specific edge identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: ka08d
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "edge": {
    },
  • "pins": [
    ],
  • "pinGroups": [
    ],
  • "measurementCycles": [ ],
  • "nextReportBefore": [
    ],
  • "thresholds": [
    ],
}

updateEdge

Updates a specific edge

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: ka08d
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
Any of
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

Responses

Request samples

Content type
text/json
{
  • "fields": { },
  • "mapLayer": "string",
  • "geometry": {
    },
  • "photo": "string"
}

Response samples

Content type
text/json
{
  • "edge": {
    }
}

deleteGrid

Delete a grid.

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: naud51
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

getGrid

Get a specific grid identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: naud51
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "grid": {
    },
  • "pinGroups": [
    ],
  • "lastReports": [
    ],
  • "notificationLevel": 0,
}

updateGrid

Updates a specific grid

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: naud51
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "fields": { },
  • "photo": "string",
  • "pinGroupHashIds": [
    ]
}

Response samples

Content type
text/json
{
  • "grid": {
    },
  • "pinGroups": [
    ],
  • "lastReports": [
    ]
}

deletePinGroup

Delete a pin group.

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: dao97
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

getPinGroup

Get a specific pin group identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: dao97
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "pinGroup": {
    },
  • "pins": [
    ],
  • "edges": [
    ],
  • "device": {
    },
  • "deviceType": {
    },
  • "channelMapping": [
    ],
  • "measurementCycle": null,
  • "thresholds": [
    ],
  • "nextReportBefore": "2019-12-31T15:25Z",
  • "grids": [
    ]
}

updatePinGroup

Updates a specific pin group

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: dao97
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "symbolKey": "cp-rect",
  • "geometry": {
    },
  • "fields": { },
  • "mapLayer": "string",
  • "deviceFields": { },
  • "photo": "string",
  • "gridHashIds": [
    ],
  • "gridName": "string"
}

Response samples

Content type
text/json
{
  • "pinGroup": {
    },
  • "grids": [
    ]
}

deleteNode

Delete a node.

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: qp111a
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

getNode

Get a specific node identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: qp111a
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "node": {
    },
  • "edges": [
    ]
}

updateNode

Updates a specific node

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: qp111a
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
object
object or (Array of objects or objects) (fieldsToServerUpdate)

How form fields should be sent to the server when updating them.

Responses

Request samples

Content type
text/json
{
  • "geometry": {
    },
  • "fields": { }
}

Response samples

Content type
text/json
{
  • "node": {
    }
}

deletePin

Delete a pin.

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: e13d57
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

getPin

Get a specific pin identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: e13d57
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "pin": {
    },
  • "edges": [
    ],
  • "thresholds": [
    ]
}

updatePin

Updates a specific pin

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: e13d57
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "fields": { },
  • "edgeHashId": "ka08d",
  • "pinGridsHashIds": [
    ]
}

Response samples

Content type
text/json
{
  • "pin": {
    },
  • "grids": [
    ]
}

find

Search through pinGroups, edges and pinGroup-grids

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

updateLocations

Updates the geoemtries of one or more nodes, pin groups and or edges

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
Array
Any of
type
required
string
Value: "pinGroup"
hashId
required
string
required
object or null

Responses

Request samples

Content type
text/json
[
  • {
    }
]

findPin

Search through pins

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

getPinGrid

Get a specific grid of type pin identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: naud51
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "grid": {
    },
  • "pins": [
    ],
}

updatePinGrid

Updates a specific grid of type pin

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: naud51
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "fields": { },
  • "photo": "string",
  • "pinHashIds": [
    ]
}

Response samples

Content type
text/json
{
  • "grid": {
    },
  • "pins": [
    ]
}

getPinGroupGrid

Get a specific grid of type pinGroup identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: naud51
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "grid": {
    },
  • "pinGroups": [
    ],
  • "lastReports": [
    ],
  • "notificationLevel": 0,
}

updatePinGroupGrid

Updates a specific grid

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: naud51
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "fields": { },
  • "photo": "string",
  • "pinGroupHashIds": [
    ]
}

Response samples

Content type
text/json
{
  • "grid": {
    },
  • "pinGroups": [
    ],
  • "lastReports": [
    ]
}

getPinGroupPerformance

Get the performance of a device linked to a specific pin group identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: dao97
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
[
  • {
    }
]

getPinQuantities

Get a specific pin quantities by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
pinHashId
required
string
Example: e13d57
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "rows": [
    ]
}

getTile

Get a mapbox vector tile of the edges, nodes and pin groups within the provided bounding box.

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
x
required
integer
Example: 4207
y
required
integer
Example: 2693
z
required
integer
Example: 13
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
null

setNotification

Subscribe to or unsubscribe from new issues created on pin groups in this specific grid

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: naud51
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "level": 0
}

updatePinGroups

Updates pin groups

Rights

  • Monitoring environment: STATIC
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
hashIds
required
Array of strings
object

Responses

Request samples

Content type
text/json
{
  • "hashIds": [
    ],
  • "mapLayer": {
    }
}

Import

generateTemplate

Generates an import template

Rights

  • Monitoring environment: IMPORT
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "pinGroupHashIds": [
    ],
  • "pinGroupGridHashIds": [
    ],
  • "reportTypeHashIds": [
    ]
}

Response samples

Content type
text/json
{}

add

Uploads an import file

Rights

  • Monitoring environment: IMPORT
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
dataUrl
required
name
string

The filename including extension

Responses

Request samples

Content type
text/json
{
  • "dataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
  • "name": "red-dot.png"
}

Response samples

Content type
text/json
{
  • "importRequest": {
    },
  • "createdByUserName": "John Doe"
}

find

Search through imports wihtin a monitoring environment

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: USERS

Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Deletes an import

Rights

  • Monitoring environment: IMPORT
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: 5x2znek

The hashId of the import to be deleted

header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Issue

addComment

Add a comment to a specific issue

Rights

  • Monitoring environment: ISSUES
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: a9hhi0

Identifies the issue to comment on

header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
comment
required
string <= 65536 characters
closeIssue
boolean
Default: false

Responses

Request samples

Content type
text/json
{
  • "comment": "This looks serious.",
  • "closeIssue": false
}

Response samples

Content type
text/json
{
  • "newComments": [
    ],
  • "mentionedUsers": [
    ]
}

add

Create an issue

Rights

  • Monitoring environment: ISSUES
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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>

Responses

Request samples

Content type
text/json
{
  • "links": [
    ],
  • "assignedUserHashId": "string",
  • "pinGroupHashId": [
    ],
  • "pinHashIds": [
    ],
  • "automation": null,
  • "title": "Temperature is too high",
  • "level": 0,
  • "typeKey": "missing",
  • "comment": "This looks serious.",
  • "quantityHashIds": [
    ],
  • "labelHashIds": [
    ],
  • "startAt": "2019-08-24T14:15:22Z",
  • "endAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
text/json
{
  • "hashId": "c19aid",
  • "mentionedUsers": [
    ]
}

find

Search through issues

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Delete an issue.

Rights

  • Monitoring environment: ISSUES
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: c19aid
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific issue identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: c19aid
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "issue": {
    },
  • "userName": "John Doe",
  • "assignedUserName": null,
  • "quantities": [
    ],
  • "mentionedUsers": [
    ],
  • "pinGroup": {
    },
  • "pins": [
    ],
  • "automation": {
    },
  • "labels": [
    ],
  • "comments": [
    ],
  • "subscribed": false,
  • "links": [
    ]
}

update

Change the settings of a specific issue

Rights

  • Monitoring environment: ISSUES
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: c19aid
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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>

Responses

Request samples

Content type
text/json
{
  • "links": [
    ],
  • "title": "Temperature is too high",
  • "pinGroupHashId": "string",
  • "pinHashIds": [
    ],
  • "automation": {
    },
  • "assignedUserHashId": "string",
  • "pinHashId": "string",
  • "quantityHashIds": [
    ],
  • "labelHashIds": [
    ],
  • "closed": true,
  • "level": 0,
  • "typeKey": "missing",
  • "startAt": "2019-08-24T14:15:22Z",
  • "endAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
text/json
{
  • "newComment": {
    },
  • "newCommentUserName": "John Doe",
  • "newCommentMentionedUsers": [
    ]
}

setSubscription

Subscribe to or unsubscribe from a specific issue

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: c19aid
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
subscribed
required
boolean

Responses

Request samples

Content type
text/json
{
  • "subscribed": true
}

Issue-comment

delete

Delete a comment on an issue (if it is yours).

Rights

  • Monitoring environment: ISSUES
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: a9hhi0
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Update a comment on an issue (if it is yours)

Rights

  • Monitoring environment: ISSUES
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: a9hhi0
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
comment
required
string <= 65536 characters

Responses

Request samples

Content type
text/json
{
  • "comment": "This looks serious."
}

Response samples

Content type
text/json
[
  • {
    }
]

Connectivity-threshold

set

Creates or updates a connectivity threshold.

Rights

  • Monitoring environment: THRESHOLDS
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
object or null

Responses

Request samples

Content type
text/json
{
  • "connectivityThreshold": {
    }
}

find

Returns all found connectivity thresholds for an environment.

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

Label

add

Create a label

Rights

  • Monitoring environment: ISSUES
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
name
required
string <= 255 characters
color
required
string^#[a-fA-F\d]{6}$

#, followed by six hexadecimal characters

Responses

Request samples

Content type
text/json
{
  • "name": "Fix this month",
  • "color": "#ff0000"
}

Response samples

Content type
text/json
{
  • "hashId": "u98a24"
}

find

Search through labels

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Delete a label.

Rights

  • Monitoring environment: ISSUES
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: u98a24
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

update

Rights

  • Monitoring environment: ISSUES
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: u98a24
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
name
string <= 255 characters
color
string^#[a-fA-F\d]{6}$

#, followed by six hexadecimal characters

Responses

Request samples

Content type
text/json
{
  • "name": "string",
  • "color": "string"
}

get

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: xd2rd4
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "hashId": "xd2rd4",
  • "name": "My label",
  • "color": "#ff0000"
}

Measurement

find

Search through measurements

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

Measurement-filter

add

Add a measurement filter

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "name": "North",
  • "description": "Temperatures in the North",
  • "period": "lastMonth",
  • "includePinsWithoutReports": true,
  • "reportTypeHashIds": [
    ],
  • "gridHashId": "string",
  • "pinGroupHashIds": [
    ],
  • "quantityHashIds": [
    ],
  • "fieldKeys": [
    ],
  • "pinFieldKeys": [
    ],
  • "edgeFieldKeys": [
    ]
}

Response samples

Content type
text/json
{
  • "hashId": "k8gh3"
}

find

Search through measurement filters

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Delete a measurement filter.

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: k8gh3
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific measurement filter identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: k8gh3
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "measurementFilter": {
    },
  • "reportTypes": [
    ],
  • "grid": {
    },
  • "pinGroups": [
    ],
  • "quantities": [
    ],
  • "fieldKeys": [
    ],
  • "pinFieldKeys": [
    ],
  • "edgeFieldKeys": [
    ]
}

update

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: k8gh3
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "name": "South",
  • "description": "string",
  • "period": "lastMonth",
  • "includePinsWithoutReports": true,
  • "reportTypeHashIds": [
    ],
  • "gridHashId": "string",
  • "pinGroupHashIds": [
    ],
  • "quantityHashIds": [
    ],
  • "fieldKeys": [
    ],
  • "pinFieldKeys": [
    ],
  • "edgeFieldKeys": [
    ]
}

Measurement-threshold

find

Search through measurement thresholds on environment and pin level

Rights

  • Monitoring environment: THRESHOLDS
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

set

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

  • Monitoring environment: THRESHOLDS
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
Any of
pinHashId
required
string
quantityHashId
required
string
required
object or null

Responses

Request samples

Content type
text/json
[ ]

Response samples

Content type
text/json
{
  • "hashId": "tap192"
}

Quantity

add

Add a quantity

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: ENVIRONMENT_ADMIN

Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "name": "untranslated string",
  • "color": "#ff00ff",
  • "unit": "K",
  • "defaultOrderOfMagnitude": 3,
  • "defaultCriticallyLowThreshold": {
    },
  • "defaultLowThreshold": {
    },
  • "defaultHighThreshold": {
    },
  • "defaultCriticallyHighThreshold": {
    },
  • "disableSiPrefixes": true,
  • "deviceQuantityHashIds": [
    ]
}

Response samples

Content type
text/json
{
  • "hashId": "sajia1"
}

delete

Delete a quantity.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: ENVIRONMENT_ADMIN

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: sajia1
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific quantity identified by its hashId

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: READ

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: sajia1
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "reportTypes": [
    ],
  • "quantity": {
    },
  • "linkedSupplierQuantities": [
    ]
}

update

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: ENVIRONMENT_ADMIN

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: sajia1
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "name": "untranslated string",
  • "color": "#ff00ff",
  • "unit": "K",
  • "defaultOrderOfMagnitude": 3,
  • "defaultCriticallyLowThreshold": {
    },
  • "defaultLowThreshold": {
    },
  • "defaultHighThreshold": {
    },
  • "defaultCriticallyHighThreshold": {
    },
  • "disableSiPrefixes": true,
  • "deviceQuantityHashIds": [
    ]
}

find

Search through quantities

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: READ

Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

merge

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

Authorizations:
jwt-token
path Parameters
sourceQuantityHashId
required
string
Example: sajia1
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
targetQuantityHashId
required
string

Responses

Request samples

Content type
text/json
{
  • "targetQuantityHashId": "sajia1"
}

Report

add

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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.

Responses

Request samples

Content type
text/json
{
  • "generatedAt": "2019-12-31T15:23Z",
  • "measurements": [
    ],
  • "reportTypeHashId": "l19a7s",
  • "pinGroupHashId": "dao97",
  • "fields": {
    }
}

Response samples

Content type
text/json
{
  • "hashId": "qoa978",
  • "fields": {
    }
}

find

Search through reports

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Delete a report.

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: qoa978
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific report identified by its hashId

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: qoa978
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "hashId": "qoa978",
  • "observations": [
    ],
  • "deviceType": {
    },
  • "deviceHashId": "j1iha9",
  • "fields": {
    },
  • "type": {
    },
  • "quantities": [
    ],
  • "pinGroupHashId": "dao97",
  • "userName": null,
  • "generatedAt": "2019-12-31T15:23Z",
  • "createdAt": "2019-12-31T15:23Z"
}

update

Rights

  • Monitoring environment: REPORTS
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: qoa978
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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.

Responses

Request samples

Content type
text/json
{
  • "generatedAt": "2019-12-31T15:23Z",
  • "measurements": [
    ],
  • "fields": { }
}

Response samples

Content type
text/json
{
  • "fields": {
    }
}

Report-type

add

Add a report type for human reports.

Rights

  • Monitoring environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
name
required
string
required
object

See the chapter on open fields on how to use this

required
Array of objects or objects

Responses

Request samples

Content type
text/json
{
  • "name": "Temperature",
  • "fieldConfigurations": {
    },
  • "quantities": [
    ]
}

Response samples

Content type
text/json
{
  • "hashId": "l19a7s"
}

find

Search through report types

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Delete a report type.

Rights

  • Monitoring environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: l19a7s
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

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

  • Monitoring environment: READ
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: l19a7s
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "reportType": {
    },
  • "quantities": [
    ]
}

update

Update a report type for human reports.

Rights

  • Monitoring environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: l19a7s
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
name
string
object

See the chapter on open fields on how to use this

Array of objects or objects

Responses

Request samples

Content type
text/json
{
  • "name": "Temperature",
  • "fieldConfigurations": {
    },
  • "quantities": [
    ]
}

Settings

addExport

Request the creation of a zip file containing a data export

Rights

  • Monitoring environment: EXPORT
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
required
object or object or object or object
delimiter
required
string
Enum: "," ";"
rowDelimiter
required
string
Enum: "\n" "\r\n"

Responses

Request samples

Content type
text/json
{
  • "content": {
    },
  • "delimiter": ",",
  • "rowDelimiter": "\n"
}

Response samples

Content type
text/json
{
  • "hashId": "maay1"
}

findExportRequest

Search through export requests

Rights

  • Monitoring environment: EXPORT
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{}

feedback

Send email with feedback

Authorizations:
jwt-token
header Parameters
Api-Version
required
integer
Example: 5
Request Body schema: text/json
theme
string or null <= 255 characters
feedback
required
string <= 1000 characters

Responses

Request samples

Content type
text/json
{
  • "theme": "Email theme",
  • "feedback": "Text with feedback about withthegrid"
}

findLog

Search the audit log

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: AUDIT_TRAIL

Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

get

Get information about the logged in user

Authorizations:
jwt-token
header Parameters
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "environment": {
    },
  • "environmentRights": [
    ],
  • "userEnvironmentSettings": {
    },
  • "user": {
    }
}

update

Update the settings of this user

Authorizations:
jwt-token
header Parameters
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "name": "Jane Doe",
  • "password": "stringst",
  • "locale": "en",
  • "timezone": "string",
  • "phone": "string",
  • "company": "string"
}

updateUserEnvironmentSettings

Update the environment settings of this user

Rights

  • Monitoring environment: READ
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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

Responses

Request samples

Content type
text/json
{
  • "notificationLevel": 0,
  • "defaultAnalyticsPanelHashId": "7usgt"
}

Subscription

add

Subscribe to alerts on objects (currently all of supplier type)

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
objectType
required
string
Enum: "supplierReportType" "deviceType" "supplierWebhook" "supplierCertificate"
objectHashId
required
string

Responses

Request samples

Content type
text/json
{
  • "objectType": "deviceType",
  • "objectHashId": "wasd2"
}

Response samples

Content type
text/json
{
  • "hashId": "dfa1p"
}

find

Search through connectivity environments. Not useful for machine accounts, as they only have access to a single connectivity environment

Authorizations:
jwt-token
query Parameters
object
header Parameters
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Delete a subscription.

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: l19a7s
header Parameters
Api-Version
required
integer
Example: 5

Responses

Request samples


# You can also use wget
curl -X DELETE https://api.withthegrid.com/subscription/{hashId} \
  -H 'Api-Version: 5' \
  -H 'Authorization: Bearer {access-token}'

Suggestions

find

Get suggestions for field of type, filtered by search

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: READ

Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "results": [
    ]
}

Supplier

add

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

Authorizations:
jwt-token
header Parameters
Api-Version
required
integer
Example: 5
Request Body schema: text/json
name
required
string

Responses

Request samples

Content type
text/json
{
  • "name": "My connectivity environment"
}

Response samples

Content type
text/json
{
  • "supplier": {
    },
  • "supplierRights": [
    ]
}

delete

Delete a connectivity environment. No user can access it afterwards.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

find

Search through connectivity environments. Not useful for machine accounts, as they only have access to a single connectivity environment

Authorizations:
jwt-token
query Parameters
object
header Parameters
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

update

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
name
string
enforceTwoFactorAuthentication
boolean

Describes if users need to have two factor authentication enabled in order to access this environment.

object or null

Responses

Request samples

Content type
text/json
{
  • "name": "My connectivity environment",
  • "enforceTwoFactorAuthentication": false,
  • "theme": {
    }
}

get

Get a specific connectivity environment identified by its hashId

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: f1a4w1
header Parameters
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "supplier": {
    },
  • "supplierRights": [
    ]
}

Supplier-activity

find

Search through activity in the connectivity environment

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

get

Get a specific activity in the connectivity environment

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: 2ad91p
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "device": {
    },
  • "deviceType": {
    },
  • "activity": {
    }
}

Supplier-certificate

add

Add a certificate to the connectivity environment that can be used to create device client certificates.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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"

Responses

Request samples

Content type
text/json
{
  • "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}"
}

Response samples

Content type
text/json
{
  • "hashId": "v19a12",
  • "certificate": "-----BEGIN CERTIFICATE-----\nMIIBNzCB3gIBATAKBggqhkjOPQQDAjAkMREwDwYDVQQKDAhzdXBwbGllcjEPMA0G\nA1UEAwwGeGQycmQ0MB4XDTIwMDIyNDEzNTQwOVoXDTIxMDIyMzEzNTQwOVowLDEP\nMA0GA1UECgwGZGV2aWNlMRkwFwYDVQQDDBB1bnFpZSBpZGVudGlmaWVyMFkwEwYH\nKoZIzj0CAQYIKoZIzj0DAQcDQgAEUPyQwLuDlKw7CA41ADhxXRvD3n9ZFF0XCeI9\nOAgRIgl2mGmnO31wX1DD4weZoB2pswCBrC39FpyHgIz6LK10PzAKBggqhkjOPQQD\nAgNIADBFAiEAyz0Ha4eFfebqSoES4vxguipSHmR/zN8KjEEie7xpqo8CICFS5NWG\niaT6xhGfChGbQjpmQQYYabau8Ons8F2JNyLu\n-----END CERTIFICATE-----\n",
  • "subscriptionHashId": "string"
}

find

Search through certificates

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

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

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: v19a12
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific certificate identified by its hashId

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: f1a4w1
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "certificate": {
    },
  • "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

Update the properties of a certificate.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: v19a12
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
identifier
string <= 1000000 characters

A javascript function that returns deviceType and identifier. See the chapter "User defined code"

Responses

Request samples

Content type
text/json
{
  • "identifier": "string"
}

Supplier-report-type

add

Create a report type that devices can send in

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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"

Responses

Request samples

Content type
text/json
{
  • "name": "untranslated string",
  • "fieldConfigurations": {
    },
  • "parser": "[omitted]"
}

Response samples

Content type
text/json
{
  • "hashId": "y124as",
  • "subscriptionHashId": "string"
}

find

Search through device report types

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Delete a device report type.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: y124as
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific device report type identified by its hashId

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: y124as
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "reportType": {
    },
  • "parser": "[omitted]",
  • "subscriptionHashId": "string"
}

update

Update a device report type.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: y124as
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
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.

Responses

Request samples

Content type
text/json
{
  • "name": "untranslated string",
  • "fieldConfigurations": {
    },
  • "parser": "[omitted]",
  • "retryFailedSince": "2019-08-24T14:15:22Z"
}

Supplier-webhook

add

Add a webhook to the connectivity environment.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
name
required
string <= 255 characters
identifier
required
string <= 1000000 characters

A javascript function that returns deviceType and identifier. See the chapter "User defined code"

Responses

Request samples

Content type
text/json
{
  • "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}"
}

Response samples

Content type
text/json
{}

find

Search through webhooks

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{}

delete

Delete a webhook from a connectivity environment.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: z812a63
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific webhook identified by its hashId

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: f1a4w1
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "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}",
  • "subscriptionHashId": "string"
}

update

Update the properties of a webhook.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: v19a12
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
name
string
identifier
string <= 1000000 characters

A javascript function that returns deviceType and identifier. See the chapter "User defined code"

Responses

Request samples

Content type
text/json
{
  • "name": "My webhook",
  • "identifier": "string"
}

Two-factor-authentication

enable

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.

Authorizations:
jwt-token
header Parameters
Api-Version
required
integer
Example: 5
Request Body schema: text/json
code
required
string <= 255 characters

Responses

Request samples

Content type
text/json
{
  • "code": "123456"
}

Response samples

Content type
text/json
{
  • "jwt": "a1234"
}

disable

Turns off 2FA for user

Authorizations:
jwt-token
header Parameters
Api-Version
required
integer
Example: 5
Request Body schema: text/json
password
required
string

Responses

Request samples

Content type
text/json
{
  • "password": "imapassword"
}

getKeyuri

Generates a secret and keyuri for user to set up 2FA

Authorizations:
jwt-token
header Parameters
Api-Version
required
integer
Example: 5
Request Body schema: text/json
password
required
string

Responses

Request samples

Content type
text/json
{
  • "password": "imapassword"
}

Response samples

Content type
text/json
{
  • "keyuri": "iamkeyuri",
  • "secret": "iamsecret"
}

User

add

Add a user to a monitoring environment or a connectivity environment.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: USERS

Authorizations:
jwt-token
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
name
required
string <= 255 characters
email
required
string <email>
rights
required
Array of strings

See the getting started section about rights

Responses

Request samples

Content type
text/json
{
  • "name": "John Doe",
  • "email": "info@acme.com",
  • "rights": [
    ]
}

Response samples

Content type
text/json
{
  • "hashId": "b45zo0"
}

find

Search through users wihtin a monitoring environment or a connectivity environment

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: USERS

Authorizations:
jwt-token
query Parameters
object
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "nextPageOffset": null,
  • "rows": [
    ]
}

delete

Delete a user from a monitoring environment or a connectivity environment.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: USERS

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: b45zo0
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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

Get a specific user identified by its hashId

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: USERS

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: b45zo0
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5

Responses

Request samples


# 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}'

Response samples

Content type
text/json
{
  • "user": {
    },
  • "rights": [
    ]
}

update

Update the rights of a user for this monitoring environment or connectivity environment.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

  • Monitoring environment: USERS

Authorizations:
jwt-token
path Parameters
hashId
required
string
Example: b45zo0
header Parameters
Environment-Hash-Id
required
string
Example: yourAssetEnvironmentHashId
Api-Version
required
integer
Example: 5
Request Body schema: text/json
rights
required
Array of strings

See the getting started section about rights

Responses

Request samples

Content type
text/json
{
  • "rights": [
    ]
}

Schemas

analyticsPanel

hashId
required
string
title
required
string <= 100 characters
Array of objects
Default: []
required
Array of objects
{
  • "hashId": "j1iha9",
  • "title": "My dashboard",
  • "layout": [ ],
  • "cards": [
    ]
}

analyticsQuery

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": [
    ],
  • "filter": {
    },
  • "limitBy": {
    },
  • "offset": "string",
  • "sort": [ ],
  • "rowsPerPage": 20
}

analyticsVisualisation

Any of
Any of
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"
}

chart

title
required
string or null
required
Array of objects
{
  • "title": null,
  • "series": [
    ]
}

command

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.

email
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": [
    ],
  • "email": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "sentAt": "2019-12-31T15:23Z"
}

commandType

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": [
    ],
  • "channelSelect": "off",
  • "environmentAccess": "none"
}

device

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"
}

deviceType

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": [
    ],
  • "pinGroupFieldConfigurations": [
    ],
  • "channels": [
    ],
  • "charts": [
    ],
  • "commandTypeHashIds": [
    ],
  • "identifierFieldKey": "fieldKey"
}

edge

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": [
    ],
  • "name": "My line",
  • "fields": {
    },
  • "level": 0,
  • "mapLayer": "myLayer",
  • "mostRecentMeasurementAt": null,
  • "deletedAt": null
}

environment

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": [],
  • "boundingBox": {
    },
  • "fieldConfigurations": {
    },
  • "locale": "en",
  • "defaultGraphRange": "30d",
  • "measurementsExpirationDays": 365,
  • "enforceTwoFactorAuthentication": false,
  • "theme": {
    },
  • "expiresAt": null,
  • "createdAt": "2019-12-31T15:23Z"
}

environmentReportType

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": {
    },
  • "type": "human",
  • "deletedAt": null
}

exportRequest

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>
{}

fieldToServerFull

Any of
Any of
boolean

The values that can be stored in a form field

Example
true

fieldsToServerUpdate

Any of
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.

{ }

fileFromServer

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>
{}

fileToServer

dataUrl
required
name
string

The filename including extension

{
  • "dataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
  • "name": "red-dot.png"
}

grid

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": {
    },
  • "deletedAt": null
}

issue

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"
}

issueComment

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"
}

label

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"
}

log

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"
}

mapLayer

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.

{}

measurement

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
}

measurementFilter

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"
}

measurementThreshold

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": {
    },
  • "low": {
    },
  • "high": {
    },
  • "criticallyHigh": {
    },
  • "hashId": "tap192",
  • "pinHashId": "e13d57"
}

node

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": {
    },
  • "name": "My node",
  • "fields": {
    },
  • "gridHashId": "naud52",
  • "deletedAt": null
}

pin

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": {
    },
  • "deviceFields": { },
  • "level": 0,
  • "edgeHashId": "string",
  • "nodeHashId": "string",
  • "typeKey": "string",
  • "deletedAt": "2019-12-31T15:23Z"
}

pinGroup

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": {
    },
  • "name": "My location",
  • "symbolKey": "cp-pole",
  • "deviceFields": { },
  • "fields": {
    },
  • "deviceLinkHashId": null,
  • "level": 0,
  • "mapLayer": "myLayer",
  • "mostRecentMeasurementAt": null,
  • "deletedAt": null
}

quantity

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": {
    },
  • "defaultLowThreshold": {
    },
  • "defaultHighThreshold": {
    },
  • "defaultCriticallyHighThreshold": {
    },
  • "disableSiPrefixes": true
}

siNumber

orderOfMagnitude
required
integer [ -128 .. 127 ]
significand
required
integer [ -2147483648 .. 2147483647 ]
{
  • "orderOfMagnitude": 0,
  • "significand": 1500
}

stringOrTranslations

Any of
string (untranslatedString)
Example
"untranslated string"

supplier

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": {
    },
  • "createdAt": "2019-12-31T15:23Z"
}

supplierCertificate

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"
}

supplierReportType

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": {
    },
  • "deletedAt": null
}

supplierWebhook

hashId
required
string
name
required
string <= 255 characters
createdAt
required
string <date-time>
{
  • "hashId": "z812a63",
  • "name": "My webhook",
  • "createdAt": "2019-12-31T15:23Z"
}

threshold

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": {
    },
  • "low": {
    },
  • "high": {
    },
  • "criticallyHigh": {
    }
}

translations

object or string
object or string
{
  • "en": {
    },
  • "nl": {
    }
}

untranslatedString

string (untranslatedString)
"untranslated string"

updatableFieldConfigurations

Array
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.

[
  • {
    }
]

user

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": [
    ],
  • "twoFactorAuthenticationEnabled": true
}

userEnvironmentSettings

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"
}

userSubscription

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"
}

webRequest

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": {
    },
  • "response": {
    }
}