JS Reference

Subsections of JS Reference

Subsections of alarms

Subsections of actions

Alarm Action Builder

Defines the builder to execute alarm actions

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
action string This action can be ATTEND or CLOSE

addAlarmId(alarmId)

Add alarmId to operation

Parámetros

Nombre Tipo Opcional Descripción
alarmId string AlarmId of Alarm

Retorna

Tip

Tipo: AlarmActionBuilder

Ejemplos

ogapi.alarms.builderFactory.newAlarmCloseBuilder().addAlarmId("")

build()

Build an instance of Operation

Retorna

Tip

Tipo: Operation

Ejemplos

ogapi.operations.builderFactory.newAlarmCloseBuilder().build()

withNotes(notes)

Add notes to operation

Parámetros

Nombre Tipo Opcional Descripción
notes string Notes about operation

Retorna

Tip

Tipo: AlarmActionBuilder

Ejemplos

ogapi.operations.builderFactory.newAlarmCloseBuilder().withNotes("")

Alarm Attend Builder

Defines the builder to execute alarm attend operation

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.

Alarm Close Builder

Defines the builder to execute alarm close operation

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.

Operation

This is an abstract class; it must be extended by another class that defines the specific request. This class is responsible for executing operation requests to the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is a base url resource
postObj object it will be sent as a data on post action

execute()

This invokes a request to the OpenGate North API and the callback is managed by promises.

Retorna

Tip

Tipo: Promise


Alarm Actions

This class contains all alarms actions builders

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.

newAttendBuilder()

Create alarm attend action builder

Retorna

Tip

Tipo: AlarmAttendBuilder

Ejemplos

ogapi.alarms.newAttendBuilder()

newCloseBuilder()

Create alarm close action builder

Retorna

Tip

Tipo: AlarmCloseBuilder

Ejemplos

ogapi.alarms.newCloseBuilder()

Subsections of areas

Area Finder

This class allows making GET requests to the area resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganizationAndIdentifier(organization, identifier)

Downloads a specific area by its organization and identifier. This executes a GET HTTP method.

Parámetros

Nombre Tipo Opcional Descripción
organization string area organization .
identifier string area name.

Retorna

Tip

Tipo: Promise


Areas

This is a base object that contains everything you can do with an area.

constructor

Constructor

Parámetros

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

withColor(color)

Set the color attribute

Parámetros

Nombre Tipo Opcional Descripción
color string required field

Retorna

Tip

Tipo: Areas


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Areas


withEntities(entities)

Set the entities attribute

Parámetros

Nombre Tipo Opcional Descripción
entities array required field

Retorna

Tip

Tipo: Areas


withGeometry(type, coordinates)

Set the geometry attribute

Parámetros

Nombre Tipo Opcional Descripción
type string required field
coordinates array required field

Retorna

Tip

Tipo: Areas


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Areas


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Areas


withOrder(order)

Set the order attribute

Parámetros

Nombre Tipo Opcional Descripción
order number required field

Retorna

Tip

Tipo: Areas


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: Areas


Subsections of bulk

Bulk Execution Finder

This class allows making GET requests to the bulk executions resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganizationAndId(organization, id, mimetype)

Downloads a specific entity by its organization and id. This executes a GET HTTP method.

Parámetros

Nombre Tipo Opcional Descripción
organization string organization.
id string bulk id.
mimetype string Format of file when get the result details of previously created bulk process.

Retorna

Tip

Tipo: Promise


Bulk Finder

This class allows making GET requests to the bulk resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganizationAndId(organization, id, format, accept)

Downloads a specific entity by its organization and id. This executes a GET HTTP method.

Parámetros

Nombre Tipo Opcional Descripción
organization string entity organization .
id string entity id.
format string format response flag.
accept string accept.

Retorna

Tip

Tipo: Promise


Subsections of bundles

Bundle Finder

This class allows making GET requests to the bundle resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByNameAndVersion(name, version)

Download a specific bundle by its name and version. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
name string bundle name .
version string bundle version.

Retorna

Tip

Tipo: Promise


Bundles

This is the base object for everything you can do with bundles.

constructor

Constructor

Parámetros

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

activate()

This invokes a request to the OpenGate North API and the callback is managed by promises. This function activates a bundle.

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.bundlesBuilder().activate()

addDeploymentElement(progressEvent)

Create deployment element that is asociated to the Bundle

Retorna

Tip

Tipo: DeploymentElement

Ejemplos

ogapi.bundlesBuilder().newDeploymentElement()

create()

Creates a new bundle

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.bundlesBuilder().create()

deactivate()

This invokes a request to the OpenGate North API and the callback is managed by promises. This function deactivates a bundle.

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.bundlesBuilder().deactivate()

deployAndActivate()

Deploy all elements of a bundle in only one method

Retorna

Tip

Tipo: DeploymentElement

Ejemplos

ogapi.bundlesBuilder().deployAndActivate()

update()

Updates a bundle

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.bundlesBuilder().update()

withActive(active)

Set the active attribute

Parámetros

Nombre Tipo Opcional Descripción
active string

Retorna

Tip

Tipo: Bundles


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Bundles


withHardware(hardware)

Set the hardware attribute

Parámetros

Nombre Tipo Opcional Descripción
hardware string

Retorna

Tip

Tipo: Bundles


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Bundles


withPostaction(postactions)

Set the postactions attribute

Parámetros

Nombre Tipo Opcional Descripción
postactions string

Retorna

Tip

Tipo: Bundles


withPreaction(preaction)

Set the preaction attribute

Parámetros

Nombre Tipo Opcional Descripción
preaction string

Retorna

Tip

Tipo: Bundles


withTimeout(ms)

The request will have a specific time out if it will be exceeded then the promise throw an exception

Parámetros

Nombre Tipo Opcional Descripción
ms number timeout in milliseconds

Retorna

Tip

Tipo: Bundles


withUserNotes(userNotes)

Set the userNotes attribute

Parámetros

Nombre Tipo Opcional Descripción
userNotes string

Retorna

Tip

Tipo: Bundles


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string

Retorna

Tip

Tipo: Bundles


withWorkgroup(workgroup)

Set the workgroup attribute

Parámetros

Nombre Tipo Opcional Descripción
workgroup string

Retorna

Tip

Tipo: Bundles


deployment

This section documents the deployment element used to attach files to a bundle.

Subsections of deployment

Deployment Element

This is the base object for everything you can do with a deployment element.

createWithFile(rawFile)

This invokes a request to the OpenGate North API and the callback is managed by promises. This method creates a deployment element.

Parámetros

Nombre Tipo Opcional Descripción
rawFile File this File is the deployment element

Retorna

Tip

Tipo: Promise


deploy()

This invokes a request to the OpenGate North API and the callback is managed by promises. This method creates a deployment element with the previously assigned file.

Retorna

Tip

Tipo: Promise


update()

This method invalidates the update option


withDownloadUrl(downloadUrl)

Set the downloadUrl attribute

Parámetros

Nombre Tipo Opcional Descripción
downloadUrl string

Retorna

Tip

Tipo: DeploymentElement


withFile(rawFile)

Sets the file to upload

Parámetros

Nombre Tipo Opcional Descripción
rawFile object

Retorna

Tip

Tipo: DeploymentElement


withFileName(fileName)

Set the fileName attribute

Parámetros

Nombre Tipo Opcional Descripción
fileName string

Retorna

Tip

Tipo: DeploymentElement


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: DeploymentElement


withOldName(name)

Sets the old name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string

Retorna

Tip

Tipo: DeploymentElement


withOldPath(path)

Sets the old path attribute

Parámetros

Nombre Tipo Opcional Descripción
path string

Retorna

Tip

Tipo: DeploymentElement


withOldVersion(version)

Sets the old version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string

Retorna

Tip

Tipo: DeploymentElement


withOperation(operation)

Set the operation attribute

Parámetros

Nombre Tipo Opcional Descripción
operation string required field

Retorna

Tip

Tipo: DeploymentElement


withOption(option)

Set the option attribute

Parámetros

Nombre Tipo Opcional Descripción
option string

Retorna

Tip

Tipo: DeploymentElement


withOrder(order)

Set the order attribute

Parámetros

Nombre Tipo Opcional Descripción
order string required field

Retorna

Tip

Tipo: DeploymentElement


withPath(path)

Set the path attribute

Parámetros

Nombre Tipo Opcional Descripción
path string required field

Retorna

Tip

Tipo: DeploymentElement


withTimeout(ms)

The request will have a specific time out if it will be exceeded then the promise throw an exception

Parámetros

Nombre Tipo Opcional Descripción
ms number timeout in milliseconds

Retorna

Tip

Tipo: Bundles


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string required field

Retorna

Tip

Tipo: DeploymentElement


withValidation(validation)

Set the validation attribute

Parámetros

Nombre Tipo Opcional Descripción
validation string

Retorna

Tip

Tipo: DeploymentElement


withValidators(validators)

Set the validators attribute

Parámetros

Nombre Tipo Opcional Descripción
validators Array

Retorna

Tip

Tipo: DeploymentElement


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: DeploymentElement


Subsections of channels

Channel Finder

This class allows making GET requests to the channel resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByDomainAndWorkgroup(domain, workgroup)

Performs a GET request that returns the channels related to the given domain and workgroup.

Parámetros

Nombre Tipo Opcional Descripción
domain string domain
workgroup string workgroup.

Retorna

Tip

Tipo: Promise


findByDomainAndWorkgroupAndOrganization(domain, workgroup, organization)

Performs a GET request that returns the channels related to the given domain, workgroup, and organization.

Parámetros

Nombre Tipo Opcional Descripción
domain string domain
workgroup string workgroup.
organization string organization.

Retorna

Tip

Tipo: Promise


findByOrganizationAndName(organization, name)

Downloads a specific channel by its organization and name. This executes a GET HTTP method.

Parámetros

Nombre Tipo Opcional Descripción
organization string channel organization .
name string channel name.

Retorna

Tip

Tipo: Promise


Channels

This is a base object that contains everything you can do with a channel.

constructor

Constructor

Parámetros

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

withCertificate(certificate)

Set the certificate attribute

Parámetros

Nombre Tipo Opcional Descripción
certificate string

Retorna

Tip

Tipo: Channels


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Channels


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Channels


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string

Retorna

Tip

Tipo: Channels


Subsections of collection

Subsections of devices

Subsections of collect

Comms Module Message

This is a base object that allows the user to create a CommsModule.

withAntennaStatus(antennaStatus)

Set the antennaStatus attribute

Parámetros

Nombre Tipo Opcional Descripción
antennaStatus string optional field

Retorna

Tip

Tipo: CommsModule


withHardware(hardware)

Set the hardware attribute

Parámetros

Nombre Tipo Opcional Descripción
hardware Hardware optionals field

Retorna

Tip

Tipo: CommsModule


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string optional field

Retorna

Tip

Tipo: CommsModule


withMobile(mobile)

Set the mobile attribute

Retorna

Tip

Tipo: CommsModule


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string optional field

Retorna

Tip

Tipo: CommsModule


withOperationalStatus(operationalStatus)

Set the operationalStatus attribute

Parámetros

Nombre Tipo Opcional Descripción
operationalStatus string

Retorna

Tip

Tipo: CommsModule


withSoftware(software)

Set the software attribute

Retorna

Tip

Tipo: CommsModule


withSubscriber(subscriber)

Set the subscriber attribute

Retorna

Tip

Tipo: CommsModule


withSubscription(subscription)

Set the subscription attribute

Retorna

Tip

Tipo: CommsModule


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string optional field

Retorna

Tip

Tipo: CommsModule


Datapoint

This is a base object that allows the user to create a Datapoint.

withAt(at)

Sets the at attribute

Parámetros

Nombre Tipo Opcional Descripción
at number optional field

Retorna

Tip

Tipo: Datapoint


withFrom(from)

Sets the from attribute

Parámetros

Nombre Tipo Opcional Descripción
from number optional field

Retorna

Tip

Tipo: Datapoint


withSource(value)

Sets the source attribute

Parámetros

Nombre Tipo Opcional Descripción
value string optional field

Retorna

Tip

Tipo: Datapoint


withSourceInfo(value)

Sets the source attribute

Parámetros

Nombre Tipo Opcional Descripción
value string optional field

Retorna

Tip

Tipo: Datapoint


withTags(tags)

Sets the tags attribute

Parámetros

Nombre Tipo Opcional Descripción
tags Array

Retorna

Tip

Tipo: Datapoint


withValue(value)

Sets the value attribute

Parámetros

Nombre Tipo Opcional Descripción
value string required field

Retorna

Tip

Tipo: Datapoint


Datastream

This is a base object that allows the user to create a Datastream.

withDatapoint(datapoint)

Add a datapoint in datapoints

Parámetros

Nombre Tipo Opcional Descripción
datapoint Datapoint required field

Retorna

Tip

Tipo: Datastream


withFeed(feed)

Set the feed attribute

Parámetros

Nombre Tipo Opcional Descripción
feed string optionals field

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


Event

This is a base object that allows the user to create an Event.

withCommsModule(communicationsModules)

Set the powerSupply attribute

Retorna

Tip

Tipo: Event


withCpuUsage(cpuUsage)

Set the cpuUsage attribute

Retorna

Tip

Tipo: Event


withCurrentTemperature(currentTemperature)

Set the currentTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
currentTemperature string optionals field

Retorna

Tip

Tipo: Event


withDateLocation(date)

Set the date attribute

Parámetros

Nombre Tipo Opcional Descripción
date string optionals field

Retorna

Tip

Tipo: Event


withDeviceId(deviceId)

Set the deviceId attribute

Parámetros

Nombre Tipo Opcional Descripción
deviceId string optionals field

Retorna

Tip

Tipo: Event


withEventDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string optionals field

Retorna

Tip

Tipo: Event


withEventId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string optionals field

Retorna

Tip

Tipo: Event


withEventName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string optionals field

Retorna

Tip

Tipo: Event


withHardware(hardware)

Set the hardware attribute

Parámetros

Nombre Tipo Opcional Descripción
hardware Hardware optionals field

Retorna

Tip

Tipo: Event


withLatitude(latitude)

Set the latitude attribute

Parámetros

Nombre Tipo Opcional Descripción
latitude number optionals field

Retorna

Tip

Tipo: Event


withLongitude(longitude)

Set the longitude attribute

Parámetros

Nombre Tipo Opcional Descripción
longitude number optionals field

Retorna

Tip

Tipo: Event


withMaximumTemperature(maximumTemperature)

Set the maximum attribute

Parámetros

Nombre Tipo Opcional Descripción
maximumTemperature string optionals field

Retorna

Tip

Tipo: Event


withMinimumTemperature(minimumTemperature)

Set the minimum attribute

Parámetros

Nombre Tipo Opcional Descripción
minimumTemperature string optionals field

Retorna

Tip

Tipo: Event


withNonVolatilStorage(nonVolatilStorage)

Set the nonVolatilStorage attribute

Retorna

Tip

Tipo: Event


withOperationalStatus(operationalStatus)

Set the operationalStatus attribute

Parámetros

Nombre Tipo Opcional Descripción
operationalStatus string

Retorna

Tip

Tipo: Event


withPath(path)

Set the path attribute

Parámetros

Nombre Tipo Opcional Descripción
path string optionals field

Retorna

Tip

Tipo: Event


withPowerSupply(powerSupply)

Set the powerSupply attribute

Retorna

Tip

Tipo: Event


withRam(ram)

Set the Ram attribute

Retorna

Tip

Tipo: Event


withSoftware(software)

Set the software attribute

Parámetros

Nombre Tipo Opcional Descripción
software software optionals field

Retorna

Tip

Tipo: Event


withStatusTemperature(unitTemperature)

Set the unitTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
unitTemperature string optionals field

Retorna

Tip

Tipo: Event


withTemperatureAverage(averageTemperature)

Set the average attribute

Parámetros

Nombre Tipo Opcional Descripción
averageTemperature string optionals field

Retorna

Tip

Tipo: Event


withTrendTemperature(unitTemperature)

Set the unitTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
unitTemperature string optionals field

Retorna

Tip

Tipo: Event


withUnitTemperature(unitTemperature)

Set the unitTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
unitTemperature string optionals field

Retorna

Tip

Tipo: Event


withUpTime(upTime)

Set the upTime attribute

Parámetros

Nombre Tipo Opcional Descripción
upTime number

Retorna

Tip

Tipo: Event


withVolatilStorage(volatilStorage)

Set the volatilStorage attribute

Retorna

Tip

Tipo: Event


Hardware

This is a base object that allows the user to create a Hardware object.

withClockDate(clockDate)

Set the clockDate attribute

Parámetros

Nombre Tipo Opcional Descripción
clockDate string

Retorna

Tip

Tipo: Hardware


withManufacturerName(manufacturerName)

Set the manufacturerName attribute

Parámetros

Nombre Tipo Opcional Descripción
manufacturerName string

Retorna

Tip

Tipo: Hardware


withManufacturerOui(manufacturerOui)

Set the manufacturerOui attribute

Parámetros

Nombre Tipo Opcional Descripción
manufacturerOui string

Retorna

Tip

Tipo: Hardware


withModelName(modelName)

Set the modelName attribute

Parámetros

Nombre Tipo Opcional Descripción
modelName string

Retorna

Tip

Tipo: Hardware


withModelVersion(modelVersion)

Set the modelVersion attribute

Parámetros

Nombre Tipo Opcional Descripción
modelVersion string

Retorna

Tip

Tipo: Hardware


withSerialnumber(serialnumber)

Set the serialnumber attribute

Parámetros

Nombre Tipo Opcional Descripción
serialnumber string

Retorna

Tip

Tipo: Hardware


Location

This is a base object that allows the user to create a Location object.

withDateLocation(date)

Set the date attribute

Parámetros

Nombre Tipo Opcional Descripción
date string optionals field

Retorna

Tip

Tipo: Location


withLatitude(latitude)

Set the latitude attribute

Parámetros

Nombre Tipo Opcional Descripción
latitude number optionals field

Retorna

Tip

Tipo: Location


withLongitude(longitude)

Set the longitude attribute

Parámetros

Nombre Tipo Opcional Descripción
longitude number optionals field

Retorna

Tip

Tipo: Location


Mobile

This is a base object that allows the user to create a Mobile object.

withApn(apn)

Set the apn attribute

Parámetros

Nombre Tipo Opcional Descripción
apn string optionals field

Retorna

Tip

Tipo: Mobile


withBcch(bcch)

Set the bcch attribute

Parámetros

Nombre Tipo Opcional Descripción
bcch string optionals field

Retorna

Tip

Tipo: Mobile


withCellId(cellId)

Set the cellId attribute

Parámetros

Nombre Tipo Opcional Descripción
cellId string optionals field

Retorna

Tip

Tipo: Mobile


withCgi(cgi)

Set the cgi attribute

Parámetros

Nombre Tipo Opcional Descripción
cgi string optionals field

Retorna

Tip

Tipo: Mobile


withLac(lac)

Set the lac attribute

Parámetros

Nombre Tipo Opcional Descripción
lac string optionals field

Retorna

Tip

Tipo: Mobile


withMr(mr)

Set the mr attribute

Parámetros

Nombre Tipo Opcional Descripción
mr string optionals field

Retorna

Tip

Tipo: Mobile


withPlmn(plmn)

Set the plmn attribute

Parámetros

Nombre Tipo Opcional Descripción
plmn string optionals field

Retorna

Tip

Tipo: Mobile


withRatType(ratType)

Set the ratType attribute

Parámetros

Nombre Tipo Opcional Descripción
ratType string optionals field

Retorna

Tip

Tipo: Mobile


withsignalQuality(signalQuality)

Set the signalQuality attribute

Parámetros

Nombre Tipo Opcional Descripción
signalQuality string optionals field

Retorna

Tip

Tipo: Mobile


withsignalQualityMax(signalQualityMax)

Set the signalQualityMax attribute

Parámetros

Nombre Tipo Opcional Descripción
signalQualityMax string optionals field

Retorna

Tip

Tipo: Mobile


withsignalQualityMin(signalQualityMin)

Set the signalQualityMin attribute

Parámetros

Nombre Tipo Opcional Descripción
signalQualityMin string optionals field

Retorna

Tip

Tipo: Mobile


withSignalStrength(signalStrength)

