diff --git a/docs/index.html b/docs/index.html index 53846d54..8fc918a9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2268,7 +2268,7 @@ -
Headers -H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' -

Response samples

Content type
text/json
{}

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

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

findLog

Search the audit log

+

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

    @@ -3986,7 +3975,7 @@

    Headers

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

Responses

Request samples

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/settings/log \
@@ -3995,22 +3984,35 @@ 

Headers

-H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' -

Response samples

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

updateUserEnvironmentSettings

Update the environment settings of this user

+

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)

+

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

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/subscription/ \
@@ -4018,16 +4020,16 @@ 

Headers

-H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' -

Response samples

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

delete

Delete a subscription.

+

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

+

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

+

Suggestions

find

Get suggestions for field of type, filtered by search

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

    @@ -4036,7 +4038,7 @@

    Headers

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

Responses

Request samples

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/suggestions/ \
@@ -4045,15 +4047,15 @@ 

Headers

-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

+

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.

+

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

+

Request samples

 
 # You can also use wget
 curl -X DELETE https://api.withthegrid.com/supplier/ \
@@ -4061,9 +4063,9 @@ 

Headers

-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

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/supplier/ \
@@ -4071,15 +4073,15 @@ 

Headers

-H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' -

Response samples

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

update

Rights

+

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

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/supplier/{hashId} \
@@ -4087,13 +4089,13 @@ 

Headers

-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

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/supplier-activity/ \
@@ -4102,13 +4104,13 @@ 

Headers

-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

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/supplier-activity/{hashId} \
@@ -4117,7 +4119,7 @@ 

Headers

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

+

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
  • @@ -4125,13 +4127,13 @@

    Headers

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

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/supplier-certificate/ \
@@ -4140,13 +4142,13 @@ 

Headers

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

+

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

+

Request samples

 
 # You can also use wget
 curl -X DELETE https://api.withthegrid.com/supplier-certificate/{hashId} \
@@ -4154,13 +4156,13 @@ 

Headers

-H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' -

get

Get a specific certificate identified by its hashId

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/supplier-certificate/{hashId} \
@@ -4169,14 +4171,14 @@ 

Headers

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

+

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

+

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
  • @@ -4184,13 +4186,13 @@

    Headers

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

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/supplier-report-type/ \
@@ -4199,13 +4201,13 @@ 

Headers

-H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' -

Response samples

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

delete

Delete a device report type.

+

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

+

Request samples

 
 # You can also use wget
 curl -X DELETE https://api.withthegrid.com/supplier-report-type/{hashId} \
@@ -4213,13 +4215,13 @@ 

Headers

-H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' -

get

Get a specific device report type identified by its hashId

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/supplier-report-type/{hashId} \
@@ -4228,7 +4230,7 @@ 

Headers

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

+

Response samples

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

update

Update a device report type.

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN
  • @@ -4237,20 +4239,20 @@

    Headers

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.

+

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

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/supplier-webhook/ \
@@ -4259,13 +4261,13 @@ 

Headers

-H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' -

Response samples

Content type
text/json
{}

delete

Delete a webhook from a connectivity environment.

+

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

+

Request samples

 
 # You can also use wget
 curl -X DELETE https://api.withthegrid.com/supplier-webhook/{hashId} \
@@ -4273,13 +4275,13 @@ 

Headers

-H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' -

get

Get a specific webhook identified by its hashId

+

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/supplier-webhook/{hashId} \
@@ -4288,20 +4290,20 @@ 

Headers

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

+

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.

+

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

+

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

+

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.

+

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

    @@ -4311,7 +4313,7 @@

    Headers

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

+

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

    @@ -4320,7 +4322,7 @@

    Headers

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

Responses

Request samples

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/user/ \
@@ -4329,7 +4331,7 @@ 

Headers

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

+

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

    @@ -4338,7 +4340,7 @@

    Headers

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

+

Request samples

 
 # You can also use wget
 curl -X DELETE https://api.withthegrid.com/user/{hashId} \
@@ -4346,7 +4348,7 @@ 

Headers

-H 'Api-Version: 5' \ -H 'Authorization: Bearer {access-token}' -

get

Get a specific user identified by its hashId

+

get

Get a specific user identified by its hashId

Rights

  • Connectivity environment: ENVIRONMENT_ADMIN

    @@ -4355,7 +4357,7 @@

    Headers

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

+

Request samples

 
 # You can also use wget
 curl -X GET https://api.withthegrid.com/user/{hashId} \
@@ -4364,7 +4366,7 @@ 

Headers

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

+

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

    @@ -4374,7 +4376,7 @@

    Headers

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.

+

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.

@@ -4450,7 +4452,7 @@

Headers

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