Device builder. This builder gives you the necessary tools to create a device using the OpenGate REST API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
organization string this is the organization name where device will be created
allowedDatastreams array Allowed datastreams to add into the new device
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool
ms number timeout in milliseconds

create()

This invoke a request to OpenGate North API and the callback is managed by promises This function creates a provisioned entity

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.organizationsBuilder().create()

update()

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a provisioned entity and checks whether any subscriber/subscription already exists. If a subscriber/subscription does not exist, it will be created and then added to the entity box.

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.entityBuilder.devicesBuilder().update()