Set the signalStrength attribute

Parámetros

Nombre Tipo Opcional Descripción
signalStrength string optionals field

Retorna

Tip

Tipo: Mobile


withSignalStrengthMax(signalStrengthMax)

Set the signalStrengthMax attribute

Parámetros

Nombre Tipo Opcional Descripción
signalStrengthMax string optionals field

Retorna

Tip

Tipo: Mobile


withsignalStrengthMin(signalStrengthMin)

Set the signalStrengthMin attribute

Parámetros

Nombre Tipo Opcional Descripción
signalStrengthMin string optionals field

Retorna

Tip

Tipo: Mobile


withTimingAdvance(timingAdvance)

Set the timingAdvance attribute

Parámetros

Nombre Tipo Opcional Descripción
timingAdvance string optionals field

Retorna

Tip

Tipo: Mobile


Power Supply

This is a base object that allows the user to create a PowerSupply object.

withBatteryChargeLevelPercentage(percentage)

Set the BatteryChargeLevel percentage attribute

Parámetros

Nombre Tipo Opcional Descripción
percentage string optionals field

Retorna

Tip

Tipo: PowerSupply


withBatteryChargeLevelStatus(status)

Set the battery status attribute

Parámetros

Nombre Tipo Opcional Descripción
status string optionals field

Retorna

Tip

Tipo: PowerSupply


withBatteryChargeLevelTrend(trend)

Set the trend attribute

Parámetros

Nombre Tipo Opcional Descripción
trend string optionals field

Retorna

Tip

Tipo: PowerSupply


withOutageDate(outageDate)

Set the OutageDate attribute

Parámetros

Nombre Tipo Opcional Descripción
outageDate string optionals field

Retorna

Tip

Tipo: PowerSupply


withOutageDuration(duration)

Set the duration attribute

Parámetros

Nombre Tipo Opcional Descripción
duration number optionals field

Retorna

Tip

Tipo: PowerSupply


withSource(source)

Set the source attribute

Parámetros

Nombre Tipo Opcional Descripción
source string optionals field

Retorna

Tip

Tipo: PowerSupply


withStatus(status)

Set the status attribute

Parámetros

Nombre Tipo Opcional Descripción
status string optionals field

Retorna

Tip

Tipo: PowerSupply


Software

This is a base object that allows the user to create a Software object.

withDate(date)

Set the date attribute

Parámetros

Nombre Tipo Opcional Descripción
date string

Retorna

Tip

Tipo: Software


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string

Retorna

Tip

Tipo: Software


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string

Retorna

Tip

Tipo: Software


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string

Retorna

Tip

Tipo: Software


Storage

This is a base object that allows the user to create a Storage object.

withTotal(total)

Set the total attribute

Parámetros

Nombre Tipo Opcional Descripción
total string optionals field

Retorna

Tip

Tipo: Storage


withUnit(unit)

Set the unit attribute

Parámetros

Nombre Tipo Opcional Descripción
unit string optionals field

Retorna

Tip

Tipo: Storage


Subscriber

This is a base object that allows the user to create a Subscriber object.

withHardware(hardware)

Set the hardware attribute

Parámetros

Nombre Tipo Opcional Descripción
hardware Hardware optionals field

Retorna

Tip

Tipo: Subscriber


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string optional field

Retorna

Tip

Tipo: Subscriber


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string optional field

Retorna

Tip

Tipo: Subscriber


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string optional field

Retorna

Tip

Tipo: Subscriber


Subscription

This is a base object that allows the user to create a Subscription.

withAddressApn(addressApn)

Set the addressApn attribute

Parámetros

Nombre Tipo Opcional Descripción
addressApn string optional field

Retorna

Tip

Tipo: Subscription


withAddressType(addressType)

Set the addressType attribute

Parámetros

Nombre Tipo Opcional Descripción
addressType string optional field

Retorna

Tip

Tipo: Subscription


withAddressValue(addressValue)

Set the addressValue attribute

Parámetros

Nombre Tipo Opcional Descripción
addressValue string optional field

Retorna

Tip

Tipo: Subscription


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string optional field

Retorna

Tip

Tipo: Subscription


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string optional field

Retorna

Tip

Tipo: Subscription


withImsi(imsi)

Set the imsi attribute

Parámetros

Nombre Tipo Opcional Descripción
imsi string optional field

Retorna

Tip

Tipo: Subscription


withMsisdn(msisdn)

Set the msisdn attribute

Parámetros

Nombre Tipo Opcional Descripción
msisdn string optional field

Retorna

Tip

Tipo: Subscription


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string optional field

Retorna

Tip

Tipo: Subscription


withOperator(operator)

Set the operator attribute

Parámetros

Nombre Tipo Opcional Descripción
operator string optional field

Retorna

Tip

Tipo: Subscription


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string optional field

Retorna

Tip

Tipo: Subscription


Temperature

This is a base object that allows the user to create a Temperature object.

withCurrentTemperature(currentTemperature)

Set the currentTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
currentTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withMaximumTemperature(maximumTemperature)

Set the maximum attribute

Parámetros

Nombre Tipo Opcional Descripción
maximumTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withMinimumTemperature(minimumTemperature)

Set the minimumTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
minimumTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withStatusTemperature(statusTemperature)

Set the statusTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
statusTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withTemperatureAverage(averageTemperature)

Set the averageTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
averageTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withTrendTemperature(trendTemperature)

Set the trendTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
trendTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withUnitTemperature(unitTemperature)

Set the unitTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
unitTemperature string optionals field

Retorna

Tip

Tipo: Temperature


Usage

This is a base object that allows the user to create a Usage object.

withAverage(average)

Set the average attribute

Parámetros

Nombre Tipo Opcional Descripción
average string optionals field

Retorna

Tip

Tipo: Usage


withCurrent(current)

Set the current attribute

Parámetros

Nombre Tipo Opcional Descripción
current string optionals field

Retorna

Tip

Tipo: Usage


withMaximum(maximum)

Set the maximum attribute

Parámetros

Nombre Tipo Opcional Descripción
maximum string optionals field

Retorna

Tip

Tipo: Usage


withMinimum(minimum)

Set the minimum attribute

Parámetros

Nombre Tipo Opcional Descripción
minimum string optionals field

Retorna

Tip

Tipo: Usage


withUsageUnit(unit)

Set the unit attribute

Parámetros

Nombre Tipo Opcional Descripción
unit string optionals field

Retorna

Tip

Tipo: Usage


Device Message

This is a base object that contains methods to send unstructured IoT information to be processed and collected by the platform.

constructor

Constructor

Parámetros

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

withDataStream(datastream)

Set the datastream attribute

Parámetros

Nombre Tipo Opcional Descripción
datastream Datastream required field

Retorna

Tip

Tipo: deviceMessages


withDataStreamVersion(version)

Set the dataStream version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: deviceMessages


withDeviceId(deviceId)

Set the deviceId attribute

Parámetros

Nombre Tipo Opcional Descripción
deviceId string optional field

Retorna

Tip

Tipo: deviceMessages


withDmmVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: deviceMessages


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: deviceMessages


Subsections of connectorsFunctions

Subsections of catalog

Connector Functions

This is a base object that contains everything you can do with a connector function catalog entry.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI
identifier String
connectorFunction Object

addNorthCriteria(northCriteria)

Add northCriteria to parameter northCriterias. Each element is defined by path and value

Parámetros

Nombre Tipo Opcional Descripción
northCriteria Object

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


addSouthCriteria(southCriteria)

Add southCriteria to parameter southCriterias. Each string can represent an URI, topic, OID…

Parámetros

Nombre Tipo Opcional Descripción
southCriteria String

Retorna

Tip

Tipo: ``


create()

Create a new connector function catalog

Retorna

Tip

Tipo: Promise


withCloneable(cloneable)

Indicates whether or not the Connector Function is cloneable.

Parámetros

Nombre Tipo Opcional Descripción
cloneable Boolean

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withDescription(description)

Description of the connector function. This field is optional.

Parámetros

Nombre Tipo Opcional Descripción
description String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withIdentifier(identifier)

Set the identifier

Parámetros

Nombre Tipo Opcional Descripción
identifier String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withJavascript(javascript)

Connector function javascript code

Parámetros

Nombre Tipo Opcional Descripción
javascript String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withName(name)

Descriptive and unique name

Parámetros

Nombre Tipo Opcional Descripción
name String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withNorthCriterias(northCriterias)

Connector Function selection criteria for operation requests. This field is mandatory if Connector Function type is REQUEST. ⮕ [ each element is defined by path and value ]

Parámetros

Nombre Tipo Opcional Descripción
northCriterias Array

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withOperationalStatus(operationalStatus)

Connector Function status Allowed: DISABLED┃PRODUCTION┃TEST

Parámetros

Nombre Tipo Opcional Descripción
operationalStatus String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withOperationName(operationName)

Used to filter connector functions by operation name. If Connector Function type is REQUEST, this field is mandatory and defined name must be an operation name available for specified Api Key. If the type is COLLECTION or RESPONSE, this field must be null.

Parámetros

Nombre Tipo Opcional Descripción
operationName String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withPayloadType(payloadType)

Enum of allowed types for connector function's payload data. Request Connector Functions only accept JSON. Allowed: TEXT┃JSON┃BINARY

Parámetros

Nombre Tipo Opcional Descripción
payloadType String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withSouthCriterias(southCriterias)

Connector Function selection criteria for operation responses and data collection. This field is mandatory if Connector Function type is COLLECTION or RESPONSE. ⮕ [ each string can represent an URI, topic, OID… ]. Each string can represent an URI, topic, OID…

Parámetros

Nombre Tipo Opcional Descripción
southCriterias Array

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withType(type)

Type of connector function, this is mandatory. Keep in mind that you will be not allowed to modify it. Allowed: COLLECTION┃REQUEST┃RESPONSE

Parámetros

Nombre Tipo Opcional Descripción
type String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


Connector Functions Catalog

This class allows you to make GET requests to the connector functions catalog resource in the OpenGate North API.

getConnectorFunctionsCatalog()

Get connector functions catalog

Retorna

Tip

Tipo: Promise


Connector Functions Catalog Finder

This class allows you to make GET requests to a connector functions catalog resource in the OpenGate North API.

findByConnectorFunctionsId(connectorFunctionId)

Reading a Connector Function from catalog

Parámetros

Nombre Tipo Opcional Descripción
connectorFunctionId String

Retorna

Tip

Tipo: Promise


Subsections of configuration

Connector Functions

This is a base object that contains everything you can do with ConnectorFunctions.

constructor

Constructor

Parámetros

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

create()

Create a new Connector Function

Retorna

Tip

Tipo: Promise


delete()

Deletes the selected connector function

Retorna

Tip

Tipo: Promise


update()

Updates a connector function

Retorna

Tip

Tipo: Promise


withChannel(channel)

Set the channel attribute

Parámetros

Nombre Tipo Opcional Descripción
channel string required field

Retorna

Tip

Tipo: ConnectorFunctions


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: ConnectorFunctions


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: ConnectorFunctions


withJavascript(javascript)

Set the javascript attribute

Parámetros

Nombre Tipo Opcional Descripción
javascript string

Retorna

Tip

Tipo: ConnectorFunctions


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: ConnectorFunctions


withNorthCriterias(criterias)

Set the north criterias attribute

Parámetros

Nombre Tipo Opcional Descripción
criterias array

Retorna

Tip

Tipo: ConnectorFunctions


withOperationalStatus(operationalStatus)

Set the operational status attribute

Parámetros

Nombre Tipo Opcional Descripción
operationalStatus boolean

Retorna

Tip

Tipo: ConnectorFunctions


withOperationName(operationName)

Set the operation name attribute

Parámetros

Nombre Tipo Opcional Descripción
operationName string required field

Retorna

Tip

Tipo: ConnectorFunctions


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: ConnectorFunctions


withPayloadType(payloadType)

Set the payload type attribute

Parámetros

Nombre Tipo Opcional Descripción
payloadType string

Retorna

Tip

Tipo: ConnectorFunctions


withSouthCriterias(criterias)

Set the south criterias attribute

Parámetros

Nombre Tipo Opcional Descripción
criterias array

Retorna

Tip

Tipo: ConnectorFunctions


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string

Retorna

Tip

Tipo: ConnectorFunctions


Connector Functions Finder

This class allows you to make GET requests to the ConnectorFunctions resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganizationAndChannel(organization, channel)

Performs a get that returns connectors functions related

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
channel string channel.

Retorna

Tip

Tipo: Promise


findByOrganizationAndChannelAndName(organization, channel, name)

Performs a get that returns connectors functions related

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
channel string channel.
name string Connector function name

Retorna

Tip

Tipo: Promise


Connector Functions Helper

This class allows you to make GET requests to the ConnectorFunctionsHelper resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

getDocJavascriptFunctions()

Performs a get that returns documentation of javascript functions from rules service

Retorna

Tip

Tipo: Promise


getDocPrivateJavascriptFunctions()

Performs a get that returns documentation private of javascript functions from rules service

Retorna

Tip

Tipo: Promise


Subsections of datasets

Dataset Finder

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

constructor

Constructor

Parámetros

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

findByOrganization(organization)

Performs a get that returns list of datasets

Parámetros

Nombre Tipo Opcional Descripción
organization string organization

Retorna

Tip

Tipo: Promise


findByOrganizationAndDatasetId(organization, datasetId)

Performs a get that returns a definition of dataset

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
datasetId string dataset identifier

Retorna

Tip

Tipo: Promise


findByOrganizationAndName(organization, name)

Performs a get that returns a definition of timeserie

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
name string timeserie name

Retorna

Tip

Tipo: Promise


Datasets

This is the base object for working with Datasets.

constructor

Constructor

Parámetros

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

optimizationPlan()

Request optimization plan

Retorna

Tip

Tipo: Promise


withColumns(columns)

Set the columns attribute

Parámetros

Nombre Tipo Opcional Descripción
columns array required field

Retorna

Tip

Tipo: Datasets


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Datasets


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Datasets


withIdentifierColumn(identifierColumn)

Set the identifierColumn attribute

Parámetros

Nombre Tipo Opcional Descripción
identifierColumn string required field

Retorna

Tip

Tipo: Datasets


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Datasets


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: Datasets


withSorts(sorts)

List of sorting fields

Parámetros

Nombre Tipo Opcional Descripción
sorts array required field

Retorna

Tip

Tipo: Datasets


Subsections of entities

Device Finder

This class allows you to make GET requests to the provisioned device resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

Entity Finder

This class allows you to make GET requests to the provisioned entity resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganizationAndId(organization, id, flattened)

Download a specific entity by its organization and id. This executes a GET HTTP method

Parámetros

Nombre Tipo Opcional Descripción
organization string entity organization .
id string entity id.
flattened string flattened response flag.

Retorna

Tip

Tipo: Promise


Subscribers Finder

This class allows you to make GET requests to the provisioned subscribers resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

Subscriptions Finder

This class allows you to make GET requests to the provisioned subscription resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

Ticket Finder

This class allows you to make GET requests to the provisioned ticket resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

Generic Finder

This class allows making GET requests to a resource in the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.
source string Relative url where is located the resource.
reponseJsonData string Relative url where is located the resource. Can be null
error_not_found string String error which will be thrown on not_found error.
serviceBaseURL string base of the uri petition

geocluster

This section covers the Geocluster model and the GeoclusterFinder class used to create, configure and query geoclusters and their features.

Subsections of geocluster

Geocluster

This is a base object that contains everything you can do with geoclusters.

constructor

Constructor

Parámetros

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

withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Geocluster


Geocluster Finder

This class allows making GET requests to the geocluster resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findAll()

Find all available geocluster. This execute a GET http method

Retorna

Tip

Tipo: Promise


findById(id)

Find a specify geocluster by an identifier. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Identifier of the geocluster.

Retorna

Tip

Tipo: Promise


findFeatures(id, { zoom, topRight, bottomLeft })

Find features inside the coordinates. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Identifier of the geocluster.
coordinates Object square defined by the coordinates and the zoom used to find the inside features .

Retorna

Tip

Tipo: Promise


Internal Open Gate API

This is an abstract class. It must be extended by another class that defines the backend, and it is used to make requests to the OpenGate North API from a browser or a Node.js server.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
_options { url: string,port: string,version: string,apiKey: string} this is configuration about Opengate North API.
ampliaREST AmpliaREST this is a backend selected to manage a request to Opengate North API.

administrativeStateSearchBuilder()

This returns a AdministrativeStateSearchBuilder to build a specific AdministrativeStateSearchBuilder

Retorna

Tip

alarmsSearchBuilder()

This returns a AlarmsSearchBuilder to build a specific AlarmsSearch

Retorna

Tip

allowedResourceTypeSearchBuilder()

This returns a AllowedResourceTypeSearchBuilder to build a specific AllowedResourceTypeSearchBuilder

Retorna

Tip

areasBuilder()

This returns a AreasBuilder to build a specific area

Retorna

Tip

Tipo: Areas


areasSearchBuilder()

This returns a AreasSearchBuilder to build a specific AreasSearch

Retorna

Tip

assetsSearchBuilder()

This returns a AssetsSearchBuilder to build a specific AssetSearch

Retorna

Tip

bulkExecutionBuilder(organization, processorId, timeout)

This returns a util to create a bulk execution

Retorna

Tip

bulkExecutionSearchBuilder()

This returns a BulkExecutionSearchBuilder to build a specific bulk

Retorna

Tip

bulkSearchBuilder()

This returns a BulkSearchBuilder to build a specific BulkSearchBuilder

Retorna

Tip

bundlesBuilder()

This returns a BundlesBuilder to build a specific BundlesBuilder

Retorna

Tip

Tipo: Bundles


bundlesSearchBuilder()

This returns a BundlesSearchBuilder to build a specific BundlesSearchBuilder

Retorna

Tip

certificatesBuilder()

This returns a util to create a certificate

Retorna

Tip

Tipo: Certificates


certificatesSearchBuilder()

This returns a CertificatesSearchBuilder to build a specific CertificatesSearchBuilder

Retorna

Tip

channelsBuilder()

This returns a ChannelsBuilder to build a specific WorkgroupsSearch

Retorna

Tip

Tipo: Channels


channelsSearchBuilder()

This returns a ChannelsSearchBuilder to build a specific ChannelsSearch

Retorna

Tip

commsModuleMessageMessageBuilder()

Retorna

Tip

communicationsModuleTypeSearchBuilder()

This returns a CommunicationsModuleTypeSearchBuilder to build a specific CommunicationsModuleTypeSearch

Retorna

Tip

connectorFunctionsBuilder(organization, channel, identifier, connectorFunctionData)

This returns a ConnectorFunctions

Retorna

Tip

connectorFunctionsCatalogBuilder(identifier, connectorFunctionsCatalog)

Parámetros

Nombre Tipo Opcional Descripción
identifier String only update or delete
connectorFunctionsCatalog Object

Retorna

Tip

countryCodesSearchBuilder()

This returns a CountryCodesSearchBuilder to build a specific CountryCodesSearchBuilder

Retorna

Tip

datamodelsBuilder(organization)

This returns a Datamodels to build a specific Datamodels

Retorna

Tip

Tipo: Datamodels


datamodelsHelper(organization, datamodel)

This returns a DatamodelsHelper to build a specific DatamodelsHelper

Retorna

Tip

datamodelsSearchBuilder()

This returns a DatamodelsSearchBuilder to build a specific DatamodelsSearchBuilder

Retorna

Tip

datapointsBuilder()

This returns a datapointsBuilder to build a specific Datapoint

Retorna

Tip

Tipo: Datapoint


datapointsSearchBuilder()

This returns a DatapointsSearchBuilder to build a specific DatapointsSearchBuilder

Retorna

Tip

datasetEntitiesSearchBuilder(organization, dataset)

This returns a DatasetEntitiesSearchBuilder to build a specific DatasetEntitiesSearch

Retorna

Tip

datasetsBuilder()

This returns a DatasetBuilder to build a specific dataset

Retorna

Tip

Tipo: Datasets


datasetsCatalogSearchBuilder()

This returns a DatasetsCatalogSearchBuilder to build a specific DatasetsCatalogSearc

Retorna

Tip

datasetSearchBuilder(organization, dataset)

This returns a DatasetSearchBuilder to build a specific DatasetSearch

