Glob APIs

Glob are fast key value stores which could be controlled to change the simulation behavior.

Glob APIs could be used in the template to access the global key-value store. These values are useful to enable interaction between templates and control the behaviour of simulation through the user.

Create a new Glob entry or update an existing Glob entry

POST https://nsim.iotify.io/api/datastore/:workspaceId/glob

This endpoint allows you to create/update a Glob entry

Path Parameters

NameTypeDescription

workspaceId*

String

The Workspace ID where the Glob is

Headers

NameTypeDescription

Content-Type*

String

application/json

domain*

String

The domain under which your account exists

key *

String

API token for the account

Request Body

NameTypeDescription

key*

String

The key for the Glob entry

value*

String

The value for the Glob entry

true
// Example curl command

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "key:$KEY" -H "domain:nsim.iotify.io" -d '{"key":"$GLOBKEY","value":"$GLOBVALUE"}' nsim.iotify.io/api/datastore/$WORKSPACE/glob

Get a Glob object

GET https://nsim.iotify.io/api/datastore/:workspaceId/glob/item/:globKey

Path Parameters

NameTypeDescription

workspaceId*

string

The workspace ID for the workspace where the Glob is present

globKey*

String

The key for the glob entry to be fetched

Headers

NameTypeDescription

key*

string

API token for the account

Content-Type*

String

application/json

domain*

String

The domain under which your account exists

{
    "key": "CurlTest",
    "value": "Testing"
}
// Example curl command

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "key:$KEY" -H "domain:nsim.iotify.io" nsim.iotify.io/api/datastore/$WORKSPACE/glob/item/$GLOBKEY

Get all the Glob keys

GET nsim.iotify.io/api/datastore/:workspaceId/glob/keys

Path Parameters

NameTypeDescription

workspaceId*

String

The workspace ID for the workspace where the Glob is present

Headers

NameTypeDescription

Content-Type*

String

application/json

domain*

String

The domain under which your account exists

key*

String

API token for the account

key1, key2, key3, key4, key5
// Example curl command

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "key:$KEY" -H "domain:nsim.iotify.io" nsim.iotify.io/api/datastore/$WORKSPACE/glob/keys

Glob Delete

DELETE nsim.iotify.io/api/datastore/:workspaceId/glob/item/:globKey

Deletes the key value pair of the glob

Path Parameters

NameTypeDescription

globKey*

string

The key for the glob entry to be deleted

workspaceId*

String

The workspace ID for the workspace where the Glob is present

Headers

NameTypeDescription

Content-Type

string

application/json

key

String

API token for the account

domain

String

The domain under which your account exists

true
// Example curl command

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "key:$KEY" -H "domain:nsim.iotify.io" nsim.iotify.io/api/datastore/$WORKSPACE/glob/item/$GLOBKEY

Last updated