Subsections of datamodels

Datamodels

This is a base object for create a IoT Datamodel

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
organization string Organization where the IoT datamodel will be created

addAllowedResourceType(resourceType)

Set the addAllowedResourceType attribute

Parámetros

Nombre Tipo Opcional Descripción
resourceType string required field

Retorna

Tip

Tipo: Datamodels


addCategory(category, datastreams)

Add a flavor. If the field datastreams have value, they will add to this flavor

Parámetros

Nombre Tipo Opcional Descripción
category Object
datastreams Array

Retorna

Tip

Tipo: Datamodels


addDatastream(category, datastream)

Add a datastream to the indicated category

Parámetros

Nombre Tipo Opcional Descripción
category string
datastream object

Retorna

Tip

Tipo: Datamodels


delete()

Delete not supported on this builder. Use IoTDatamodelHelper instead.


update()

Update not supported on this builder. Use IoTDatamodelHelper instead.


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Datamodels


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Datamodels


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Datamodels


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: Datamodels


Datamodels Finder

This class allow make get request to organization resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByOrganizationAndId(organization, id)

Download a specific IoT Datamodel by its organization and id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization string datamodel organization .
id string datamodel id.

Retorna

Tip

Tipo: Promise


Datamodels Helper

This is a base object for update and delete a IoT Datamodel

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
organization string Organization where the IoT datamodel was create
datamodel object Json object of IoT datamodel to modify or delete.

addCategory(category, datastreams)

Add a category. If the field datastreams have value, they will add to this category

Parámetros

Nombre Tipo Opcional Descripción
category Object
datastreams Array

Retorna

Tip

Tipo: DatamodelsHelper


addDatastream(category, datastream)

Add a datastream to the indicated category

Parámetros

Nombre Tipo Opcional Descripción
category string
datastream object

Retorna

Tip

Tipo: DatamodelsHelper


create()

Create not supported on this builder. Use IoTDatamodelHelper instead.


removeCategory(category)

Remove category

Parámetros

Nombre Tipo Opcional Descripción
category string

Retorna

Tip

Tipo: DatamodelsHelper


removeDatastream(category, id_datastream)

Remove datastream to the indicated category

Parámetros

Nombre Tipo Opcional Descripción
category string
id_datastream string of datastream

Retorna

Tip

Tipo: DatamodelsHelper


updateCategory(old_category, new_category)

Update category name

Parámetros

Nombre Tipo Opcional Descripción
old_category string name
new_category string name

Retorna

Tip

Tipo: DatamodelsHelper


updateDatastream(category, id_datastream, datastream)

Update datastream to the indicated category

Parámetros

Nombre Tipo Opcional Descripción
category string
id_datastream string of datastream
datastream Object json object

Retorna

Tip

Tipo: DatamodelsHelper


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: DatamodelsHelper


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Datamodels


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: DatamodelsHelper


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: DatamodelsHelper