Retorna

Tip

datastreamBuilder()

This returns a datastreamBuilder to build a specific Datastream

Retorna

Tip

Tipo: Datastream


datastreamsBuilder()

This returns a datastream to build a specific Datastream

Retorna

Tip

Tipo: DatastreamsBuilder


datastreamsSearchBuilder()

This returns a DatastreamsSearchBuilder to build a specific DatastreamsSearchBuilder

Retorna

Tip

deviceMessageBuilder()

This returns a DevicesSouth to build a specific DevicesSouth

Retorna

Tip

devicePlansBuilder(organization)

This returns a DevicePlans to build a specific device plan

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

devicesSearchBuilder()

This returns a DevicesSearchBuilder to build a specific DeviceSearch

Retorna

Tip

entitiesSearchBuilder()

This returns a EntitiesSearchBuilder to build a specific EntitiesSearch

Retorna

Tip

executionsHistorySearchBuilder()

This returns a ExecutionsHistorySearchBuilder to build a specific ExecutionsSearch

Retorna

Tip

executionsSearchBuilder()

This returns a ExecutionsSearchBuilder to build a specific ExecutionsSearch

Retorna

Tip

feedsSearchBuilder()

This returns a FeedsSearchBuilder to build a specific FeedsSearchBuilder

Retorna

Tip

fieldsDefinitionSearchBuilder()

This returns a FieldsDefinitionSearchBuilder to build a specific FieldsDefinitionSearchBuilder

Retorna

Tip

geoclusterBuilder()

This returns a util to regenerate geloclouster

Retorna

Tip

Tipo: Geocluster


hardwareMessageBuilder()

Retorna

Tip

Tipo: Hardware


ioTDatastreamAccessSearchBuilder()

This returns a IoTDatastreamAccessSearchBuilder to build a specific IoTDatastreamAccessSearchBuilder

Retorna

Tip

ioTDatastreamPeriodSearchBuilder()

This returns a IoTDatastreamPeriodSearchBuilder to build a specific IoTDatastreamPeriodSearchBuilder

Retorna

Tip

ioTDatastreamStoragePeriodSearchBuilder()

This returns a IoTDatastreamStoragePeriodSearchBuilder to build a specific IoTDatastreamStoragePeriodSearchBuilder

Retorna

Tip

manufacturerModelsBuilder(manufacturerIdentifier)

This returns a ManufacturerModelsBuilder to build a specific ManufacturerModelsBuilder

Retorna

Tip

Tipo: ManufacturerModelsBuilder


manufacturersBuilder()

This returns a ManufacturersBuilder to build a specific ManufacturersBuilder

Retorna

Tip

Tipo: ManufacturersBuilder


mobileMessageMessageBuilder()

Retorna

Tip

Tipo: Mobile


mobilePhoneProviderSearchBuilder()

This returns a MobilePhoneProviderSearchBuilder to build a specific MobilePhoneProviderTypeSearch

Retorna

Tip

newAreaFinder()

This returns a util to find a area

Retorna

Tip

Tipo: AreaFinder


newBulkExecutionFinder()

This returns a util to find summary and download a bulk executions

Retorna

Tip

Tipo: BulkFinder


newBulkFinder()

This returns a util to find and download a bulk

Retorna

Tip

Tipo: BulkFinder


newBundleFinder()

This returns a util to find a bundle

Retorna

Tip

Tipo: BundleFinder


newCertificateFinder(organization, channel, name)

This return a util to launch actions on a rule This return a util to find a certificate

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name of the rule
channel string channel name of the rule
name string rule name

Retorna

Tip

newChannelFinder()

This returns a util to find a channel

Retorna

Tip

newConnectorFunctionsCatalog()

This returns a ConnectorFunctionsCatalog

Retorna

Tip

newConnectorFunctionsCatalogFinder()

This returns a ConnectorFunctionsCatalogFinder

Retorna

Tip

newConnectorFunctionsFinder()

This returns a ConnectorFunctionsFinder

Retorna

Tip

newConnectorFunctionsHelper()

This returns a ConnectorFunctionsHelper

Retorna

Tip

newCountriesCatalog()

This returns a util to find countries catalog

Retorna

Tip

newDatamodelsFinder()

This returns a util to find a datamodel

Retorna

Tip

newDatasetFinder()

This returns a to find Dataset configuration

Retorna

Tip

newDeviceFinder()

This returns a util to find a device

Retorna

Tip

Tipo: DeviceFinder


newDevicePlansFinder()

This returns a util to find device plans

Retorna

Tip

newDomainsFinder()

This returns a util to find a domains hierarchy

Retorna

Tip

Tipo: DomainsFinder


newFilterBuilder()

This returns a util to create your own filter to make searching

Retorna

Tip

newGeoclusterFinder()

This returns a util to find a user

Retorna

Tip

newManufacturersFinder()

This returns a util to find a hardware manufacturer

Retorna

Tip

newModelFinder()

This returns a util to find a hardware model

Retorna

Tip

Tipo: ModelFinder


newNotebookFinder()

This returns a util to find notebooks

Retorna

Tip

newNotebookSchedulerFinder()

This returns a util to find notebooks schedulers

Retorna

Tip

Tipo: NotebookSchedulerFinder


newOperationActions(operationId)

This returns a util to operation actions on an operation

Parámetros

Nombre Tipo Opcional Descripción
operationId string identifier of operation

Retorna

Tip

newOperationFinder()

This returns a util to find a operation

Retorna

Tip

newOperationTypeCatalog()

This returns a util to find Operation Types Templates

Retorna

Tip

Tipo: OperationTypeCatalog


newOperationTypeFinder()

This returns a util to find Operation Types

Retorna

Tip

newOrganizationFinder()

This returns a util to find a organization

Retorna

Tip

newOrganizationManufacturersFinder()

This returns a util to find a hardware manufacturer

Retorna

Tip

Tipo: OrganizationManufacturerFinder


newOrganizationModelFinder()

This returns a util to find a hardware model

Retorna

Tip

Tipo: OrganizationModelFinder


newOrganizationPlansFinder()

This returns a util to find organization plans

Retorna

Tip

newPeriodicityActions(taskId)

This returns a util to manage actions over periodicities

Parámetros

Nombre Tipo Opcional Descripción
taskId string identifier of operation

Retorna

Tip

newProvisionProcessorsFinder()

This returns a util to find a provision procesor

Retorna

Tip

Tipo: ProvisionProcessorsFinder


newRuleConfigurationsCatalog()

This returns a util to find Rule Configurations Templates

Retorna

Tip

newRuleConfigurationsFinder()

This returns a util to find Rule Configurations

Retorna

Tip

newRuleConfigurationsHelper()

This returns a util RuleConfigurationsHelper

Retorna

Tip

newScheduleHistoryFinder()

This returns a util to view schedule history

Retorna

Tip

newScheduleImageExecutionFinder()

This returns a util to view schedule image executions

Retorna

Tip

newSchedulePipelineFinder()

This returns a util to view schedule pipelines

Retorna

Tip

newScheduleRestRequestFinder()

This returns a util to view schedule rest requests

Retorna

Tip

newSelectBuilder()

This returns a util to create your own select to make searching

Retorna

Tip

newSoftwareFinder()

This returns a util to find an organization software

Retorna

Tip

newSubscribersFinder()

This returns a util to find a Subscriber

Retorna

Tip

newSubscriptionsFinder()

This returns a util to find a Subscription

Retorna

Tip

newTicketFinder()

This returns a util to find a ticket

Retorna

Tip

Tipo: TicketFinder


newTimeserieFinder()

This returns a to find Timeserie configuration

Retorna

Tip

Tipo: TimeserieFinder


newTimeseriesFunctionFinder()

This returns a util to find a timeseries function

Retorna

Tip

Tipo: TimeseriesFunctionsFinder


newTimeseriesFunctionsHelper()

This returns a TimeseriesFunctionsHelper

Retorna

Tip

newUserFinder()

This returns a util to find a user

Retorna

Tip

Tipo: UserFinder


newWorkgroupFinder()

This returns a util to find a workgroup

Retorna

Tip

newWorkgroupRelationsFinder()

This returns a WorkgroupRelationsFinder

Retorna

Tip

notebookLauncherBuilder()

This returns a NotebookLauncherBuilder to build a specific NotebookLauncherBuilder

Retorna

Tip

Tipo: NotebookLauncherBuilder


notebookSchedulerBuilder()

This returns a NotebookSchedulerBuilder to build a specific NotebookSchedulerBuilder

Retorna

Tip

Tipo: NotebookSchedulerBuilder


operationalStatusSearchBuilder()

This returns a OperationalStatusSearchBuilder to build a specific OperationalStatusSearchBuilder

Retorna

Tip

operationsSearchBuilder()

This returns a OperationsSearchBuilder to build a specific ExecutionssSearch

Retorna

Tip

operationTypeBuilder(organization, name, operationTypeObj)

This returns a util to update an Operation Type

Retorna

Tip

operationTypesSearchBuilder()

This returns a OperationTypesSearchBuilder to build a specific OperationTypesSearch

Retorna

Tip

Tipo: OperationTypesSearchBuilder


organizationManufacturerModelsBuilder(organization, manufacturerIdentifier)

This returns a OrganizationManufacturerModelsBuilder to build a specific OrganizationManufacturerModelsBuilder

Retorna

Tip

Tipo: OrganizationManufacturerModelsBuilder


organizationManufacturersBuilder(organization)

This returns a OrganizationManufacturersBuilder to build a specific OrganizationManufacturersBuilder

Retorna

Tip

Tipo: OrganizationManufacturersBuilder


organizationPlansBuilder(organization)

This returns a OrganizationPlans to build a specific organization plan

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

organizationsBuilder()

This returns a OrganizationsBuilder to build a specific OrganizationsBuilder

Retorna

Tip

organizationsSearchBuilder()

This returns a util to search organizations

Retorna

Tip

powerSupplyMessageBuilder()

Retorna

Tip

Tipo: PowerSupply


provisionProcessorsBuilder()

This returns a ProvisionsProcesorsBuilder to build a specific ProvisionsProcesorsBuilder

Retorna

Tip

Tipo: provisionProcessorsBuilder


qratingsBuilder()

This returns a Qrating to build a specific Qrating

Retorna

Tip

Tipo: QratingsBuilder


rawSearchBuilder()

Create custom search with custom url and raw filter

Retorna

Tip

resourceTypeSearchBuilder()

This returns a ResourceTypeSearchBuilder to build a specific ResourceTypeSearchBuilder

Retorna

Tip

ruleConfigurationBuilder(organization, channel, name, ruleConfigObj)

This returns a util to update a Rule Configuration

Retorna

Tip

rulesSearchBuilder()

This returns a RulesSearchBuilder to build a specific RulesSearch

Retorna

Tip

scheduleImageExecutionBuilder()

This returns a util to build schedule image executions

Retorna

Tip

schedulePipelineBuilder()

This returns a util to build a pipeline

Retorna

Tip

Tipo: SchedulePipeline


scheduleRestRequestBuilder()

This returns a util to build schedule rest requests

Retorna

Tip

Tipo: RestRequest


serviceGroupSearchBuilder()

This returns a ServiceGroupSearchBuilder to build a specific ServiceGroupSearchBuilder

Retorna

Tip

softwareMessageBuilder()

Retorna

Tip

Tipo: Software


softwaresBuilder(organization)

This returns a SoftwaresBuilder to build a specific SoftwaresBuilder

Retorna

Tip

Tipo: SoftwaresBuilder


softwaresSearchBuilder()

This returns a SoftwaresSearchBuilder to build a specific SoftwaresSearchBuilder

Retorna

Tip

storageMessageBuilder()

Retorna

Tip

Tipo: Storage


subscriberMessageBuilder()

Retorna

Tip

Tipo: SubscriberMessage


subscribersSearchBuilder()

This returns a SubscribersSearchBuilder to build a specific DeviceSearch

Retorna

Tip

subscriptionMessageBuilder()

Retorna

Tip

Tipo: SubscriptionMessage


subscriptionsSearchBuilder()

This returns a SubscriptionsSearchBuilder to build a specific DeviceSearch

Retorna

Tip

tasksSearchBuilder()

This returns a TasksSearchBuilder to build a specific TasksSearch

Retorna

Tip

ticketPrioritySearchBuilder()

This returns a TicketPrioritySearchBuilder to build a specific TicketPrioritySearchBuilder

Retorna

Tip

ticketSeveritySearchBuilder()

This returns a TicketSeveritySearchBuilder to build a specific TicketSeveritySearchBuilder

Retorna

Tip

ticketsSearchBuilder()

This returns a TicketsSearchBuilder to build a specific TicketSearch


ticketStatusSearchBuilder()

This returns a TicketStatusSearchBuilder to build a specific TicketStatusSearchBuilder

Retorna

Tip

timeserieDatasetBuilder(organization, timeserie)

This returns a TimeserieDatasetBuilder to build a specific TimeserieDataset

Retorna

Tip

timeserieDownsamplerBuilder(organization, timeserie, entityId)

This returns a TimeserieDownsamplerBuilder to build a specific TimeserieDownsampler

Retorna

Tip

timeseriesBuilder()

This returns a TimeserieBuilder to build a specific timeserie

Retorna

Tip

Tipo: Timeseries


timeserieSearchBuilder(organization, timeserie)

This returns a TimeserieSearchBuilder to build a specific TimeserieSearch

Retorna

Tip

timeseriesFunctionBuilder(organization, identifier)

This returns a TimeserieBuilder to build a specific timeserie

Retorna

Tip

timezoneSearchBuilder()

This returns a TimezoneSearchBuilder to build a specific TimezoneSearchBuilder

Retorna

Tip

usageMessageBuilder()

Retorna

Tip

Tipo: Usage


userLanguagesSearchBuilder()

This returns a UserLanguagesSearchBuilder to build a specific UserLanguagesSearchBuilder

Retorna

Tip

userProfilesSearchBuilder()

This returns a UserProfilesSearchBuilder to build a specific UserProfilesSearchBuilder

Retorna

Tip

usersBuilder()

This returns a util to create a user

Retorna

Tip

Tipo: User


usersSearchBuilder()

This returns a UsersSearchBuilder to build a specific UsersSearch

Retorna

Tip

workgroupRelationsBuilder()

This returns a WorkgroupRelationsBuilder to build a specific workgroup relation

Retorna

Tip

workgroupsBuilder()

This returns a WorkgroupsBuilder to build a specific workgroup

Retorna

Tip

Tipo: Workgroups


workgroupsSearchBuilder()

This returns a WorkgroupsSearchBuilder to build a specific WorkgroupsSearch

Retorna

Tip

Subsections of iot

Subsections of catalog

Category

Defines the builder used to configure a category of a datamodel, including the datastreams it groups.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference 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 used to configure a datastream of an IoT datamodel.

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

ogapi.DatastreamsBuilder().build()

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 used to configure the quality rating (Qrating) of a datastream in an IoT datamodel.

build()

Build a Qrating json object

Retorna

Tip

Tipo: Object
Datastream json object

Ejemplos

ogapi.QratingsBuilder().build()

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


Subsections of datamodels

Datamodels

This is a base object for creating an 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 allows making GET requests to the IoT datamodel resource of the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference 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 updating and deleting an 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


Subsections of manufacturers

Manufacturer Finder

This class allows you to make GET requests to the hardware manufacturers resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findAll()

Download all manufacturers. This executes a GET HTTP method

Retorna

Tip

Tipo: Promise


findById(identifier)

Download a specific manufacturer by its id. This executes a GET HTTP method

Parámetros

Nombre Tipo Opcional Descripción
identifier string manufacturer identifier .

Retorna

Tip

Tipo: Promise


findMediaById(manufacturerId, mediaIdentifier)

Download a specific manufacturer media by its ids. This executes a GET HTTP method

Parámetros

Nombre Tipo Opcional Descripción
manufacturerId string manufacturer identifier .
mediaIdentifier string media identifier.

Retorna

Tip

Tipo: Promise


findMedias(manufacturerId)

Download manufacturer medias. This executes a GET HTTP method

Parámetros

Nombre Tipo Opcional Descripción
manufacturerId string manufacturer identifier .

Retorna

Tip

Tipo: Promise


Manufacturer Media

This is a base object that contains everything you can do with ManufacturerMedia.

constructor

Constructor

Parámetros

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

create(rawFile)

This invokes a request to the OpenGate North API and the callback is managed by promises. This method creates a deployment element

Parámetros

Nombre Tipo Opcional Descripción
rawFile File this File is the deployment element

Retorna

Tip

Tipo: Promise


withFile(file)

Set the file attribute

Parámetros

Nombre Tipo Opcional Descripción
file string required field

Retorna

Tip

Tipo: ManufacturerMedia


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: ManufacturerMedia


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: ManufacturerMedia


Manufacturers

This is a base object that contains everything you can do with Manufacturers.

constructor

Constructor

Parámetros

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

withAddress(address)

Set the address attribute

Parámetros

Nombre Tipo Opcional Descripción
address string

Retorna

Tip

Tipo: Manufacturers


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Manufacturers


withEmail(email)

Set the email attribute

Parámetros

Nombre Tipo Opcional Descripción
email string

Retorna

Tip

Tipo: Manufacturers


withFax(fax)

Set the fax attribute

Parámetros

Nombre Tipo Opcional Descripción
fax string

Retorna

Tip

Tipo: Manufacturers


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Manufacturers


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Manufacturers


withNotes(notes)

Set the notes attribute

Parámetros

Nombre Tipo Opcional Descripción
notes string

Retorna

Tip

Tipo: Manufacturers


withTelephone(telephone)

Set the telephone attribute

Parámetros

Nombre Tipo Opcional Descripción
telephone string

Retorna

Tip

Tipo: Manufacturers


withUrl(url)

Set the url attribute

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: Manufacturers


Model Finder

This class allows you to make GET requests to the hardware models resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByManufacturer(manufacturer)

Download all models from a manufacturer. This executes a GET HTTP method

Parámetros

Nombre Tipo Opcional Descripción
manufacturer string manufacturer id .

Retorna

Tip

Tipo: Promise


findByManufacturerAndId(manufacturer, identifier)

Download a specific model by its id. This executes a GET HTTP method

Parámetros

Nombre Tipo Opcional Descripción
manufacturer string manufacturer id .
identifier string model name .

Retorna

Tip

Tipo: Promise


findMediaByManufacturerAndModelAndId(manufacturer, modelId, mediaIdentifier)

Download a specific model media by its ids. This executes a GET HTTP method

Parámetros

Nombre Tipo Opcional Descripción
manufacturer string manufacturer id .
modelId string model identifier .
mediaIdentifier string media identifier.

Retorna

Tip

Tipo: Promise


findMediasByManufacturerAndModel(manufacturer, identifier)

Download a specific model media by its ids. This executes a GET HTTP method

Parámetros

Nombre Tipo Opcional Descripción
manufacturer string manufacturer id .
identifier string model identifier .

Retorna

Tip

Tipo: Promise


Model Media

This is a base object that contains everything you can do with ModelMedia.

constructor

Constructor

Parámetros

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

create(rawFile)

This invokes a request to the OpenGate North API and the callback is managed by promises. This method creates a deployment element

Parámetros

Nombre Tipo Opcional Descripción
rawFile File this File is the deployment element

Retorna

Tip

Tipo: Promise


withFile(file)

Set the file attribute

Parámetros

Nombre Tipo Opcional Descripción
file string required field

Retorna

Tip

Tipo: ModelMedia


withFileName(fileName)

Set the file name attribute

Parámetros

Nombre Tipo Opcional Descripción
fileName string required field

Retorna

Tip

Tipo: ModelMedia


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: ModelMedia


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: ModelMedia


Models

This is a base object that contains everything you can do with Models.

constructor

Constructor

Parámetros

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

withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Models


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Models


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Models


withNotes(notes)

Set the notes attribute

Parámetros

Nombre Tipo Opcional Descripción
notes string

Retorna

Tip

Tipo: Models


withUrl(url)

Set the url attribute

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: Models


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string

Retorna

Tip

Tipo: Models


Subsections of notebookScheduler

Notebook Finder

This class allows making GET requests to the planner resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findAll()

Download a complete list of notebooks for the user. This execute a GET http method

Retorna

Tip

