Subsections of iot
catalog
Subsections of catalog
Category
Defines the builder to configure a category of a datamodel. With this builder you can configure a category
constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| Reference | InternalOpenGateAPI |
❌ | to the API object. |
| identifier | identifier |
❌ | of category |
| datastreams | Array |
❌ | of category |
addDatastream(datastream)
Add a datastream to the category
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| datastream | Object |
❌ | json object |
Retorna
Tip
Tipo: Category
addDatastreams(datastreams)
Add a datastreams to the category
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| datastreams | Object |
❌ | of datastream json object |
Retorna
Tip
Tipo: Category
Datastream
Defines the builder to configure a datastream of IoT datamodel. With this builder you can configure a datastream
addQrating(qrating)
Set the qrating attribute. Use {Qrating} utility for create this object
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| qrating | Object |
❌ |
Retorna
Tip
Tipo: Datastream
build()
Build a Datastream json object
Retorna
Tip
Tipo: Object
Datastream json object
Ejemplos
withAccess(access)
Set the access object. Possible values: [READ, WRITE], [READ], [WRITE], []
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| access | Array |
❌ |
Retorna
Tip
Tipo: Datastream
withDescription(description)
Set the description attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| description | string |
❌ |
Retorna
Tip
Tipo: Datastream
withId(id)
Set the id attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| id | string |
❌ | required field |
Retorna
Tip
Tipo: Datastream
withName(name)
Set the name attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| name | string |
❌ | required field |
Retorna
Tip
Tipo: Datastream
withPeriod(period)
Set the period attribute. Possible values: PULSE, CUMULATIVE, INSTANT
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| period | string |
❌ | required field |
Retorna
Tip
Tipo: Datastream
withSchema(schema)
Set the schema object attribute.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| schema | Object |
❌ |
Retorna
Tip
Tipo: Datastream
withStorage(period, total)
Set the storage object.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| period | string |
❌ | |
| total | number |
❌ |
Retorna
Tip
Tipo: Datastream
withTags(tags)
Set the tags attribute.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| tags | Array |
❌ |
Retorna
Tip
Tipo: Datastream
withUnit(type, label, symbol)
Set the unit object attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| type | string |
❌ | required field |
| label | string |
❌ | required field |
| symbol | string |
❌ | required field |
Retorna
Tip
Tipo: Datastream
Qrating
Defines the builder to configure a qurating of datastream of IoT datamodel. With this builder you can configure a qrating
build()
Build a Qrating json object
Retorna
Tip
Tipo: Object
Datastream json object
Ejemplos
withConversionMatrix(conversionMatrix)
Set the conversionMatrix attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| conversionMatrix | Object |
❌ |
Retorna
Tip
Tipo: Qrating
withCumulativePeriodDivisor(cumulativePeriodDivisor)
Set the cumulativePeriodDivisor attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| cumulativePeriodDivisor | string |
❌ |
Retorna
Tip
Tipo: Qrating
withIdeal(label, value)
Set the ideal attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| label | string |
❌ | required field |
| value | number |
❌ | required field |
Retorna
Tip
Tipo: Qrating
withMaxAllowed(label, value)
Set the maxAllowed attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| label | string |
❌ | required field |
| value | number |
❌ | required field |
Retorna
Tip
Tipo: Qrating
withMaxDesired(label, value)
Set the maxDesired attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| label | string |
❌ | required field |
| value | number |
❌ | required field |
Retorna
Tip
Tipo: Qrating
withMaxScore(maxScore)
Set the maxScore attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| maxScore | number |
❌ | required field |
Retorna
Tip
Tipo: Qrating
withMinDesired(label, value)
Set the minDesired attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| label | string |
❌ | required field |
| value | number |
❌ | required field |
Retorna
Tip
Tipo: Qrating
withMinRequired(label, value)
Set the minRequired attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| label | string |
❌ | required field |
| value | number |
❌ | required field |
Retorna
Tip
Tipo: Qrating
withVersion(version)
Set the version attribute
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| version | string |
❌ | required field |
Retorna
Tip
Tipo: Qrating
datamodels
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