Tipo: Promise


Notebook Launcher

This is the base object for everything you can do with a notebook launcher.

constructor

Constructor

Parámetros

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

generateReport(generateReport)

Sets the generateReport attribute

Parámetros

Nombre Tipo Opcional Descripción
generateReport boolean

Retorna

Tip

Tipo: NotebookLauncher


withIdentifier(identifier)

Sets the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string

Retorna

Tip

Tipo: NotebookLauncher


withReportRetentionDays(reportRetentionDays)

Sets the reportRetentionDays attribute

Parámetros

Nombre Tipo Opcional Descripción
reportRetentionDays number

Retorna

Tip

Tipo: NotebookLauncher


Notebook Scheduler

This is the base object for everything you can do with a notebook scheduler.

constructor

Constructor

Parámetros

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

generateReport(generateReport)

Sets the generateReport attribute

Parámetros

Nombre Tipo Opcional Descripción
generateReport boolean

Retorna

Tip

Tipo: NotebookScheduler


withCronPattern(cronPattern)

Sets the crontab pattern

Parámetros

Nombre Tipo Opcional Descripción
cronPattern string

Retorna

Tip

Tipo: NotebookScheduler


withIdentifier(identifier)

Sets the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string

Retorna

Tip

Tipo: NotebookScheduler


withNotebookId(notebookId)

Sets the notebookId attribute

Parámetros

Nombre Tipo Opcional Descripción
notebookId string

Retorna

Tip

Tipo: NotebookScheduler


withReportRetentionDays(reportRetentionDays)

Sets the reportRetentionDays attribute

Parámetros

Nombre Tipo Opcional Descripción
reportRetentionDays number

Retorna

Tip

Tipo: NotebookScheduler


Scheduler Finder

This class allows making GET requests to the planner resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findAll()

Download a complete list of notebook schedulers for the user. This execute a GET http method

Retorna

Tip

Tipo: Promise


Subsections of operations

Subsections of catalog

Append Entities By

Utility used by BaseOperationBuilder to append target entities in three different ways: by filter, by tags, or by entity list.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
parent BaseOperationBuilder this is a instance of BaseOperationBuilder

filter(filter, resourceType)

Append filter to operation target

Parámetros

Nombre Tipo Opcional Descripción
filter FilterBuilder
resourceType string

Retorna

Tip

Tipo: BaseOperationBuilder


list(entities)

Append entity list to operation target

Parámetros

Nombre Tipo Opcional Descripción
entities EntityListBuilder

Retorna

Tip

Tipo: BaseOperationBuilder


tag(tag)

Set tag to operation target

Parámetros

Nombre Tipo Opcional Descripción
tag string

Retorna

Tip

Tipo: BaseOperationBuilder


Base Operation Builder

Defines the builder used to configure and execute an operation defined in the catalog.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
config object this is configuration about operation.

build()

Build an instance of Operation

Retorna

Tip

Tipo: Operation

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().build()

executeAtDate(date, active)

The operation will be created with delayed start or if you not pass any argument then the method return a cron expression builder.

Parámetros

Nombre Tipo Opcional Descripción
date Date
active boolean If active is false, an operation is created in paused

Retorna

Tip

Tipo: BaseOperationBuilder|CronExpressionBuilder


executeEach(date, name, end, active, description)

The operation will execute with a period that you must define with ExecuteEachBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
name string Name associated to periodicity
or number Date} end - When periodicity ends. By repetitions or by date
active boolean If active is false, an operation is created in paused
description string Description associated to periodicity

Retorna

Tip

Tipo: ExecuteEachBuilder


executeEvery(date, name, end, active, description)

The operation will execute with a period that you must define with ExecuteEveryBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
name string Name associated to periodicity
or number Date} end - When periodicity ends. By repetitions or by date
active boolean If active is false, an operation is created in paused
description string Description associated to periodicity

Retorna

Tip

Tipo: ExecuteEveryBuilder


executeIDLE()

The operation will be created in IDLE state

Retorna

Tip

Tipo: BaseOperationBuilder


executeImmediately()

The operation will be executed immediately.

Retorna

Tip

Tipo: BaseOperationBuilder


executeLater(minutes, active)

The operation will be created with delayed start or if you not pass any argument then the method return a cron expression builder.

Parámetros

Nombre Tipo Opcional Descripción
minutes number
active boolean If active is false, an operation is created in paused

Retorna

Tip

Tipo: BaseOperationBuilder|CronExpressionBuilder


withAckTimeout(milliseconds, format)

Set ackTimeout to operation.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withAckTimeout(11)

withCallback(url)

Set a callback to operation. If it is set also will be set notify with true value

Parámetros

Nombre Tipo Opcional Descripción
url string If null then parameter will be removed into builder

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withCallback("http://my.web")

withJobTimeout(milliseconds, format)

Set a timeout of job.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number if null then parameter will be removed into builder
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withJobTimeout(180)

withNotes(notes)

Set notes to operation

Parámetros

Nombre Tipo Opcional Descripción
notes string If null then parameter will be removed into builder

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withNotes("own notes")

withOperationRetries(operationRetries)

Set operation retries

Parámetros

Nombre Tipo Opcional Descripción
operationRetries Array

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withOperationRetries(11)

withParameters(parameters)

Set parameters of the operation

Parámetros

Nombre Tipo Opcional Descripción
parameters object

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withParameters({ param1: 'value1', param2: 'value2'})

withRetries(retriesNumber)

Set number of retries that operation will have.

Parámetros

Nombre Tipo Opcional Descripción
retriesNumber number

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withRetries(2)

withRetriesDelay(milliseconds, format)

Set delay between operation retries.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withRetriesDelay(11)

withScatteringMaxSpread(percentage)

Set a scattering max spread to operation.

Parámetros

Nombre Tipo Opcional Descripción
percentage number if null then parameter will be removed into builder

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withScatteringMaxSpread(20)

withScatteringStrategy(factor, warningMaxRate)

Set a scattering strategy to operation.

Parámetros

Nombre Tipo Opcional Descripción
factor number if null then parameter will be removed into builder
warningMaxRate number

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withScatteringStrategy(20,4)

withTimeout(milliseconds, format)

Set timeout to operation.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

ogapi.operations.builderFactory.newXXXBuilder().withTimeout(11)

Operation

This is an abstract class; it must be extended by another class that defines the specific request. This class is responsible for managing execute-operation requests to OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is a base url resource
postObj object it will be sent as a data on post action

execute()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


updatePeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


Subsections of parameters

Base Parameter Builder With Parent

This class generates a builder from dynamic content describing a specific parameter of an operation.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
config object this is configuration about parameter operation.
parent BaseOperationBuilder this is a instance of BaseOperationBuilder

build()

This has all knowledge to make a object.

Retorna

Tip

Tipo: object


buildAndAppend()

This method will invoke build and then it will append the parameter to operationBuilder with the correct way

Retorna

Tip

Tipo: BaseOperationBuilder


Parameter Builder Factory

This class generates all the operation parameter builders from the “parameters” attribute in the operation’s configuration JSON.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
parameters object this is configuration about parameter operation.
parent BaseOperationBuilder this is a instance of BaseOperationBuilder

Subsections of period

Execute Each Builder

Defines the builder used to configure the periodicity of an operation. With this builder you can select how the operation repeats: by days, hours, or minutes.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
or number Date} end - When periodicity ends. By repetitions or by date

days(days)

Set a difference of days in each repetition

Parámetros

Nombre Tipo Opcional Descripción
days number

Retorna

Tip

Tipo: BaseOperationBuilder


hours(hours)

Set a difference of hours in each repetition

Parámetros

Nombre Tipo Opcional Descripción
hours number

Retorna

Tip

Tipo: BaseOperationBuilder


minutes(minutes)

Set a difference of minutes in each repetition

Parámetros

Nombre Tipo Opcional Descripción
minutes number

Retorna

Tip

Tipo: BaseOperationBuilder


Execute Every Builder

Defines the builder used to configure the periodicity of an operation. With this builder you can select the period by day, week, month, or year.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity

day()

Every day at time defined will be the pattern

Retorna

Tip

Tipo: BaseOperationBuilder


month(months)

Each month at time and day defined will be the pattern

Parámetros

Nombre Tipo Opcional Descripción
months array months on will be execute the operation

Retorna

Tip

Tipo: ByMonth


Subsections of pattern

By Generic

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
or number Date} end - When periodicity ends. By repetitions or by date

By Month

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
months array Months on will be execute the operation
or number Date} end - When periodicity ends. By repetitions or by date

day(day)

At this day will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
day number

Retorna

Tip

Tipo: BaseOperationBuilder


By Week

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
or number Date} end - When periodicity ends. By repetitions or by date

days(days)

At this days will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
days array

Retorna

Tip

Tipo: BaseOperationBuilder


By Year

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
or number Date} end - When periodicity ends. By repetitions or by date

day(day)

At this day will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
day number

Retorna

Tip

Tipo: BaseOperationBuilder


month(month)

At this month will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
month string

Retorna

Tip

Tipo: BaseOperationBuilder|ByYear


Periodicity Update Builder

executeEach(date, end)

The operation will execute with a period that you must define with ExecuteEachBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
or number Date} end - When periodicity ends. By repetitions or by date

Retorna

Tip

Tipo: ExecuteEach


executeEvery(date, end)

The operation will execute with a period that you must define with ExecuteEveryBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
or number Date} end - When periodicity ends. By repetitions or by date

Retorna

Tip

Tipo: ExecuteEvery


Operation Actions

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
operationId string Identifier of the operation on which the action will be carried out

active()

This invoke a request to OpenGate North API and the callback is managed by promises This function active an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newOperationActions("xxxxx-xxx-xxxx-xxxxx").active()

activePeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newOperationActions("xxxxx-xxx-xxxx-xxxxx").activePeriodicity()

cancel()

This invoke a request to OpenGate North API and the callback is managed by promises This function cancels an operation

Retorna

Tip

Tipo: Promise

Ejemplos

Actions("xxxxx-xxx-xxxx-xxxxx").cancel();

cancelPeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises This function cancel the periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").cancelPeriodicity();

changeCallback(url)

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the callback and passes the operation to the initial state (if activated, activated again)

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").changeCallback("http://[your_application_address]/[your_URI]")

executeLater(minutes)

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the delay and passes the operation to the initial state (if activated, activated again)

Parámetros

Nombre Tipo Opcional Descripción
minutes number

Retorna

Tip

Tipo: promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").executeLater(10)

executeNow()

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses the operation, updates its delay to zero, and activates it so it executes immediately

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").executeNow()

pause()

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").pause()

pausePeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses the periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").pausePeriodicity()

Operation Finder

This class allows making GET requests to the operation resource in OpenGate North API.

constructor

Constructor

Parámetros

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

findById(id)

Download a specific operation by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Operation id.

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newOperationFinder().findById('xxx-xx-xxx-xxx').then().catch();

findExecutionsById(id, size, start)

Download a specific executions of an operation by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Operation id.
size number Defined the number of elements on response
start number Defined the offset on response

Retorna

Tip

Tipo: Promise


findPeriodicityById(id)

Download information of peridodicitiy of a specific operation by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Operation id.

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newOperationFinder().findPeriodicityById('xxx-xx-xxx-xxx').then().catch();

findPeriodicityByPeriodicityId(periodicityId)

Download information of periodicitiy by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
periodicityId string Periodicity id.

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newOperationFinder().findPeriodicityByPeriodicityId('xxx-xx-xxx-xxx').then().catch();

Operations

This class generates all operation builders from a response obtained by searching the catalog/operations resource.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.

builderByOperationName(name)

Create a builder to create an operation

Parámetros

Nombre Tipo Opcional Descripción
name String name of the operation to be created

Retorna

Tip

Tipo: Promise


updatePeriodicityBuilder(operationId)

Create a builder to update the periodicity of an operation

Parámetros

Nombre Tipo Opcional Descripción
operationId String identifier of the operation to be updated~

Retorna

Tip

Tipo: Promise


Periodicity Actions

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
taskId string Identifier of the periodicity on which the action will be carried out

activate()

This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newPeriodicityActions("xxxxx-xxx-xxxx-xxxxx").activate()

cancel()

This invoke a request to OpenGate North API and the callback is managed by promises This function cancel a periodicity

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.periodicityActions("xxxxx-xxx-xxxx-xxxxx").cancelPeriodicity();

pause()

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses a periodicity

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.periodicityActions("xxxxx-xxx-xxxx-xxxxx").pausePeriodicity()

Subsections of operationTypes

Operation Type

This is a base object that contains all you can do about OperationType.

constructor

Constructor

Parámetros

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

applicableTo(applicableTo)

Allows the modification of the applicableTo

Parámetros

Nombre Tipo Opcional Descripción
applicableTo array

Retorna

Tip

Tipo: OperationType


create()

Create a new Rule

Retorna

Tip

Tipo: Promise


delete()

Deletes the selected RuleConfiguration

Retorna

Tip

Tipo: Promise


fromCatalog(fromCatalog)

Set the catalog

Parámetros

Nombre Tipo Opcional Descripción
fromCatalog string

Retorna

Tip

Tipo: OperationType


update()

Udpate a Rule

Retorna

Tip

Tipo: Promise


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: OperationType


withHistoryTtl(historyTtl)

Allows the modification of the operation history retention (TTL). If it is not set, the platform default is applied.

Parámetros

Nombre Tipo Opcional Descripción
historyTtl `@param {number} historyTtl.value - amount of retention time, minimum 1
* @param {string} historyTtl.unit - time unit: days, hours, months or years
*` object with the amount of retention time and its unit, e.g. { value: 30, unit: 'days' }

Retorna

Tip

Tipo: OperationType


withIdentifier(name)

Set the name for update attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: OperationType


withModels(models)

Allows the modification of the allowed models

Parámetros

Nombre Tipo Opcional Descripción
models array

Retorna

Tip

Tipo: OperationType


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: OperationType


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: OperationType


withParameters(parameters)

Allows the modification of the parameters

Parámetros

Nombre Tipo Opcional Descripción
parameters array

Retorna

Tip

Tipo: OperationType


withProfiles(profiles)

Allows the modification of the profiles allowed

Parámetros

Nombre Tipo Opcional Descripción
profiles array

Retorna

Tip

Tipo: OperationType


withSteps(steps)

Allows the modification of the steps

Parámetros

Nombre Tipo Opcional Descripción
steps array

Retorna

Tip

Tipo: OperationType


withTitle(title)

Set the title attribute

Parámetros

Nombre Tipo Opcional Descripción
title string required field

Retorna

Tip

Tipo: OperationType


Operation Type Finder

This class allows making GET requests to the OperationType resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganizationAndName(organization, name)

Performs a get that returns operation type

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
name string Rule Configuration name

Retorna

Tip

Tipo: Promise


Operation Types Catalog

This class allows making GET requests to the OperationType resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

getOperationTypes()

Performs a get that returns operation types templates

Retorna

Tip

Tipo: Promise


Subsections of organization_manufacturer

Manufacturer Finder

This class allows making GET requests to the hardware manufacturers resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

administrable()

Marks visibility administrable for manufacturer list retrieval

Retorna

Tip

Tipo: this


assignable()

Marks visibility assignable for manufacturer list retrieval

Retorna

Tip

Tipo: this


findByOrganization(organization)

Retrieves all manufacturer from a organization

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .

Retorna

Tip

Tipo: Promise


findByOrganizationAndId(organization, identifier)

Retrieves a specific manufacturer

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .
identifier string manufacturer name .

Retorna

Tip

Tipo: Promise


Manufacturers

This is a base object that contains all you can do about Manufacturers.

constructor

Constructor

Parámetros

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

withAddress(address)

Set the address attribute

Parámetros

Nombre Tipo Opcional Descripción
address string

Retorna

Tip

Tipo: Manufacturers


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Manufacturers


withEmail(email)

Set the email attribute

Parámetros

Nombre Tipo Opcional Descripción
email string

Retorna

Tip

Tipo: Manufacturers


withFax(fax)

Set the fax attribute

Parámetros

Nombre Tipo Opcional Descripción
fax string

Retorna

Tip

Tipo: Manufacturers


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Manufacturers


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Manufacturers


withNotes(notes)

Set the notes attribute

Parámetros

Nombre Tipo Opcional Descripción
notes string

Retorna

Tip

Tipo: Manufacturers


withTelephone(telephone)

Set the telephone attribute

Parámetros

Nombre Tipo Opcional Descripción
telephone string

Retorna

Tip

Tipo: Manufacturers


withUrl(url)

Set the url attribute

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: Manufacturers


Model Finder

This class allows making GET requests to the hardware models resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganizationAndManufacturerAndId(organization, manufacturer, identifier)

Download a specific model by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization string model organization .
manufacturer string model manufacturer .
identifier string model name .

Retorna

Tip

Tipo: Promise


Models

This is a base object that contains all you can do about Models.

constructor

Constructor

Parámetros

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

withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Models


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Models


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Models


withNotes(notes)

Set the notes attribute

Parámetros

Nombre Tipo Opcional Descripción
notes string

Retorna

Tip

Tipo: Models


withUrl(url)

Set the url attribute

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: Models


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string

Retorna

Tip

Tipo: Models


organization_software

This section covers the Software model and the SoftwareFinder class used to create, configure and query hardware software resources associated with an organization.

Subsections of organization_software

Software Finder

This class allows making GET requests to the hardware software resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

administrable()

Marks visibility administrable for software list retrieval

Retorna

Tip

Tipo: this


assignable()

Marks visibility assignable for software list retrieval

Retorna

Tip

Tipo: this


findByOrganization(organization)

Retrieves all software from a organization

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .

Retorna

Tip

Tipo: Promise


findByOrganizationAndId(organization, identifier)

Retrieves a specific software

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .
identifier string software name .

Retorna

Tip

Tipo: Promise


Softwares

This is a base object that contains everything you can do with Softwares.

constructor

Constructor

Parámetros

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

withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Softwares


withModels(models)

Set the model attribute

Parámetros

Nombre Tipo Opcional Descripción
models Array

Retorna

Tip

Tipo: Softwares


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Softwares


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string

Retorna

Tip

Tipo: Softwares


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: Softwares


Subsections of organizations

Domain Finder

This class allows making GET requests to the domains resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByNameWithHierarchy(name)

Constructor

Parámetros

Nombre Tipo Opcional Descripción
name string domain name.

Retorna

Tip

Tipo: Promise


Organization Finder

This class allows making GET requests to the organization resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByDomainAndWorkgroup(domain, workgroup)

Performs a get that returns organizations related

Parámetros

Nombre Tipo Opcional Descripción
domain string domain
workgroup string workgroup.

Retorna

Tip

Tipo: Promise


findByName(name)

Find a specify organization by a name. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
name string Organization name

Retorna

Tip

Tipo: Promise


Organizations

This is a base object that contains everything you can do with Organizations.

constructor

Constructor

Parámetros

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

withAuth(auth)

Sets the auth security configuration

Parámetros

Nombre Tipo Opcional Descripción
auth object

Retorna

Tip

Tipo: Organizations


withCountryCode(countryCode)

Set the country code attribute

Parámetros

Nombre Tipo Opcional Descripción
countryCode string

Retorna

Tip

Tipo: Organizations


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Organizations


withDomain(domain)

Set the parent domain

Parámetros

Nombre Tipo Opcional Descripción
domain string

Retorna

Tip

Tipo: Organizations


withLangCode(langCode)

Set the lang code attribute

Parámetros

Nombre Tipo Opcional Descripción
langCode string

Retorna

Tip

Tipo: Organizations


withLocation(latitude, longitude)

Sets the map location attribute

Parámetros

Nombre Tipo Opcional Descripción
latitude number
longitude number

Retorna

Tip

Tipo: Organizations


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Organizations


withOnlyAssignedDomainCertificates(onlyDomainCerts)

Set the onlyAssignedDomainCertificates attribute

Parámetros

Nombre Tipo Opcional Descripción
onlyDomainCerts boolean required field

Retorna

Tip

Tipo: Organizations


withPasswordPolicy(passPolicy)

Sets the password poliicy configuration

Parámetros

Nombre Tipo Opcional Descripción
passPolicy object

Retorna

Tip

Tipo: Organizations


withPlan(plan)

Set the plan attribute

Parámetros

Nombre Tipo Opcional Descripción
plan string

Retorna

Tip

Tipo: Organizations


withTimeZone(timeZone)

Set the time zone attribute

Parámetros

Nombre Tipo Opcional Descripción
timeZone string

Retorna

Tip

Tipo: Organizations


withZoom(zoom)

Sets the map zoom attribute

Parámetros

Nombre Tipo Opcional Descripción
zoom number

Retorna

Tip

Tipo: Organizations


Subsections of plan

Device Plans

This is a base object that contains everything you can do with device plans.

constructor

Parámetros

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

withFlowRate(flowRate)

Set the flowRate attribute

Parámetros

Nombre Tipo Opcional Descripción
flowRate object {value: number, unit: [SECONDS, MINUTES, HOURS, DAYS, MONTHS, YEARS]}

Retorna

Tip

Tipo: OrganizationPlans


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: DevicePlans


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: DevicePlans


Device Plans Finder

This class allows making GET requests to the organization device plans resource in the OpenGate North API.

constructor

Parámetros

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

administrable()

Marks visibility administrable for organization device plans list retrieval. ogapi.newDevicePlansFinder().administrable().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


assignable()

Marks visibility assignable for organization device plans list retrieval ogapi.newDevicePlansFinder().assignable().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


default()

Marks visibility default for organization device plans list list retrieval. ogapi.newDevicePlansFinder().default().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


findByOrganization(organization)

Retrieves all device plans from a organization ogapi.newDevicePlansFinder().findByOrganization('organization').then().catch();

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .

Retorna

Tip

Tipo: Promise


findByOrganizationAndId(organization, identifier)

Retrieves a specific device plan from a organization ogapi.newDevicePlansFinder().findByOrganizationAndId('organization', 'identifier').then().catch();

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .
identifier string plan name.

Retorna

Tip

Tipo: Promise


Organization Plans

This is a base object that contains everything you can do with organization plans.

constructor

Parámetros

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

withFlowRate(flowRate)

Set the flowRate attribute

Parámetros

Nombre Tipo Opcional Descripción
flowRate object {value: number, unit: [SECONDS, MINUTES, HOURS, DAYS, MONTHS, YEARS]}

Retorna

Tip

Tipo: OrganizationPlans


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: OrganizationPlans


withMaxDeviceAmount(maxDeviceAmount)

Set the maxDeviceAmount attribute

Parámetros

Nombre Tipo Opcional Descripción
maxDeviceAmount object optional and greater than 0

Retorna

Tip

Tipo: OrganizationPlans


withMaxStorageLifeTime(maxStorageLifeTime)

Set the maxStorageLifeTime attribute

Parámetros

Nombre Tipo Opcional Descripción
maxStorageLifeTime object required field: {total: number, period: [SECONDS, MINUTES, HOURS, DAYS, MONTHS, YEARS]}

Retorna

Tip

Tipo: OrganizationPlans


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: OrganizationPlans


Organization Plans Finder

This class allows making GET requests to the organization plans resource in the OpenGate North API.

constructor

Parámetros

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

administrable()

Marks visibility administrable for organization plans list retrieval. ogapi.newOrganizationPlansFinder().administrable().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


assignable()

Marks visibility assignable for organization plans list retrieval ogapi.newOrganizationPlansFinder().assignable().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


default()

Marks visibility default for plans list list retrieval. ogapi.newOrganizationPlansFinder().default().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


findByOrganization(organization)

Retrieves all plans from a organization ogapi.newOrganizationPlansFinder().findByOrganization('organization').then().catch();

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .

Retorna

Tip

Tipo: Promise


findByOrganizationAndId(organization, identifier)

Retrieves a specific plan from a organization ogapi.newOrganizationPlansFinder().findByOrganizationAndId('organization', 'identifier').then().catch();

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .
identifier string plan name.

Retorna

Tip

Tipo: Promise


Subsections of provision

Base Provision

This is an abstract class; it must be extended by another class that defines the specific actions of a given provision. This class is responsible for managing requests to OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is a base url resource
timeout number timeout on request
requiredParameters array
serviceBaseURL string base of the uri petition

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()

delete(body)

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

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.organizationsBuilder().withName('delete_organization').delete();
ogapi.usersBuilder().withEmail('delete@user.com').delete();
ogapi.certificatesBuilder().withId('d3l3t3-c3rt1f1c4t3').delete();

update()

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

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.organizationsBuilder().update()

Subsections of bulk

Bulk Execution Builder

This builder gives you the tools necessary to create bulk executions using the OpenGate REST API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI required field. This is ogapi instance
organization string required field. This is the organization name
processorId string required field. This is the provision processor use for bulk provision
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception

bulk(rawFile, extension)

Do a bulk using specific Provision Processor.

Parámetros

Nombre Tipo Opcional Descripción
rawFile `string File`
extension string File format

Ejemplos

ogapi.bulkExecutionBuilder('orgname', 'processorId', 10000).bulk(rawFile, extension)

plan(rawFile, extension, numberOfEntriesToProcess)

Instead of creating a bulk process, returns the provision process planning for the specified entries. This is a synchronous process that does not cause changes in the database.

Parámetros

Nombre Tipo Opcional Descripción
rawFile `string File`
extension string File format
numberOfEntriesToProcess number Number of entries to be processed.

Ejemplos

ogapi.bulkExecutionBuilder('orgname', 'processorId', 10000).plan(rawFile, extension)
 ogapi.bulkExecutionBuilder('orgname', 'processorId', 10000).plan(rawFile, extension, numberOfEntriesToProcess)

Subsections of country

Countries Catalog

This class allows making GET requests to the countries catalog resource in OpenGate North API.

It needs the _internalCountriesFilter client option, and there is no default. It is built that way on purpose: the catalogue is not an endpoint but an asset entity with entityType WIRE and an identifier of the form DOMAIN_<domain>, so the caller has to say which entity to read, the same way it says which api key to use. There is an intention to replace this with a real catalogue endpoint and drop the option again.

new OpenGateAPI({ url, apiKey, _internalCountriesFilter: { organization: ‘myorg’, identifier: ‘DOMAIN_myorg’, ds: ‘provision.administration.countries’ } });

Without it, getCountries() used to die with Cannot read properties of undefined (reading 'organization'), which said nothing about the option that was missing.

constructor

Constructor

Parámetros

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

getCountries()

Performs a get that returns countries

Retorna

Tip

Tipo: Promise


Subsections of entities

Asset Builder

Asset builder. This builder gives you the necessary tools to create an asset 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 subscription will be created
allowedDatastreams array Allowed datastreams to add into the new subscription
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool

Bulk Builder

This class provides the bulk create, update, patch, and delete operations shared by the CSV and JSON bulk builders.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI required field. This is ogapi instance
resource resource required field. This is the resource used for the bulk provision
extension extension required field. Type of file to send
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception

create(rawFile, csv_response)

Execute the bulk creation operation

Parámetros

Nombre Tipo Opcional Descripción
rawFile `string Blob`
csv_response boolean true if you want a response on format csv. False or null if you want a response on format json

Ejemplos

ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).create(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).create(new Blob(), true)

delete(rawFile, csv_response)

Execute the bulk delete operation

Parámetros

Nombre Tipo Opcional Descripción
rawFile `string Blob`
csv_response boolean true if you want a response on format csv. False or null if you want a response on format json

Ejemplos

ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).delete(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).delete(new Blob(), true)

deleteAll(rawFile, csv_response)

Execute the bulk delete-all operation

Parámetros

Nombre Tipo Opcional Descripción
rawFile `string Blob`
csv_response boolean true if you want a response on format csv. False or null if you want a response on format json

Ejemplos

ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).deleteAll(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).deleteAll(new Blob(), true)

patch(rawFile, csv_response)

Execute the bulk patch operation

Parámetros

Nombre Tipo Opcional Descripción
rawFile `string Blob`
csv_response boolean true if you want a response on format csv. False or null if you want a response on format json

Ejemplos

ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(new Blob(), true)

update(rawFile, csv_response)

Execute the bulk update operation

Parámetros

Nombre Tipo Opcional Descripción
rawFile `string Blob`
csv_response boolean true if you want a response on format csv. False or null if you want a response on format json

Ejemplos

ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(new Blob(), true)

Complex Builder

This class extends SimpleBuilder to allow setting complex values. What is a complex value? It is simply a value that needs a communications module identifier to be set into the box.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is the resource url where can be create/delete/update/read the entity
allowedDatastreams array Allowed datastreams to add into the new entity
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool

withComplex(_id, idCommunicationModules, val)

Set a complex value to entity

Parámetros

Nombre Tipo Opcional Descripción
_id string Datastream identifier
idCommunicationModules string Communications module identifier
val object Value to set.

Csv Bulk Builder

CSV builder. This builder gives you the necessary tools to run a CSV bulk provisioning operation using the OpenGate REST API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI required field. This is ogapi instance
organization string required field. This is the organization name where entities will be created, updated or deleted
resource resource required field. This is the resource used for the bulk provision
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Device Builder

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()

Entity Builder

This is a base object that gives you access to everything you can do to provision entities.

constructor

Constructor

Parámetros

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

assetsBuilder(organization, timeout)

Get an AssetBuilder to operate with entities of type asset

Parámetros

Nombre Tipo Opcional Descripción
organization string required field
timeout number timeout on request

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.assetsBuilder('orgname').then(function(assetBuilder){//...}).catch()

devicesBuilder(organization, timeout)

Get a DeviceBuilder to operate with entities of type device.

It resolves a builder rather than returning one, because the allowed datastreams and their schemas are read from the platform first. Note that `with()` ignores a datastream the organization does not allow, warning rather than throwing, so a typo in a datastream name produces an entity missing that value rather than an error.

A device that the platform will accept needs more than an identifier. This is a create that works, and every line of it was needed:

```js const builder = await ogapi.entityBuilder.devicesBuilder('sensehat'); await builder .with('provision.device.identifier', 'my-device') // the entity key .with('provision.administration.identifier', 'my-device') .with('provision.administration.organization', 'sensehat') .with('provision.administration.channel', 'default_channel') .with('provision.administration.plan', 'dev__100_per_day') .with('provision.administration.serviceGroup', 'emptyServiceGroup_onSession') .create(); ```

The platform rejects an omission one field at a time, so finding this set means a round trip per missing field:

  • without `plan`: 400 `0x010E10`, "Device plan is mandatory…"
  • without `serviceGroup`: 400 `0x010000`, "Required field."

These are not validated here on purpose. The plan message ties the requirement to the state of the organization, so a client-side rule would refuse calls that other organizations accept. `provision.device.identifier` is different: it is the entity key, and its absence is refused locally with `OGAPI_ENTITY_KEY_REQUIRED`.

List the plans an organization actually has with `ogapi.newDevicePlansFinder().findByOrganization(organization)`.

Parámetros

Nombre Tipo Opcional Descripción
organization string required field
timeout number timeout on request

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.entityBuilder.devicesBuilder('orgname').then(function(deviceBuilder){//...}).catch()

newCsvBulkBuilder(organization, resource, timeout, async)

Get a new CsvBulkBuilder

Parámetros

Nombre Tipo Opcional Descripción
organization string required field.
resource string required field. Type of resource: entities or tickets
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Retorna

Tip

Tipo: CsvBulkBuilder

Ejemplos

ogapi.newCsvBulkBuilder('orgname', 'entities', 10000, false)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000, true)

newJsonBulkBuilder(organization, resource, timeout, async)

Get a new JsonBulkBuilder

Parámetros

Nombre Tipo Opcional Descripción
organization string required field.
resource string required field. Type of resource: entities or tickets
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Retorna

Tip

Tipo: JsonBulkBuilder

Ejemplos

ogapi.newJsonBulkBuilder('orgname', 'entities', 10000)

newJsonFlattenedBulkBuilder(organization, resource, timeout, async)

Get a new JsonFlattenedBulkBuilder

Parámetros

Nombre Tipo Opcional Descripción
organization string required field.
resource string required field. Type of resource: entities or tickets
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Retorna

Tip

Tipo: JsonFlattenedBulkBuilder

Ejemplos

ogapi.newJsonFlattenedBulkBuilder('orgname', 'entities', 10000)

subscribersBuilder(organization, timeout)

Get a SubscriberBuilder to operate with entities of type subscriber

Parámetros

Nombre Tipo Opcional Descripción
organization string required field
timeout number timeout on request

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.subscribersBuilder('orgname').then(function(subscriberBuilder){//...}).catch()

subscriptionsBuilder(organization, timeout)

Get a SubscriptionBuilder to operate with entities of type subscription

Parámetros

Nombre Tipo Opcional Descripción
organization string required field
timeout number timeout on request

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.subscriptionsBuilder('orgname').then(function(subscriptionBuilder){//...}).catch()

ticketsBuilder(organization, timeout)

Get a TicketBuilder to operate with entities of type ticket

Parámetros

Nombre Tipo Opcional Descripción
organization string required field
timeout number timeout on request

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.ticketsBuilder('orgname').then(function(ticketBuilder){//...}).catch()

Json Bulk Builder

JSON builder. This builder gives you the necessary tools to run a JSON bulk provisioning operation using the OpenGate REST API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI required field. This is ogapi instance
organization string required field. This is the organization name where entities will be created, updated or deleted
resource resource required field. This is the resource used for the bulk provision
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Json Flattened Bulk Builder

JSON flattened builder. This builder gives you the necessary tools to run a flattened-JSON bulk provisioning operation using the OpenGate REST API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI required field. This is ogapi instance
organization string required field. This is the organization name where entities will be created, updated or deleted
resource resource required field. This is the resource used for the bulk provision
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Simple Builder

This class allows setting simple values.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is the resource url where can be create/delete/update/read the entity
allowedDatastreams array Allowed datastreams to add into the new entity
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool

deleteAll()

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

Retorna

Tip

Tipo: Promise


getAllowedDatastreams()

Retorna

Tip

Tipo: array

  • Allowed Datastream definition array

getEntityKey()

Retorna

Tip

Tipo: string

  • Entity identifier

patch()

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

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.organizationsBuilder().update()

update()

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

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.organizationsBuilder().update()

with(_id, val)

Set new datastream value

Parámetros

Nombre Tipo Opcional Descripción
_id string Datastream identifier
val objecr Datastream value. If this value is null then datastream value will be removed.

Subscriber Builder

Subscriber builder. This builder give you the necessary tools to create a subscriber using our OpenGate REST.

constructor

Constructor

Parámetros

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

Subscription Builder

Subscription builder. This builder give you the necessary tools to create a subscription using our OpenGate REST.

constructor

Constructor

Parámetros

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

Ticket Builder

Ticket builder. This builder gives you the necessary tools to create a ticket 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 subscription will be created
allowedDatastreams array Allowed datastreams to add into the new subscription
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool

Provision Generic Finder

This class allows making GET requests to a resource in the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.
source string Relative url where is located the resource.
reponseJsonData string Relative url where is located the resource.
error_not_found string String error which will be thrown on not_found error.

provisionProcessors

This section covers the Provision Processors class, for configuring a provision processor’s script and parameters, and the Provision Processors Finder class, for looking up provision processors by organization.

Subsections of provisionProcessors

Provision Processors

This object represents a provision processor and exposes all the attributes you can configure for it.

constructor

Constructor

Parámetros

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

withConfigurationParams(configurationParams)

Set the ConfigurationParams attribute

Parámetros

Nombre Tipo Opcional Descripción
configurationParams object required field

Retorna

Tip

Tipo: ProvisionPrecessors


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: ProvisionPrecessors


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: ProvisionPrecessors


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: ProvisionPrecessors


withScriptProcessor(scriptProcessor)

Set the ScriptProcessor attribute

Parámetros

Nombre Tipo Opcional Descripción
scriptProcessor object required field

Retorna

Tip

Tipo: ProvisionPrecessors


provision Processors Finder

This class performs GET requests against the provision processors resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganization(organization)

Performs a get that returns list of provision processors

Parámetros

Nombre Tipo Opcional Descripción
organization string organization

Retorna

Tip

Tipo: Promise


findByOrganizationAndProvisionProcessorId(organization, identifier)

Performs a get that returns a definition of provision Processors

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
identifier string Provision Processors identifier

Retorna

Tip

Tipo: Promise


Subsections of rulesConfiguration

Rule Configurations

This is a base object that contains everything you can do with RulesConfigurations.

constructor

Constructor

Parámetros

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

create()

Create a new Rule

Retorna

Tip

Tipo: Promise


delete()

Deletes the selected RuleConfiguration

Retorna

Tip

Tipo: Promise


update()

Update a Rule

Retorna

Tip

Tipo: Promise


updateParameters(newParameters)

Update a Rule's parameters

Retorna

Tip

Tipo: Promise


withActions(actions)

Allows the modification of the actions

Parámetros

Nombre Tipo Opcional Descripción
actions object

Retorna

Tip

Tipo: _RuleCondition


withActionsDelay(actionsDelay)

Set the actions delay attribute

Parámetros

Nombre Tipo Opcional Descripción
actionsDelay number

Retorna

Tip

Tipo: RulesConfigurations


withActive(active)

Set the active attribute

Parámetros

Nombre Tipo Opcional Descripción
active boolean

Retorna

Tip

Tipo: RulesConfigurations


withChannel(channel)

Set the channel attribute

Parámetros

Nombre Tipo Opcional Descripción
channel string required field

Retorna

Tip

Tipo: RulesConfigurations


withCondition(conditionFilter)

Allows the modification of a condition

Parámetros

Nombre Tipo Opcional Descripción
conditionFilter string

Retorna

Tip

Tipo: _RuleCondition


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: RulesConfigurations


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: RulesConfigurations


withJavascript(javascript)

Set the javascript attribute

Parámetros

Nombre Tipo Opcional Descripción
javascript string

Retorna

Tip

Tipo: RulesConfigurations


withMode(mode)

Set the mode attribute

Parámetros

Nombre Tipo Opcional Descripción
mode string

Retorna

Tip

Tipo: RulesConfigurations


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: RulesConfigurations


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: RulesConfigurations


withParameters(parameters)

Allows the modification of the actions

Parámetros

Nombre Tipo Opcional Descripción
parameters array

Retorna

Tip

Tipo: _RuleCondition


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string

Retorna

Tip

Tipo: RulesConfigurations


Rule Configurations Actions

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
name string Identifier of the ryule configuration to operate

cloneTo(newRuleName, newRuleOpenAction, newRuleCloseAction, newRuleNotifications)

Clones a rule configuration into a new one

Parámetros

Nombre Tipo Opcional Descripción
newRuleName string
newRuleOpenAction boolean
newRuleCloseAction string
newRuleNotifications boolean

Retorna

Tip

Tipo: Promise


Rule Configurations Catalog

This class allows you to make GET requests to the RuleConfigurations resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

getTemplates()

Performs a get that returns rule templates

Retorna

Tip

Tipo: Promise


Rule Configurations Finder

This class allows you to make GET requests to the RuleConfigurations resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganizationAndChannelAndName(organization, channel, name)

Performs a get that returns organizations related

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
channel string channel.
name string Rule Configuration name

Retorna

Tip

Tipo: Promise


Rule Configurations Helper

This class allows you to make GET requests to the RuleConfigurationsHelper resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

getDocJavascriptFunctions()

Performs a get that returns documentation of javascript functions from rules service

Retorna

Tip

Tipo: Promise


getDocPrivateJavascriptFunctions()

Performs a get that returns documentation private of javascript functions from rules service

Retorna

Tip

Tipo: Promise


Subsections of schedule

History Finder

This class allows making GET requests to the planner resource of the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganization(organization)

Download a complete list of scheduler history for the organization. This execute a GET http method

Retorna

Tip

Tipo: Promise


findByOrganizationAndSchedulerId(organization, schedulerId)

Download a complete list of scheduler history for the organization and type selected. This execute a GET http method

Retorna

Tip

Tipo: Promise


findByOrganizationAndType(organization, type)

Download a complete list of scheduler history for the organization and type selected. This execute a GET http method

Retorna

Tip

Tipo: Promise


withLimit(limit)

Marks results limit

Retorna

Tip

Tipo: this


withSchedulerId(schedulerId)

Set parameter schedulerIds

Retorna

Tip

Tipo: this


withSchedulerType(schedulerType)

Set parameter schedulerIds

Retorna

Tip

Tipo: this


Image Execution

This is a base object that represents an image execution step within a scheduled pipeline.

constructor

Constructor

Parámetros

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

withEnvFrom(imageExecutionEnvFrom)

Sets the env from for imageExecution

Parámetros

Nombre Tipo Opcional Descripción
imageExecutionEnvFrom array

Retorna

Tip

Tipo: ImageExecution


withEnvVars(imageExecutionEnvVars)

Sets the env vars for imageExecution

Parámetros

Nombre Tipo Opcional Descripción
imageExecutionEnvVars object

Retorna

Tip

Tipo: ImageExecution


withIdentifier(identifier)

Sets the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string

Retorna

Tip

Tipo: ImageExecution


withMaxTimeToWaitCallback(asyncResponseMaxTimeToWaitCallback)

Sets the async response with selected timeout

Parámetros

Nombre Tipo Opcional Descripción
asyncResponseMaxTimeToWaitCallback string

Retorna

Tip

Tipo: ImageExecution


withName(imageExecutionName)

Sets the name for imageExecution

Parámetros

Nombre Tipo Opcional Descripción
imageExecutionName string

Retorna

Tip

Tipo: ImageExecution


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string

Retorna

Tip

Tipo: ImageExecution


withScheduleCronExpression(cronExpression, timezone)

Sets the crontab expression for schedule

Parámetros

Nombre Tipo Opcional Descripción
cronExpression string
timezone string

Retorna

Tip

Tipo: ImageExecution


withScheduleExecuteNow(executeNow)

Sets the executeNow attribute

Parámetros

Nombre Tipo Opcional Descripción
executeNow boolean

Retorna

Tip

Tipo: ImageExecution


withScheduleFrom(from)

Sets the from attribute

Parámetros

Nombre Tipo Opcional Descripción
from string

Retorna

Tip

Tipo: ImageExecution


withScheduleMinutesInterval(interval)

Sets the interval for schedule in minutes

Parámetros

Nombre Tipo Opcional Descripción
interval number in minutes

Retorna

Tip

Tipo: ImageExecution


withScheduleTo(to)

Sets the to attribute

Parámetros

Nombre Tipo Opcional Descripción
to string

Retorna

Tip

Tipo: ImageExecution


withTag(imageExecutionTag)

Sets the tag for imageExecution

Parámetros

Nombre Tipo Opcional Descripción
imageExecutionTag string

Retorna

Tip

Tipo: ImageExecution


withTimeout(timeout)

Sets the execution timeout for imageExecution

Parámetros

Nombre Tipo Opcional Descripción
timeout string

Retorna

Tip

Tipo: ImageExecution


Image Execution Finder

This class allows making GET requests to the planner resource of the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganization(organization)

Download a complete list of image executions for the organization. This executes a GET HTTP method.

Retorna

Tip

Tipo: Promise


Pipeline

This is a base object that represents a pipeline of image executions and REST requests to run on a schedule.

constructor

Constructor

Parámetros

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

addImageExecution(imageExecution)

Adds an Image Execution to the pipeline

Parámetros

Nombre Tipo Opcional Descripción
imageExecution ImageExecution

Retorna

Tip

Tipo: Pipeline


addRestResquest(restRequest)

Adds a rest request to the pipeline

Parámetros

Nombre Tipo Opcional Descripción
restRequest RestRequest

Retorna

Tip

Tipo: Pipeline


withIdentifier(identifier)

Sets the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string

Retorna

Tip

Tipo: Pipeline


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string

Retorna

Tip

Tipo: Pipeline


withScheduleCronExpression(cronExpression, timezone)

Sets the crontab expression for schedule

Parámetros

Nombre Tipo Opcional Descripción
cronExpression string
timezone string

Retorna

Tip

Tipo: Pipeline


withScheduleExecuteNow(executeNow)

Sets the executeNow attribute

Parámetros

Nombre Tipo Opcional Descripción
executeNow boolean

Retorna

Tip

Tipo: Pipeline


withScheduleFrom(from)

Sets the from attribute

Parámetros

Nombre Tipo Opcional Descripción
from string

Retorna

Tip

Tipo: Pipeline


withScheduleMinutesInterval(interval)

Sets the interval for schedule in minutes

Parámetros

Nombre Tipo Opcional Descripción
interval number in minutes

Retorna

Tip

Tipo: Pipeline


withScheduleTo(to)

Sets the to attribute

Parámetros

Nombre Tipo Opcional Descripción
to string

Retorna

Tip

Tipo: Pipeline


Pipeline Finder

This class allows making GET requests to the planner resource of the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganization(organization)

Download a complete list of pipelines for the organization. This executes a GET HTTP method.

Retorna

Tip

Tipo: Promise


Rest Request

This is a base object that represents a REST request to run on a schedule.

constructor

Constructor

Parámetros

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

withAsyncResponseMaxTimeToWaitCallback(asyncResponseMaxTimeToWaitCallback)

Sets the async response with selected timeout

Parámetros

Nombre Tipo Opcional Descripción
asyncResponseMaxTimeToWaitCallback string

Retorna

Tip

Tipo: RestRequest


withBody(restRequestBody)

Sets the body for restRequest

Parámetros

Nombre Tipo Opcional Descripción
restRequestBody string

Retorna

Tip

Tipo: RestRequest


withHeaders(restRequestHeaders)

Sets the header for restRequest

Parámetros

Nombre Tipo Opcional Descripción
restRequestHeaders string

Retorna

Tip

Tipo: RestRequest


withIdentifier(identifier)

Sets the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string

Retorna

Tip

Tipo: RestRequest


withMethod(restRequestMethod)

Sets the method for restRequest

Parámetros

Nombre Tipo Opcional Descripción
restRequestMethod string

Retorna

Tip

Tipo: RestRequest


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string

Retorna

Tip

Tipo: RestRequest


withScheduleCronExpression(cronExpression, timezone)

Sets the crontab expression for schedule

Parámetros

Nombre Tipo Opcional Descripción
cronExpression string
timezone string

Retorna

Tip

Tipo: RestRequest


withScheduleExecuteNow(executeNow)

Sets the executeNow attribute

Parámetros

Nombre Tipo Opcional Descripción
executeNow boolean

Retorna

Tip

Tipo: RestRequest


withScheduleFrom(from)

Sets the from attribute

Parámetros

Nombre Tipo Opcional Descripción
from string

Retorna

Tip

Tipo: RestRequest


withScheduleMinutesInterval(interval)

Sets the interval for schedule in minutes

Parámetros

Nombre Tipo Opcional Descripción
interval number in minutes

Retorna

Tip

Tipo: RestRequest


withScheduleTo(to)

Sets the to attribute

Parámetros

Nombre Tipo Opcional Descripción
to string

Retorna

Tip

Tipo: RestRequest


withSyncResponseTimeout(syncResponseTimeout)

Sets the sync response with selected timeout

Parámetros

Nombre Tipo Opcional Descripción
syncResponseTimeout string

Retorna

Tip

Tipo: RestRequest


withUrl(restRequestUrl)

Sets the url for restRequest

Parámetros

Nombre Tipo Opcional Descripción
restRequestUrl string

Retorna

Tip

Tipo: RestRequest


Rest Request Finder

This class allows making GET requests to the planner resource of the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganization(organization)

Download a complete list of REST requests for the organization. This executes a GET HTTP method.

Retorna

Tip

Tipo: Promise


Schedule History Finder

This class allows making GET requests to the planner resource of the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganization(organization)

Download a complete list of scheduler history for the organization. This execute a GET http method

Retorna

Tip

Tipo: Promise


findByOrganizationAndType(organization, type)

Download a complete list of scheduler history for the organization. This execute a GET http method

Retorna

Tip

Tipo: Promise


searching

This section documents the search classes, the FilterBuilder and SelectBuilder query builders, and the related search errors.

Subsections of searching

Asset Search

This class extends Search and allows requests to be made to any available resource in the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this defined parameters to order the result of search
group object this defined the group by

execute()

This invokes a request to the OpenGate North API; the response is handled via promises.

Retorna

Tip

Tipo: Promise


Base Search

This is an abstract class that must be extended by another class defining the specific search. This class is responsible for managing and executing requests to the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is a base url resource
timeout number timeout on request
serviceBaseURL string base of the uri petition

downloadCsv()

Not implemented yet. This invoke a request to OpenGate North API and the callback is managed by promises This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


execute()

This invokes a request to the OpenGate North API; the response is handled via promises.

Retorna

Tip

Tipo: Promise


executeWithAsyncPaging(resource)

This invokes a request for asynchronous paging to the OpenGate North API; each page is returned via promises and a notify callback. To cancel the process, return `false` or a string with a custom message from the notify callback. When the process is canceled, the response will be 403: Forbidden -&gt; {data: &#x27;Cancel process&#x27;|| custom_message, statusCode: 403}

Parámetros

Nombre Tipo Opcional Descripción
resource string resource to find.

Retorna

Tip

Tipo: Promise


builder

Subsections of builder

Administrative State Search Builder

Defines a search over the administrative state catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.administrativeStateSearchBuilder().filter({and:[]}).build()

withEntityType(entityType)

Set entityType to search

Parámetros

Nombre Tipo Opcional Descripción
entityType string model name

Retorna

Tip

Tipo: AdministrativeStateSearchBuilder

Ejemplos

ogapi.administrativeStateSearchBuilder().withEntityType('myEntityType').build()

withId(administrativeStateId)

Sets id to search

Parámetros

Nombre Tipo Opcional Descripción
administrativeStateId string specific type id

Retorna

Tip

Tipo: AdministrativeStateSearchBuilder

Ejemplos

ogapi.administrativeStateSearchBuilder().withId('myId').build()

Alarms Search Builder

Defines a search over Alarms.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group (object)

Retorna

Tip

Tipo: AlarmsSearchBuilder

Ejemplos


Allowed Resource Type Search Builder

Defines a search over mobile phone provider catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.AllowedResourceTypeSearchBuilder().build()

withType(type)

Sets type to search

Parámetros

Nombre Tipo Opcional Descripción
type string type to searcg

Retorna

Tip

Tipo: AllowedResourceTypeSearchBuilder

Ejemplos

ogapi.AllowedResourceTypeSearchBuilder().withType('device').build()

Areas Search Builder

Defines a search over Areas.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Assets Search Builder

Defines a search over Assets.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

ogapi.assetsSearchBuilder().onProvisioned().build()

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group (object)

Retorna

Tip

Tipo: AssetsSearchBuilder

Ejemplos


select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select `(SelectBuilder object)`

Retorna

Tip

Tipo: AssetsSearchBuilder

Ejemplos

ogapi.assetsSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.assetsSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "device.temperature.value","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

summary()

The response will only have a summary information

Retorna

Tip

Tipo: AssetsSearchBuilder

Ejemplos

ogapi.assetsSearchBuilder().summary()

Basic Types Search Builder

This is an abstract class; it must be extended by another class that defines the specific search. This class is responsible for managing and executing requests to the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
timeout number timeout on request

execute()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


withPath(path)

Sets path to search

Parámetros

Nombre Tipo Opcional Descripción
path string jsonSchemaPath

Retorna

Tip

Tipo: BasicTypesSearchBuilder

Ejemplos

ogapi.basicTypesSearchBuilder().withPath('string').build()

withPublicParameters(publicParameters)

Sets publicParameters to search

Parámetros

Nombre Tipo Opcional Descripción
publicParameters boolean boolean

Retorna

Tip

Tipo: BasicTypesSearchBuilder

Ejemplos

ogapi.basicTypesSearchBuilder().withPublicParameters(true).build()

Bulk Execution Search Builder

Searches over all created bulk processes, whether already completed or still in progress.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of WPSearch

Retorna

Tip

Tipo: WPSearch

Ejemplos

ogapi.bulkExecutionSearchBuilder().build()

Bulk Search Builder

Defines a search over bulk entity operations.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Bundles Search Builder

Defines a search over Bundles.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Certificates Search Builder

Defines a search over Certificates.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

administrable()

The search result will have all certificates which can be administered by the user

Retorna

Tip

Tipo: CertificatesSearchBuilder

Ejemplos

ogapi.certificatesSearchBuilder().administrable()

assignable()

The search result will have all certificates which can be assignable to some device ogapi.certificatesSearchBuilder().assignable()

Retorna

Tip

Tipo: CertificatesSearchBuilder


withFetch(flag)

Set fecth value

Parámetros

Nombre Tipo Opcional Descripción
flag flag

Retorna

Tip

Tipo: CertificatesSearchBuilder

Ejemplos

ogapi.certificatesSearchBuilder().withFetch(true)

Channels Search Builder

Defines a search over Channels.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: ChannelsSearchBuilder

Ejemplos

ogapi.channelsSearchBuilder().disableDefaultSorted()

summary()

The response will only have a summary information

Retorna

Tip

Tipo: SearchWithSummaryBuilder

Ejemplos

ogapi.channelsSearchBuilder().summary()

Communications Module Type Search Builder

Defines a search over the communications module type catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.administrativeStateSearchBuilder().filter({and:[]}).build()

withType(communicationsModuleType)

Sets id to search

Parámetros

Nombre Tipo Opcional Descripción
communicationsModuleType string specific type

Retorna

Tip

Tipo: CommunicationsModuleTypeSearchBuilder

Ejemplos

ogapi.communicationsModuleTypeSearchBuilder().withType('GENERIC').build()

Country Codes Search Builder

Defines a search over the country codes catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.countryCodesSearchBuilder().filter({and:[]}).build()

Datamodels Search Builder

Defines a search over Datamodels.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Datapoints Search Builder

Defines a search over Datapoints.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

betweenDates(fromDate, toDate)

Set time window to search

Parámetros

Nombre Tipo Opcional Descripción
fromDate date Add from date
toDate date Add to date

Retorna

Tip

Tipo: DatapointsSearchBuilder

Ejemplos

ogapi.datapointsSearchBuilder().withDeviceId('myDevice').build()

select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select `(SelectBuilder object)`

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.entitiesSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "device.temperature.value","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

withDatastream(datastreamId)

Set datastreamId to search

Parámetros

Nombre Tipo Opcional Descripción
datastreamId string Datastream.id of Datapoint

Retorna

Tip

Tipo: DatapointsSearchBuilder

Ejemplos

ogapi.datapointsSearchBuilder().withDeviceId('myDevice').build()

withDeviceId(deviceId)

Set deviceId to search

Parámetros

Nombre Tipo Opcional Descripción
deviceId string Prov.customId of Device

Retorna

Tip

Tipo: DatapointsSearchBuilder

Ejemplos

ogapi.datapointsSearchBuilder().withDeviceId('myDevice').build()

withFeed(feedId)

Set feedName to search

Parámetros

Nombre Tipo Opcional Descripción
feedId string Datastream.id of Datapoint

Retorna

Tip

Tipo: DatapointsSearchBuilder

Ejemplos

ogapi.datapointsSearchBuilder().withDeviceId('myDevice').build()

Dataset Entities Search Builder

Defines a search over Executions.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

ogapi.datasetEntitiesSearchBuilder()

disableCaseSensitive(flag)

The response will return a response by applying the filter with likes case-no-sensitive

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos

ogapi.datasetEntitiesSearchBuilder().disableCaseSensitive()

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos

ogapi.datasetEntitiesSearchBuilder().disableDefaultSorted()

flattened()

The response will return a flattened response

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos

ogapi.datasetEntitiesSearchBuilder().flattened()

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group (object)

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos


removeCaseSensitive()

The response will return a response by deleteing the parameters with likes case-no-sensitive

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos

ogapi.datasetEntitiesSearchBuilder().disableCaseSensitive()

select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select `(SelectBuilder object)`

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos

ogapi.datasetEntitiesSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.datasetEntitiesSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "device.temperature.value","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

Dataset Search Builder

Defines a search over Executions.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

ogapi.datasetSearchBuilder(organization, datasetId).build()

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group (object)

Retorna

Tip

Tipo: DatasetSearchBuilder

Ejemplos


select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select `(SelectBuilder object)`

Retorna

Tip

Tipo: DatasetSearchBuilder

Ejemplos

ogapi.datasetSearchBuilder(organization, datasetId).select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.datasetSearchBuilder(organization, datasetId).select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "device.temperature.value","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

sort(sort)

The search request will use this sort

Parámetros

Nombre Tipo Opcional Descripción
sort (string)

Retorna

Tip

Tipo: DatasetSearchBuilder

Ejemplos


Datasets Catalog Search Builder

Defines a search over Areas.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Datastreams Search Builder

Defines a search over Datastreams.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Devices Search Builder

Defines a search over Devices.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group (object)

Retorna

Tip

Tipo: DevicesSearchBuilder

Ejemplos


summary()

The response will only have a summary information

Retorna

Tip

Tipo: DevicesSearchBuilder

Ejemplos

ogapi.devicesSearchBuilder().summary()

Entities Search Builder

Defines a search over Entities.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

ogapi.entitiesSearchBuilder()

disableCaseSensitive(flag)

The response will return a response by applying the filter with likes case-no-sensitive

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().disableCaseSensitive()

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().disableDefaultSorted()

flattened()

The response will return a flattened response

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().flattened()

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group (object)

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos


removeCaseSensitive()

The response will return a response by deleteing the parameters with likes case-no-sensitive

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().disableCaseSensitive()

select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select `(SelectBuilder object)`

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.entitiesSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "device.temperature.value","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

Executions History Search Builder

Defines a search over Executions.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Executions Search Builder

Defines a search over Executions.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Feeds Search Builder

Defines a search over Feeds.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Fields Definition Search Builder

Defines a search over the fields definition catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.FieldsDefinitionSearchBuilder().build()

withType(fieldDefinitionType)

Sets id to search

Parámetros

Nombre Tipo Opcional Descripción
fieldDefinitionType string specific type

Retorna

Tip

Tipo: fieldsDefinitionSearchBuilder

Ejemplos

ogapi.fieldsDefinitionSearchBuilder().withType('string').build()

Flattened Search Builder

This is an abstract class that extends the base builder to make flattened and summary search requests to the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI this is ogapi instance
routes object this defined the routes. One of those routes must be called on Builder before call build method.

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

ogapi.devicesSearchBuilder().onProvisioned().build()

flattened()

The response will return a flattened response

Retorna

Tip

Tipo: FlattenedSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().flattened()

Io T Datastream Access Search Builder

Defines a search over the IoT datastream access catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.ioTDatastreamAccessSearchBuilder().build()

Io T Datastream Period Search Builder

Defines a search over the IoT datastream period catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.ioTDatastreamPeriodSearchBuilder().build()

Io T Datastream Storage Period Search Builder

Defines a search over the IoT datastream storage period catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.ioTDatastreamStoragePeriodSearchBuilder().build()

Mobile Phone Provider Search Builder

Defines a search over the mobile phone provider catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Operation Types Builder

Defines a search over operation types.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

ogapi.devicesSearchBuilder().onProvisioned().build()

Operational Status Search Builder

Defines a search over operational status catalogs.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.operationalStatusSearchBuilder().filter({and:[]}).build()

withEntityType(entityType)

Set entityType to search

Parámetros

Nombre Tipo Opcional Descripción
entityType string model name

Retorna

Tip

Tipo: OperationalStatusSearchBuilder

Ejemplos

ogapi.operationalStatusSearchBuilder().withEntityType('myEntityType').build()

withId(operationalStatusId)

Sets id to search

Parámetros

Nombre Tipo Opcional Descripción
operationalStatusId string operational status id

Retorna

Tip

Tipo: OperationalStatusSearchBuilder

Ejemplos

ogapi.operationalStatusSearchBuilder().withId('myId').build()

Operations Search Builder

Defines a search over executions’ operations.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Organizations Search Builder

Defines a search over organizations.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: OrganizationsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().disableDefaultSorted()

flattened()

The response will return a flattened response

Retorna

Tip

Tipo: OrganizationsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().flattened()

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group (object)

Retorna

Tip

Tipo: SearchBuilder

Ejemplos


select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select `(SelectBuilder object)`

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.ticket.identifier", [[{"field": "value","alias": "identifier"}], ), SE.add("device.temperature.value", [[{"field": "value"}]))
 ) // Setting SelectBuilder
 ogapi.ticketsSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "provision.ticket.name","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

summary()

The response will only have a summary information

Retorna

Tip

Tipo: OrganizationsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().summary()

Pre Filtered Search Builder

This is an abstract class. It extends the base builder to make all kinds of summary search requests to the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI this is ogapi instance
routes object this defined the routes. One of those routes must be called on Builder before call build method.

collected()

This option forces search api to add a filter of collected content

Retorna

Tip

Tipo: PreFilteredSearchBuilder

Ejemplos

ogapi.subscribersSearchBuilder().collected()

disableCaseSensitive(flag)

The response will return a response by applying the filter with likes case-no-sensitive

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().disableCaseSensitive()

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: PreFilteredSearchBuilder

Ejemplos

ogapi.assetsSearchBuilder().disableDefaultSorted()

provisioned()

This option forces search api to add a filter of provisioned content

Retorna

Tip

Tipo: PreFilteredSearchBuilder

Ejemplos

ogapi.subscribersSearchBuilder().provisioned()

removeCaseSensitive()

The response will return a response by applying the filter with likes case-no-sensitive

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().removeCaseSensitive()

select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select `(SelectBuilder object)`

Retorna

Tip

Tipo: PreFilteredSearchBuilder

Ejemplos

ogapi.devicesSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.devicesSearchBuilder().select({
     "elements": [
         {"name": "provision.device.identifier","fields": ["value"],"alias": "id"},
         {"name": "device.temperature.value","fields": ["value"]}
     ]
 }) //Custom select

Raw Search Builder

Defines a search over a custom resource with a custom filter.

build()

Create Search instance

Retorna

Tip

Tipo: ``
Search


filter(rawFilter)

Set raw filter

Parámetros

Nombre Tipo Opcional Descripción
rawFilter object raw filter

Retorna

Tip

Tipo: ``
RawSearchBuilder


from(url)

Set custom url

Parámetros

Nombre Tipo Opcional Descripción
url string custom Opengate North API url

Retorna

Tip

Tipo: ``
RawSearchBuilder


limit(rawLimit)

Set raw limit

Parámetros

Nombre Tipo Opcional Descripción
rawLimit object raw limit

Retorna

Tip

Tipo: ``
RawSearchBuilder


Resource Type Search Builder

Defines a search over the resource type catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.ResourceTypeSearchBuilder().build()

Rule Configuration Severity Search Builder

Defines a search over the rule configuration severity catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.ruleConfigurationSeveritySearchBuilder().build()

Rule Mode Search Builder

Defines a search over the rule mode catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.ruleModeSearchBuilder().build()

Rule Type Search Builder

Defines a search over the rule type catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.ruleTypeSearchBuilder().build()

Rules Search Builder

Defines a search over Rules.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Search Builder

This is an abstract class. It is the base class for making all kinds of search requests to the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI this is ogapi instance
routes object this defined the routes. One of those routes must be called on Builder before call build method.

addSortAscendingBy(filterField)

Add ascending param into the sort search object

Parámetros

Nombre Tipo Opcional Descripción
filterField string This field must be allowed into the specific resource

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

ogapi.subscriptionsSearchBuilder().addSortAscendingBy('prov.customid') // Order by prov.customid Ascending

addSortBy(filterField, typeSort)

Add ascending/descending param into the sort search object

Parámetros

Nombre Tipo Opcional Descripción
filterField string This field must be allowed into the specific resource
typeSort string

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

ogapi.subscriptionsSearchBuilder().addSortBy('prov.customid','ASCENDING') // Order by prov.customid Ascending
 ogapi.devicesSearchBuilder().addSortBy('prov.customid','DESCENDING') // Order by prov.customid Descending

addSortDescendingBy(filterField)

Add descending param into the sort search object

Parámetros

Nombre Tipo Opcional Descripción
filterField string This field must be allowed into the specific resource

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

ogapi.devicesSearchBuilder().addSortDescendingBy('prov.customid') // Order by prov.customid Descending

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

ogapi.devicesSearchBuilder().onProvisioned().build()

filter(filter)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
filter `(FilterBuilder object)`

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

ogapi.subscriptionsSearchBuilder().filter(
     ogapi.newFilterBuilder().and(Ex.like('prov.customid', 'SN32'), Ex.neq('entityId', '1124'))
 ) // Setting FilterBuilder
 ogapi.subscriptionsSearchBuilder().filter(
      {"and": [{"like": {"entityId": "0000000000000001"}}]}
 ) // Custom filter

findAllFields(input)

Return a promise which it will contains an array with fields recommended with complete structure

Retorna

Tip

Tipo: Promise


findFieldPath(field)

Return a promise which it will contains an string with the path of a field

Retorna

Tip

Tipo: Promise


findFields(input)

Return a promise which it will contains an array with fields recommended with only identifier

Retorna

Tip

Tipo: Promise


limit(size, start)

Set reponse pagination.

Parámetros

Nombre Tipo Opcional Descripción
size number Defined the number of elements on response
start number Defined the offset on response

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

ogapi.subscribersSearchBuilder().limit(10) // Without offset
 ogapi.subscribersSearchBuilder().limit(25,50) //With offset value 50

removeSortBy(filterField)

Remove sort param from the search object

Parámetros

Nombre Tipo Opcional Descripción
filterField string This field must be allowed into the specific resource

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

ogapi.subscriptionsSearchBuilder().removeSortBy('prov.customid') // Remove order by prov.customid
 ogapi.subscriptionsSearchBuilder().removeSortBy() // Remove all order by parameters

withTimeout(ms)

The request will have a specific time out if it will be exceeded then the promise throw an exception

Parámetros

Nombre Tipo Opcional Descripción
ms number timeout in milliseconds

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

ogapi.subscriptionsSearchBuilder().withTimeout(2000)

Search With Summary Builder

This is an abstract class. It extends the base builder to make all kinds of summary search requests to the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI this is ogapi instance
routes object this defined the routes. One of those routes must be called on Builder before call build method.

summary()

The response will only have a summary information

Retorna

Tip

Tipo: SearchWithSummaryBuilder

Ejemplos

ogapi.subscriptionsSearchBuilder().summary()

Service Group Search Builder

Defines a search over service group catalogs.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.serviceGroupSearchBuilder().filter({and:[]}).build()

withEntityType(entityType)

Set entityType to search

Parámetros

Nombre Tipo Opcional Descripción
entityType string entity type

Retorna

Tip

Tipo: ServiceGroupSearchBuilder

Ejemplos

ogapi.serviceGroupSearchBuilder().withEntityType('myEntityType').build()

Softwares Search Builder

Defines a search over software entries.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

withHardwareId(hardwareId)

Sets hardware id to search

Parámetros

Nombre Tipo Opcional Descripción
hardwareId string hardware id

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

ogapi.hardwareSearchBuilder().withHardwareId('myHardware').build()

withId(softwareId)

Sets softwareId to search

Parámetros

Nombre Tipo Opcional Descripción
softwareId string software id

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

ogapi.softwareSearchBuilder().withId('mySoftwareId').build()

withManufacturer(manufacturerName)

Set feedName to search

Parámetros

Nombre Tipo Opcional Descripción
manufacturerName string manufacturer name

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

ogapi.softwareSearchBuilder().withManufacturer('myManufacturer').build()

withModel(modelName)

Set modelName to search

Parámetros

Nombre Tipo Opcional Descripción
modelName string model name

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

ogapi.softwareSearchBuilder().withModel('myModel').build()

withModelVersion(modelVersion)

Set modelVersion to search

Parámetros

Nombre Tipo Opcional Descripción
modelVersion string model version

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

ogapi.softwareSearchBuilder().withModelVersion('myModelVersion).build()

withName(softwareName)

Set softwareName to search

Parámetros

Nombre Tipo Opcional Descripción
softwareName string software name

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

ogapi.softwareSearchBuilder().withName('mySoftware').build()

withType(softwareType)

Set softwareType to search

Parámetros

Nombre Tipo Opcional Descripción
softwareType string software version

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

ogapi.softwareSearchBuilder().withType('mySoftwareType).build()

withVersion(softwareVersion)

Set softwareVersion to search

Parámetros

Nombre Tipo Opcional Descripción
softwareVersion string software version

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

ogapi.softwareSearchBuilder().withVersion('mySoftwareVersion).build()

Subscribers Search Builder

Defines a search over Subscribers.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Subscriptions Search Builder

Defines a search over Subscriptions.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Tasks Search Builder

Defines a search over periodic executions’ operations.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Ticket Priority Search Builder

Defines a search over the ticket priority catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.ticketPrioritySearchBuilder().build()

Ticket Severity Search Builder

Defines a search over the ticket severity catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.ticketSeveritySearchBuilder().build()

Ticket Status Search Builder

Defines a search over the ticket status catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.ticketStatusSearchBuilder().build()

Tickets Search Builder

Defines a search over Tickets.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: TicketsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().disableDefaultSorted()

flattened()

The response will return a flattened response

Retorna

Tip

Tipo: TicketsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().flattened()

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group (object)

Retorna

Tip

Tipo: SearchBuilder

Ejemplos


select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select `(SelectBuilder object)`

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.ticket.identifier", [[{"field": "value","alias": "identifier"}], ), SE.add("device.temperature.value", [[{"field": "value"}]))
 ) // Setting SelectBuilder
 ogapi.ticketsSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "provision.ticket.name","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

summary()

The response will only have a summary information

Retorna

Tip

Tipo: TicketsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().summary()

Timeserie Dataset Builder

Defines a search over time series datasets.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

addColumn(name, aggregation, alias)

Add column that will be requested

Parámetros

Nombre Tipo Opcional Descripción
name string
aggregation string
alias string

Retorna

Tip

Tipo: TimeserieDatasetBuilder


build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

ogapi.timeserieDatasetBuilder(organization, timeserieId).build()

columns(columns)

Add columns that will be requested

Parámetros

Nombre Tipo Opcional Descripción
columns array

Retorna

Tip

Tipo: TimeserieDatasetBuilder


select(select)

The search request will have

Parámetros

Nombre Tipo Opcional Descripción
select object

Retorna

Tip

Tipo: TimeserieDatasetBuilder


Timeserie Downsampler Builder

Defines a downsampled search over time series data.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

addColumn(name, interpolation, aggregation, alias)

Add column that will be requested

Parámetros

Nombre Tipo Opcional Descripción
name string
interpolation string
aggregation string
alias string

Retorna

Tip

Tipo: TimeserieDownsamplerBuilder


bucketTime(bucketTime)

The bucket for the downsampling (must be higher than the time series bucket)

Parámetros

Nombre Tipo Opcional Descripción
bucketTime number

Retorna

Tip

Tipo: TimeserieDownsamplerBuilder


build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

ogapi.timeserieDownsamplerBuilder(organization, timeserieId).build()

columns(columns)

Add columns that will be requested

Parámetros

Nombre Tipo Opcional Descripción
columns array

Retorna

Tip

Tipo: TimeserieDownsamplerBuilder


select(select)

The search request will have this select

Parámetros

Nombre Tipo Opcional Descripción
select object

Retorna

Tip

Tipo: TimeserieDownsamplerBuilder


start(start)

The start time for the downsampling

Parámetros

Nombre Tipo Opcional Descripción
start string

Retorna

Tip

Tipo: TimeserieDownsamplerBuilder


Timeserie Search Builder

Defines a search over time series data.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

ogapi.timeserieSearchBuilder(organization, timeserieId).build()

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group (object)

Retorna

Tip

Tipo: TimeserieSearchBuilder

Ejemplos


select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select `(SelectBuilder object)`

Retorna

Tip

Tipo: TimeserieSearchBuilder

Ejemplos

ogapi.timeserieSearchBuilder(organization, timeserieId).select(
     ogapi.newSelectBuilder().add(SE.element("Identifier", ["value"], "id"), SE.add("Temperature", ["value"]))
 ) // Setting SelectBuilder
 ogapi.timeserieSearchBuilder(organization, timeserieId).select({ "elements": [{"name": "Identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "Temperature","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

sort(sort)

The search request will use this sort

Parámetros

Nombre Tipo Opcional Descripción
sort (string)

Retorna

Tip

Tipo: TimeserieSearchBuilder

Ejemplos


Timezone Search Builder

Defines a search over the timezone catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.timezonesSearchBuilder().filter({and:[]}).build()

User Languages Search Builder

Defines a search over the user languages catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.userLanguagesSearchBuilder().filter({and:[]}).build()

User Profiles Search Builder

Defines a search over the user profiles catalog.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

ogapi.userProfileSearchBuilder().filter({and:[]}).build()

withId(userProfileId)

Sets id to search

Parámetros

Nombre Tipo Opcional Descripción
userProfileId string user profile id

Retorna

Tip

Tipo: userProfileSearchBuilder

Ejemplos

ogapi.userProfileSearchBuilder().withId('myId').build()

Users Search Builder

Defines a search over Users.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Workgroups Search Builder

Defines a search over Workgroups.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Device Search

This class extends Search and allows requests to be made to any available resource in the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this defined parameters to order the result of search
group object this defined the group by

execute()

This invokes a request to the OpenGate North API; the response is handled via promises.

Retorna

Tip

Tipo: Promise


Entity Search

This class extends Search and allows requests to be made to any resource under the /entities endpoint of the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this define parameters to order the result of search
group object this define parameters to group
select object this define fields to retrieve

execute()

This invokes a request to the OpenGate North API; the response is handled via promises.

Retorna

Tip

Tipo: Promise


error

This section documents the errors thrown by the search builder classes.

Subsections of error

Search Builder Error

This defines a specific error that is thrown by the build method of the search builders.

constructor

Parámetros

Nombre Tipo Opcional Descripción
error string Error description

Filter Builder

constructor

Ejemplos

var fb = ogapi.newFilterBuilder()

and(args)

Parámetros

Nombre Tipo Opcional Descripción
args [Expression] The parameters will be operators of the class Expression

Ejemplos

fb.and(Ex.like("collected.serialNumber", "SN"), Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"))

or(args)

Parámetros

Nombre Tipo Opcional Descripción
args [Expression] The parameters will be operators of the class Expression

Ejemplos

fb.or(Ex.like("collected.serialNumber", "SN"), Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"))

Search

This class extends BaseSearch and allows requests to be made to any available resource in the OpenGate North API.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this defined parameters to order the result of search
group object
select object
timeout nubmer

Search Without Limit

This class extends BaseSearch and allows requests to be made to any available resource in the OpenGate North API.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this defined parameters to order the result of search
group object
select object
timeout nubmer

Select Builder

constructor

Ejemplos

var sb = ogapi.newSelectBuilder()

add(args)

Parámetros

Nombre Tipo Opcional Descripción
args SelectElement The parameters will be operators of the class SelectElement

Ejemplos

sb.add(Se.element('provision.device.identifier', ['value'], 'identifier'), sb.add(Se.element('device.temperature.value', ['value'])))

Static Search

This class extends Search and allows requests to be made to any available static resource of the OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter

execute()

This invokes a dummy request to the OpenGate North API; the response is handled via promises.

Retorna

Tip

Tipo: Promise


WP Search

This class extends BaseSearch and allows requests to be made to any available resource in the OpenGate North API. Use this class when the resource does not have the ‘search’ prefix; otherwise, use the Search class.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this defined parameters to order the result of search
group object
select object
timeout nubmer

Subsections of security

Certificate Finder

This class allows making GET requests to the certificate resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findById(id)

Download a specific certificate by id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Id of the certificate.

Retorna

Tip

Tipo: Promise


findByIdAndFormat(id, mimetype)

Download a certificate using id and in a specific format. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Id of the certificate.
mimetype string Certificate format mimetype.

Retorna

Tip

Tipo: Promise


Certificates

This is a base object that contains everything you can do with Certificates.

constructor

Constructor

Parámetros

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

create(rawFile)

This invokes a request to the OpenGate North API, and the callback is managed via promises. This method creates a certificate element.

Parámetros

Nombre Tipo Opcional Descripción
rawFile File this File is the certificate

Retorna

Tip

Tipo: Promise


update()

This invokes a request to the OpenGate North API, and the callback is managed via promises. This method updates a certificate element.

Retorna

Tip

Tipo: Promise


withAdministrativeState(administrativeState)

Set the administrativeState attribute

Parámetros

Nombre Tipo Opcional Descripción
administrativeState string

Retorna

Tip

Tipo: Certificates


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string optional field

Retorna

Tip

Tipo: Certificates


withDomains(domains)

Set the domains attribute

Parámetros

Nombre Tipo Opcional Descripción
domains Array

Retorna

Tip

Tipo: Certificates


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field on delete

Retorna

Tip

Tipo: Certificates


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Certificates


withParameters(parameters)

Set the parameters attribute

Parámetros

Nombre Tipo Opcional Descripción
parameters string optional field

Retorna

Tip

Tipo: Certificates


withTags(tags)

Set the tags attribute

Parámetros

Nombre Tipo Opcional Descripción
tags Array

Retorna

Tip

Tipo: Certificates


withUsages(usages)

Set the usages attribute

Parámetros

Nombre Tipo Opcional Descripción
usages Array

Retorna

Tip

Tipo: Certificates


Security

This extends BaseProvision and contains everything you can do with Security.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the provision

timeseries

This section covers the Timeseries class, for defining and configuring timeseries, and the Timeseries Finder class, for looking up timeseries by organization.

Subsections of timeseries

Timeseries

This object represents a timeseries and exposes all the attributes you can configure for it.

constructor

Constructor

Parámetros

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

onlyPlan()

Mark timeseries as plan only

Retorna

Tip

Tipo: Timeseries


optimizationPlan()

Request optimization plan

Retorna

Tip

Tipo: Promise


withBucketColumn(bucketColumn)

Name of generated column with bucket date.Required if timeBucket &gt; 0.

Parámetros

Nombre Tipo Opcional Descripción
bucketColumn string pattern: ^[a-zA-Z0-9 _-]*$

Retorna

Tip

Tipo: Timeseries


withBucketInitColumn(bucketInitColumn)

Name of generated column with bucket init date.

Parámetros

Nombre Tipo Opcional Descripción
bucketInitColumn string pattern: ^[a-zA-Z0-9 _-]*$

Retorna

Tip

Tipo: Timeseries


withColumns(columns)

List of data that is needed for each entity.

Parámetros

Nombre Tipo Opcional Descripción
columns array required field

Retorna

Tip

Tipo: Timeseries


withContext(context)

List of data that is needed for each entity.

Parámetros

Nombre Tipo Opcional Descripción
context array

Retorna

Tip

Tipo: Timeseries


withDescription(description)

Long text to explain timeserie definition

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Timeseries


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Timeseries


withIdentifierColumn(identifierColumn)

Set the identifierColumn attribute

Parámetros

Nombre Tipo Opcional Descripción
identifierColumn string required field

Retorna

Tip

Tipo: Datasets


withName(name)

Name which will be unique in each organization

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Timeseries


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: Timeseries


withOrigin(origin)

Initial date to first bucket with ISO date time format. Next bucket will be calcullated from this date. Default value is created date with time equals 00:00:00.000Z

Parámetros

Nombre Tipo Opcional Descripción
origin string

Retorna

Tip

Tipo: Timeseries


withRetention(retention)

Time that a row is stored to be got in searching. Default value is 1 month

Parámetros

Nombre Tipo Opcional Descripción
retention number

Retorna

Tip

Tipo: Timeseries


withSorts(sorts)

List of sorting fields

Parámetros

Nombre Tipo Opcional Descripción
sorts array required field

Retorna

Tip

Tipo: Timeseries


withTimeBucket(timeBucket)

Duration of buckets in seconds.

Parámetros

Nombre Tipo Opcional Descripción
timeBucket integer required field

Retorna

Tip

Tipo: Timeseries


Timeseries Finder

This class performs GET requests against the timeseries resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganization(organization, expand, dataStreams)

Performs a get that returns list of timeseries

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
expand Array ['columns', 'context']
dataStreams Array ["ds_id_1","ds_id_2"]

Retorna

Tip

Tipo: Promise


findByOrganizationAndName(organization, name)

Performs a get that returns a definition of timeserie

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
name string timeserie name

Retorna

Tip

Tipo: Promise


findByOrganizationAndTimeserieId(organization, timeserieId)

Performs a get that returns a definition of timeserie

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
timeserieId string timeserie identifier

Retorna

Tip

Tipo: Promise


Subsections of timeseriesFunctionsCatalog

Timeseries Function

This is a base object that contains everything you can do with TimeseriesFunction.

constructor

Constructor

Parámetros

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

delete()

Deletes the selected RuleConfiguration

Retorna

Tip

Tipo: Promise


update()

Updates a rule.

Retorna

Tip

Tipo: Promise


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: TimeseriesFunction


withIdentifier(name)

Set the name for update attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: TimeseriesFunction


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: TimeseriesFunction


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: TimeseriesFunction


withReturnType(returnType)

Set the returnType attribute

Parámetros

Nombre Tipo Opcional Descripción
returnType String

Retorna

Tip

Tipo: TimeseriesFunction


withScript(script)

Set the script attribute

Parámetros

Nombre Tipo Opcional Descripción
script string

Retorna

Tip

Tipo: TimeseriesFunction


withValueTypes(valueTypes)

Set the valueTypes attribute

Parámetros

Nombre Tipo Opcional Descripción
valueTypes Array

Retorna

Tip

Tipo: TimeseriesFunction


Timeseries Function Finder

This class allows making GET requests to the TimeseriesFunction resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByOrganization(organization)

Performs a get that returns a list of timeseries function

Parámetros

Nombre Tipo Opcional Descripción
organization string organization

Retorna

Tip

Tipo: Promise


findByOrganizationAndName(organization, name, script)

Performs a get that returns a timeseries function metadata

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
name string Timeseries function Configuration name
script boolean If true script content will be downloaded

Retorna

Tip

Tipo: Promise


Timeseries Functions Helper

This class allows making GET requests to the TimeseriesFunctionsHelper resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

getDocJavascriptFunctions()

Performs a GET that returns documentation of JavaScript functions from the rules service.

Retorna

Tip

Tipo: Promise


getDocPrivateJavascriptFunctions()

Performs a GET that returns documentation of private JavaScript functions from the rules service.

Retorna

Tip

Tipo: Promise


users

This section covers the User class, for managing account attributes and authentication actions, and the User Finder class, for looking up users by email.

Subsections of users

User

This class represents a user in the OpenGate North API and provides methods to manage authentication, credentials, and account attributes.

constructor

Constructor

Parámetros

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

changeApiKey(apiKey)

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a apiKey of a user

Parámetros

Nombre Tipo Opcional Descripción
apiKey String required field

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.usersBuilder().withEmail(example@example.es).withPassword(oldPassword).changeApiKey(newPassword);

changePassword(newPassword)

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a password of a user

Parámetros

Nombre Tipo Opcional Descripción
newPassword String required field

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.usersBuilder().withEmail(example@example.es).withPassword(oldPassword).changePassword(newPassword);

login(email, password, twoFaCode)

This invoke a request to OpenGate North API and the callback is managed by promises This function get a JWT for user with Two Factor Authorithation (optional)

Parámetros

Nombre Tipo Opcional Descripción
email String required field
password String required field
twoFaCode String optional field

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.usersBuilder().login(email, password);
 ogapi.usersBuilder().login(email, password, twoFaCode);

requestResetPassword()

This invoke a request to OpenGate North API and the callback is managed by promises This function request for new password when the user forgets it. Sends a password recovery email

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.usersBuilder().withEmail(example@example.es).requestResetPassword()

updatePassword(newPassword, tokenId)

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a password of a user with a tokenId

Parámetros

Nombre Tipo Opcional Descripción
newPassword String required field
tokenId String required field

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.usersBuilder().withEmail(example@example.es).updatePassword(newPassword, tokenid);

with2FaType(twoFaType)

Set the 2FaType attribute

Parámetros

Nombre Tipo Opcional Descripción
twoFaType string required field

Retorna

Tip

Tipo: User


withApiKey(apiKey)

Set the apiKey attribute. Only on update user

Parámetros

Nombre Tipo Opcional Descripción
apiKey string required field

Retorna

Tip

Tipo: User


withCountryCode(countryCode)

Set the countryCode attribute

Parámetros

Nombre Tipo Opcional Descripción
countryCode string required field

Retorna

Tip

Tipo: User


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: User


withDomain(domain)

Set the domain attribute

Parámetros

Nombre Tipo Opcional Descripción
domain string required field

Retorna

Tip

Tipo: User


withEmail(email)

Set the email attribute

Parámetros

Nombre Tipo Opcional Descripción
email string required field

Retorna

Tip

Tipo: User


withForcePasswordChange(forcePasswordChange)

Set the forcePasswordChange: if true Forces you to reset your password on your next login attempt.

Parámetros

Nombre Tipo Opcional Descripción
forcePasswordChange boolean

Retorna

Tip

Tipo: User


withLangCode(langCode)

Set the langCode attribute

Parámetros

Nombre Tipo Opcional Descripción
langCode string required field

Retorna

Tip

Tipo: User


withLoginWithPassword(loginWithPassword)

Enable or disable login with password

Parámetros

Nombre Tipo Opcional Descripción
loginWithPassword boolean

Retorna

Tip

Tipo: User


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: User


withPassword(password)

Set the password attribute

Parámetros

Nombre Tipo Opcional Descripción
password string required field

Retorna

Tip

Tipo: User


withProfile(profile)

Set the profile attribute

Parámetros

Nombre Tipo Opcional Descripción
profile string required field

Retorna

Tip

Tipo: User


withSurname(surname)

Set the surname attribute

Parámetros

Nombre Tipo Opcional Descripción
surname string required field

Retorna

Tip

Tipo: User


withTimezone(timezone)

Set the timezone attribute

Parámetros

Nombre Tipo Opcional Descripción
timezone string required field

Retorna

Tip

Tipo: User


withWorkgroup(workgroup)

Set the workgroup attribute

Parámetros

Nombre Tipo Opcional Descripción
workgroup string required field

Retorna

Tip

Tipo: User


User Finder

This class performs GET requests against the user resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByEmail(email)

Find a specify user by a email. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
email string Email of the user.

Retorna

Tip

Tipo: Promise


findByEmailAndPassword(email, password)

Find a specific user with apiKey by a email and password. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
email string Email of the user.
password string password of the user.

Retorna

Tip

Tipo: Promise


Subsections of util

Expression

and(args)

Retorna

Tip

Tipo: object
This returns a json with the query of the logical operator "and" built.

Ejemplos

Ex.and(Ex.like("collected.serialNumber", "SN"), Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"))


returns:

{
  and : [
    {
      like: {
        "collected.serialNumber": "SN"
      }
    },  
    {
      eq: {
        "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
      }
    }
  ]
}

eq(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "eq" built.

Ejemplos

Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25")


returns:

{
  eq : {
    "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
  }
}

gt(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "gt" built.

Ejemplos

Ex.gt("collected.imei", "123456786543210")


returns:

{
  gt : {
    "collected.imei": "123456786543210"
  }
}

gte(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "gte" built.

Ejemplos

Ex.gte("collected.imei", "123456786543210")


{
  gte : {
    "collected.imei": "123456786543210"
  }
}

in(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "in" built.

Ejemplos

Ex.in("entityId", ["e64ccd08-e302-4b65-b19d-e38eeb7b2d24","e64ccd08-e302-4b65-b19d-e38eeb7b2d25"])


{
  in : {
    "entityId": ["e64ccd08-e302-4b65-b19d-e38eeb7b2d24","e64ccd08-e302-4b65-b19d-e38eeb7b2d25"]
  }
}

like(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "like" built.

Ejemplos

Ex.like("collected.serialNumber", "SN")


returns:

{
  like : {
    "collected.serialNumber": "SN"
  }
}

lt(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "lt" built.

Ejemplos

Ex.lt("collected.imei", "123456786543210")


returns:

{
  lt : {
    "collected.imei": "123456786543210"
  }
}

lte(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "lte" built.

Ejemplos

Ex.lte("collected.imei", "123456786543210")


{
  lte : {
    "collected.imei": "123456786543210"
  }
}

neq(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "neq" built.

Ejemplos

Ex.neq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25")


returns:

{
  neq : {
    "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
  }
}

or(args)

Retorna

Tip

Tipo: object
This returns a json with the query of the logical operator "or" built.

Ejemplos

Ex.or(Ex.like("collected.serialNumber", "SN"), Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"))


returns:

{
  or : [
    {
      like: {
        "collected.serialNumber": "SN"
      }
    },  
    {
      eq: {
        "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
      }
    }
  ]
}

Subsections of http

Request Spec

constructor

Parámetros

Nombre Tipo Opcional Descripción
method string the HTTP verb.
url string the whole URL, query string included.

abort()

Cancels the request. Works before `end()` too, in which case it never leaves.

Retorna

Tip

Tipo: RequestSpec


accept(type)

Sets Accept, accepting the same shorthands.

Parámetros

Nombre Tipo Opcional Descripción
type string

Retorna

Tip

Tipo: RequestSpec


addEventListener(event, callback)

component-emitter's alias for `on`, which is what superagent's browser request carries. Missed on the first pass because the surface was enumerated from client.js source text, and component-emitter mixes its methods in at runtime rather than assigning them there. Caught in review by Chema.

Parámetros

Nombre Tipo Opcional Descripción
event string
callback function

Retorna

Tip

Tipo: RequestSpec


addListener(event, callback)

superagent's alias for `on` in Node, where the request is an EventEmitter.

Parámetros

Nombre Tipo Opcional Descripción
event string
callback function

Retorna

Tip

Tipo: RequestSpec


agent()

Inert: there is no Node HTTP agent to configure.


attach(name, file, options)

Adds a multipart file. A string is a path, as it was under superagent.

Parámetros

Nombre Tipo Opcional Descripción
name string
file *
options `(string object)=`

Retorna

Tip

Tipo: RequestSpec


auth(user, pass, options)

Sets an Authorization header. Basic by default, as in a browser; `{ type: 'bearer' }` sends the first argument as a token.

Parámetros

Nombre Tipo Opcional Descripción
user string
pass `(string object)=`
options object&#x3D;

Retorna

Tip

Tipo: RequestSpec


buffer()

Inert: buffering was a Node response concern.


ca()

Inert: TLS material belonged to the Node agent.


cert()

Inert: TLS material belonged to the Node agent.


clearTimeout()

Cancels the timers without cancelling the request.

Retorna

Tip

Tipo: RequestSpec


emit(event)

Parámetros

Nombre Tipo Opcional Descripción
event string
args ...*

Retorna

Tip

Tipo: boolean
whether anything was listening.


end(callback)

Sends the request.

Parámetros

Nombre Tipo Opcional Descripción
callback function `(error, response)`, superagent's signature.

Retorna

Tip

Tipo: RequestSpec


eventNames()

Retorna

Tip

Tipo: Array&lt;string&gt;
the events with at least one listener.


field(name, value)

Adds a plain multipart field.

Parámetros

Nombre Tipo Opcional Descripción
name string
value *

Retorna

Tip

Tipo: RequestSpec


get(field)

Reads a header back, case-insensitively.

Parámetros

Nombre Tipo Opcional Descripción
field string

Retorna

Tip

Tipo: *


getHeader(field)

superagent's alias for `get`.

Parámetros

Nombre Tipo Opcional Descripción
field string

Retorna

Tip

Tipo: *


getMaxListeners()

Inert, for symmetry with setMaxListeners.

Retorna

Tip

Tipo: number


hasListeners(event)

component-emitter's own predicate.

Parámetros

Nombre Tipo Opcional Descripción
event string

Retorna

Tip

Tipo: boolean
whether anything is listening.


key()

Inert: TLS material belonged to the Node agent.


listenerCount(event)

Parámetros

Nombre Tipo Opcional Descripción
event string

Retorna

Tip

Tipo: number


listeners(event)

Parámetros

Nombre Tipo Opcional Descripción
event string

Retorna

Tip

Tipo: Array&lt;function&gt;


maxResponseSize()

Inert: the response is read whole, as it was in a browser.


off(event, callback)

Removes one listener, or every listener for the event when no function is given – which is what component-emitter's `off(event)` did.

Parámetros

Nombre Tipo Opcional Descripción
event string
callback function&#x3D;

Retorna

Tip

Tipo: RequestSpec


ok(fn)

Overrides what counts as a successful response.

Parámetros

Nombre Tipo Opcional Descripción
fn function receives the response, returns whether to resolve.

Retorna

Tip

Tipo: RequestSpec


on(event, callback)

Parámetros

Nombre Tipo Opcional Descripción
event string
callback function

Retorna

Tip

Tipo: RequestSpec


once(event, callback)

Parámetros

Nombre Tipo Opcional Descripción
event string
callback function

Retorna

Tip

Tipo: RequestSpec


parse(fn)

Replaces the parser used on the response body.

Parámetros

Nombre Tipo Opcional Descripción
fn function receives the response text, returns the body.

Retorna

Tip

Tipo: RequestSpec


pfx()

Inert: TLS material belonged to the Node agent.


prependListener(event, callback)

Parámetros

Nombre Tipo Opcional Descripción
event string
callback function

Retorna

Tip

Tipo: RequestSpec


prependOnceListener(event, callback)

Parámetros

Nombre Tipo Opcional Descripción
event string
callback function

Retorna

Tip

Tipo: RequestSpec


query(value)

Appends to the query string. Takes an object or an already-encoded string.

Parámetros

Nombre Tipo Opcional Descripción
value `(string object)`

Retorna

Tip

Tipo: RequestSpec


rawListeners(event)

superagent's alias for `listeners`.

Parámetros

Nombre Tipo Opcional Descripción
event string

Retorna

Tip

Tipo: Array&lt;function&gt;


redirects()

Inert: XHR and fetch always follow redirects; superagent could not disable that in a browser.


removeAllListeners(event)

Parámetros

Nombre Tipo Opcional Descripción
event string&#x3D; every event when omitted.

Retorna

Tip

Tipo: RequestSpec


removeEventListener(event, callback)

component-emitter's alias for `off`.

Parámetros

Nombre Tipo Opcional Descripción
event string
callback function&#x3D;

Retorna

Tip

Tipo: RequestSpec


removeListener(event, callback)

superagent's alias for `off`.

Parámetros

Nombre Tipo Opcional Descripción
event string
callback function&#x3D;

Retorna

Tip

Tipo: RequestSpec


responseType(type)

Parámetros

Nombre Tipo Opcional Descripción
type string `blob` is the only value the library uses.

Retorna

Tip

Tipo: RequestSpec


retry()

Inert: retrying is not reproduced, because half a retry policy is worse than none.


send(data)

Attaches a body, and picks the Content-Type the way superagent did – at this point, not at send time, so a `hooks.beforeStart` callback reading `get('Content-Type')` sees what it always saw. Repeated calls merge.

Parámetros

Nombre Tipo Opcional Descripción
data *

Retorna

Tip

Tipo: RequestSpec


serialize(fn)

Replaces the serializer used for an object body.

Parámetros

Nombre Tipo Opcional Descripción
fn function receives the body, returns a string.

Retorna

Tip

Tipo: RequestSpec


set(field, value)

Sets one header, or every header in an object.

Parámetros

Nombre Tipo Opcional Descripción
field `(string object)`
value *

Retorna

Tip

Tipo: RequestSpec
itself, for chaining.


setMaxListeners()

Inert: there is no listener ceiling to raise.

Retorna

Tip

Tipo: RequestSpec


sortQuery()

Inert: the query string is built by the caller, in order.


timeout(options)

Sets the deadline for the whole request, or `{ deadline, response }` for both that and the time allowed before a response starts arriving.

Parámetros

Nombre Tipo Opcional Descripción
options `(number object)`

Retorna

Tip

Tipo: RequestSpec


toJSON()

Retorna

Tip

Tipo: object
the request as data, as superagent's `toJSON` did.


type(type)

Sets Content-Type, accepting superagent's shorthands (`json`, `form`, …).

Parámetros

Nombre Tipo Opcional Descripción
type string

Retorna

Tip

Tipo: RequestSpec


unset(field)

Removes a header, whatever case it was set in.

Parámetros

Nombre Tipo Opcional Descripción
field string

Retorna

Tip

Tipo: RequestSpec


use(fn)

Applies a plugin, superagent's extension point.

Parámetros

Nombre Tipo Opcional Descripción
fn function receives this request.

Retorna

Tip

Tipo: RequestSpec


withCredentials(on)

Sends cookies and HTTP auth on cross-origin requests.

Parámetros

Nombre Tipo Opcional Descripción
on boolean&#x3D; defaults to true, as superagent's did.

Retorna

Tip

Tipo: RequestSpec


North Amplia REST

This is a JavaScript wrapper around a REST API client.

constructor

Constructor of the REST API client.

Parámetros

Nombre Tipo Opcional Descripción
_options { url: string,port: string,version: string,apiKey: string,JTW: string} this is configuration about Opengate North API.
backend function this is a backend selected to manage a request to Opengate North API.

default()

This return a default configuration object

Retorna

Tip

Tipo: object


delete(url, timeout, headers, parameters, body, serviceBaseURL)

Invoke DELETE action to url specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute DELETE
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
body object body of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


get(url, timeout, headers, parameters, asBlob, serviceBaseURL)

Invoke GET action to url specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute GET
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
asBlob boolean response body as Blob
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


patch(url, data, timeout, headers, parameters, serviceBaseURL)

Invoke PATCH action to url and data specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute PATCH
data object attach data to request PATCH
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


post(url, data, timeout, headers, parameters, serviceBaseURL)

Invoke POST action to url and data specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute POST
data object attach data to request POST
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


post_multipart(url, formData, events, timeout, headers, parameters, serviceBaseURL)

Invoke POST multipart action to url and data specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute POST
formData FormData attach data to request POST
events object events allowed, xhr.process
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


put(url, data, timeout, headers, parameters, serviceBaseURL)

Invoke PUT action to url and data specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute PUT
data object attach data to request PUT
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


put_multipart(url, formData, events, timeout, headers, parameters, serviceBaseURL)

Invoke put multipart action to url and data specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute POST
formData FormData attach data to request POST
events object events allowed, xhr.process
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


Subsections of searchingFields

Field Finder

Select Element

element(name, fields)

Parámetros

Nombre Tipo Opcional Descripción
name String Indicates the datastream to show
fields [{field: field, alias:alias}] The fields that you want to show from that datastream

Retorna

Tip

Tipo: Object
This returns a json with the object element built.

Ejemplos

SE.element('provision.device.identifier', ['value'], 'identifier')
 returns:
 {
     name : 'provision.device.identifier',
     fields: ['value'],
     alias: 'identifier
 }

 SE.element('provision.device.identifier', ['value'])
 returns:
 {
     name : 'provision.device.identifier',
     fields: ['value']
 }

South Amplia REST

Subsections of workgroups

Workgroup Finder

This class allows making get requests to the workgroup resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByDomainAndName(domain, name)

Constructor

Parámetros

Nombre Tipo Opcional Descripción
domain string domain name
name string workgroup name

Retorna

Tip

Tipo: Promise


Workgroup Relations

This is a base object that contains all you can do about workgroups.

constructor

Constructor

Parámetros

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

update()

Update not allowed


withChannel(channel)

Set the channel attribute

Parámetros

Nombre Tipo Opcional Descripción
channel string required field for creation or update

Retorna

Tip

Tipo: WorkgroupRelations


withWorkgroup(workgroup)

Set the workgroup attribute

Parámetros

Nombre Tipo Opcional Descripción
workgroup string required field

Retorna

Tip

Tipo: WorkgroupRelations


Workgroup Relations Finder

This class allows making get requests to the workgroup relation resource in the OpenGate North API.

constructor

Constructor

Parámetros

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

findByDomainAndName(domain, name)

Constructor

Parámetros

Nombre Tipo Opcional Descripción
domain string domain name
name string workgroup name

Retorna

Tip

Tipo: Promise


Workgroups

This is a base object that contains all you can do about workgroups.

constructor

Constructor

Parámetros

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

withAdministrative(administrative)

Set the administrative attribute

Parámetros

Nombre Tipo Opcional Descripción
administrative boolean

Retorna

Tip

Tipo: Workgroups


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Workgroups


withDomainName(domainName)

Set the domain attribute

Parámetros

Nombre Tipo Opcional Descripción
domainName string required field

Retorna

Tip

Tipo: Workgroups


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Workgroups