6.0.0 • Published 5 years ago

@datafire/ijenko v6.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/ijenko

Client library for IoE² IoT API - to create end-user applications

Installation and Usage

npm install --save @datafire/ijenko
let ijenko = require('@datafire/ijenko').create({
  "Token in Access-Token header": "",
  "Token in query": ""
});

.then(data => {
  console.log(data);
});

Description

Actions

Account.changePassword

Set a new password for the account.

Note: requires full access to the Account.

ijenko.Account.changePassword({
  "changePasswordInfo": {
    "oldPassword": "",
    "newPassword": ""
  }
}, context)

Input

Output

Output schema unknown

Account.places

List the Places of the account.

Note: requires full access to the Account.

ijenko.Account.places(null, context)

Input

This action has no parameters

Output

Account.newPlace

Create a new Place.

A Device (class: MINT, address: 0) is automatically created and attached to the new Place.

Note: requires full access to the Account.

ijenko.Account.newPlace({}, context)

Input

Output

Account.tokens

List the active Tokens on the account.

Note: requires full access to the Account.

ijenko.Account.tokens(null, context)

Input

This action has no parameters

Output

Account.revokeToken

Revoke the given Token.

Note: requires full access to the Account.

ijenko.Account.revokeToken({
  "tokenId": ""
}, context)

Input

  • input object
    • tokenId required string: Identifier of the token

Output

Output schema unknown

Account.users

Get the list of Users of this Account.

ijenko.Account.users({}, context)

Input

  • input object
    • embed-metadata array: Request to include the given keys of metadata in the response. If a key doesn't exist on the resource it is ignored.

Output

Account.newUser

Add a User.

Note: requires full access to the Account.

ijenko.Account.newUser({
  "userInfo": {
    "email": "",
    "name": "",
    "locale": ""
  }
}, context)

Input

  • input object

Output

Account.deleteUser

Delete a User from this Account, and revoke all his/her Tokens.

Note: requires full access to the Account.

ijenko.Account.deleteUser({
  "userId": ""
}, context)

Input

  • input object
    • userId required string: Unique identifier of a User.

Output

Output schema unknown

Account.getUser

Get information about a User in the same Account.

ijenko.Account.getUser({
  "userId": ""
}, context)

Input

  • input object
    • userId required string: Unique identifier of a User.

Output

Account.patchUser

Modify a User.

Note: requires full access to the Account.

ijenko.Account.patchUser({
  "userPatch": {},
  "userId": ""
}, context)

Input

  • input object
    • userPatch required UserPatch
    • userId required string: Unique identifier of a User.

Output

Output schema unknown

User.getMetadata

Get the metadata.

ijenko.User.getMetadata({
  "userId": ""
}, context)

Input

  • input object
    • userId required string: Unique identifier of a User.

Output

User.patchMetadata

Modify the metadata. Keys are limited to the same format as tags (up to 21 characters, a-z0-9, starting with a-z). Values can be any JSON value.

ijenko.User.patchMetadata({
  "metadataPatch": {},
  "userId": ""
}, context)

Input

  • input object
    • metadataPatch required MetadataPatch
    • userId required string: Unique identifier of a User.

Output

AuthAccountLogin

Get an access+refresh tokens pair from login and password information.

The access token obtained with this request can then be used in an Access-Token HTTP header or in a token URL query parameter in requests that require authentication.

The refresh token can be used with /auth/refresh when the access token expires to retrieve a new access token. The lifetime of the refresh token is the maximum lifetime of this authentication request.

The default lifetime of the refresh token is defined by the appId used. The ttl input parameter allows to request a refresh token with a shorter lifetime.

To implement logout, use /auth/revoke.

ijenko.AuthAccountLogin({
  "loginInfo": {
    "login": "",
    "password": "",
    "appId": ""
  }
}, context)

Input

Output

AuthRefreshToken

Get a new access token using a valid refresh token.

This is a replacement of the access token: if an existing access token was still not expired, it is invalidated.

ijenko.AuthRefreshToken({
  "refreshInfo": {
    "refreshToken": "",
    "appId": ""
  }
}, context)

Input

Output

AuthResetPassword

Trigger the request of a new password.

The account administrator will receive an e-mail with an URL pointing to a form to allow him/her to enter a new password. The old password is still functional until a new one is submitted.

Either the login or e-mail of the account must be given.

ijenko.AuthResetPassword({
  "resetPasswordInfo": {
    "appId": ""
  }
}, context)

Input

Output

Output schema unknown

AuthRevokeToken

Invalidate the authentication used for the request. The access token and the refresh token will be invalid after this request. This request is typically called to implement logout.

ijenko.AuthRevokeToken(null, context)

Input

This action has no parameters

Output

Output schema unknown

Devices.get

Get information about a Device.

ijenko.Devices.get({
  "deviceId": ""
}, context)

Input

  • input object
    • deviceId required string: Unique identifier of a Device.

Output

Devices.patch

Modify information about a Device: its name.

ijenko.Devices.patch({
  "devicePatch": {},
  "deviceId": ""
}, context)

Input

  • input object
    • devicePatch required DevicePatch
    • deviceId required string: Unique identifier of a Device.

Output

Output schema unknown

Device.addFunctionality

Add a Functionality to the device.

Required parameters are :

  • functionality class
  • endpoint

Each device class has its own restrictions on which Functionality classes can be added and on which endpoints. Only a few devices allow to add Functionalities.

Device classFunctionality classEndpoints
MINTCurrentPeriod1,2,3
MINTElectricityRates1,2,3
MINTGenericRate1,2,3

Note: requires full access to the Account.

ijenko.Device.addFunctionality({
  "deviceId": "",
  "functionalityInfo": {
    "class": "",
    "endpoint": 0
  }
}, context)

Input

  • input object
    • deviceId required string: Unique identifier of a Device.
    • functionalityInfo required FunctionalityNew

Output

Device.getMetadata

Get the metadata.

ijenko.Device.getMetadata({
  "deviceId": ""
}, context)

Input

  • input object
    • deviceId required string: Unique identifier of a Device.

Output

Device.patchMetadata

Modify the metadata. Keys are limited to the same format as tags (up to 21 characters, a-z0-9, starting with a-z). Values can be any JSON value.

ijenko.Device.patchMetadata({
  "metadataPatch": {},
  "deviceId": ""
}, context)

Input

  • input object
    • metadataPatch required MetadataPatch
    • deviceId required string: Unique identifier of a Device.

Output

Device.run

Run an Action on zero, one or multiple Functionalities selected with tags.

ijenko.Device.run({
  "deviceId": "",
  "action": "",
  "functionalities": "",
  "arguments": []
}, context)

Input

  • input object
    • deviceId required string: Unique identifier of a Device.
    • action required string: Identifier of an Action inside a Functionality.
    • functionalities required string: Functionality selector: Functionality tags or functionality class (optionally, '@' followed by a endpoint in decimal) or '*' for all. Multiple values are separated by '|' and are interpreted as « OR ».
    • arguments required ActionArgs

Output

Device.getTags

Get the tags of a Device.

ijenko.Device.getTags({
  "deviceId": ""
}, context)

Input

  • input object
    • deviceId required string: Unique identifier of a Device.

Output

Device.patchTags

Modify the tags of a Device.

ijenko.Device.patchTags({
  "tagsPatch": {},
  "deviceId": ""
}, context)

Input

  • input object
    • tagsPatch required TagsPatch
    • deviceId required string: Unique identifier of a Device.

Output

Functionalities.get

Get the Functionality.

ijenko.Functionalities.get({
  "functionalityId": ""
}, context)

Input

  • input object
    • functionalityId required string: Unique identifier of a Functionality.

Output

Functionality.patch

Modify information about a Functionality: its name.

ijenko.Functionality.patch({
  "functionalityPatch": {},
  "functionalityId": ""
}, context)

Input

  • input object
    • functionalityPatch required FunctionalityPatch
    • functionalityId required string: Unique identifier of a Functionality.

Output

Output schema unknown

Functionality.values

Get the values of multiple Attributes and their history.

If the names parameter is not given, all the attributes of the Functionality are returned. As the list may be huge, this must be avoided.

If the to parameter is set, from must also be set.

If from is not set, only the last value is returned.

The surround parameter allows to ask also for one value beyond each interval boundaries.

The request may fail if too many values are asked.

ijenko.Functionality.values({
  "functionalityId": ""
}, context)

Input

  • input object
    • names array: One or multiple Attribute names separated by commas
    • from string: Beginning of the time interval.
    • to string: End of the interval. Default: now.
    • surround boolean: If true, return also one value before from and one value after to
    • functionalityId required string: Unique identifier of a Functionality.

Output

Functionality.value

Get the Attribute value and the last time when it changed.

ijenko.Functionality.value({
  "functionalityId": "",
  "attributeName": ""
}, context)

Input

  • input object
    • functionalityId required string: Unique identifier of a Functionality.
    • attributeName required string: Identifier of an Attribute inside a Functionality.

Output

Functionality.set

Modify the value of the Attribute.

ijenko.Functionality.set({
  "value": null,
  "functionalityId": "",
  "attributeName": ""
}, context)

Input

  • input object
    • value required AnyJSON
    • functionalityId required string: Unique identifier of a Functionality.
    • attributeName required string: Identifier of an Attribute inside a Functionality.

Output

Output schema unknown

Functionality.getMetadata

Get the metadata.

ijenko.Functionality.getMetadata({
  "functionalityId": ""
}, context)

Input

  • input object
    • functionalityId required string: Unique identifier of a Functionality.

Output

Functionality.patchMetadata

Modify the metadata. Keys are limited to the same format as tags (up to 21 characters, a-z0-9, starting with a-z). Values can be any JSON value.

ijenko.Functionality.patchMetadata({
  "metadataPatch": {},
  "functionalityId": ""
}, context)

Input

  • input object
    • metadataPatch required MetadataPatch
    • functionalityId required string: Unique identifier of a Functionality.

Output

Functionality.run

Run an action on the Functionality.

ijenko.Functionality.run({
  "functionalityId": "",
  "action": "",
  "arguments": []
}, context)

Input

  • input object
    • functionalityId required string: Unique identifier of a Functionality.
    • action required string: Identifier of an Action inside a Functionality.
    • arguments required ActionArgs

Output

Functionality.getTags

Get the tags of a Functionality.

ijenko.Functionality.getTags({
  "functionalityId": ""
}, context)

Input

  • input object
    • functionalityId required string: Unique identifier of a Functionality.

Output

Functionality.patchTags

Modify the tags of a Functionality.

ijenko.Functionality.patchTags({
  "tagsPatch": {},
  "functionalityId": ""
}, context)

Input

  • input object
    • tagsPatch required TagsPatch
    • functionalityId required string: Unique identifier of a Functionality.

Output

Me.get

Get information on the authenticated User who does the request.

The login property is returned only if the User is the administrator of the Account.

ijenko.Me.get(null, context)

Input

This action has no parameters

Output

Me.patch

Update User information (locale).

ijenko.Me.patch({
  "userPatch": {}
}, context)

Input

Output

Output schema unknown

Notification.delete

Delete a Notification.

ijenko.Notification.delete({
  "notificationId": ""
}, context)

Input

  • input object
    • notificationId required string: Unique identifier of a Notification.

Output

Output schema unknown

Notifications.get

Get information about a Notification.

ijenko.Notifications.get({
  "notificationId": ""
}, context)

Input

  • input object
    • notificationId required string: Unique identifier of a Notification.

Output

Notification.patch

Modify a Notification.

ijenko.Notification.patch({
  "notificationPatch": {},
  "notificationId": ""
}, context)

Input

  • input object
    • notificationPatch required NotificationPatch
    • notificationId required string: Unique identifier of a Notification.

Output

Output schema unknown

Notification.getMetadata

Get the metadata of the Notification.

ijenko.Notification.getMetadata({
  "notificationId": ""
}, context)

Input

  • input object
    • notificationId required string: Unique identifier of a Notification.

Output

Notification.patchMetadata

Modify the metadata of a Notification. Keys are limited to the same format as tags (up to 21 characters, a-z0-9, starting with a-z). Values can be any JSON value.

ijenko.Notification.patchMetadata({
  "metadataPatch": {},
  "notificationId": ""
}, context)

Input

  • input object
    • metadataPatch required MetadataPatch
    • notificationId required string: Unique identifier of a Notification.

Output

Me.places

List the Places to which the Token has access.

ijenko.Me.places({}, context)

Input

  • input object
    • embed-metadata array: Request to include the given keys of metadata in the response. If a key doesn't exist on the resource it is ignored.

Output

Places.get

Get information about a Place.

ijenko.Places.get({
  "placeId": ""
}, context)

Input

  • input object
    • placeId required string: Unique identifier of a Place.

Output

Place.patch

Change information about a Place.

Note: requires full access to the Account.

ijenko.Place.patch({
  "placePatch": {},
  "placeId": ""
}, context)

Input

  • input object
    • placePatch required PlacePatch
    • placeId required string: Unique identifier of a Place.

Output

Output schema unknown

Place.buses

Get the list of Buses available on the gateway of this Place. If withPairing is true, return only buses that allow device pairing (see /places/{placeId}/buses/{busId}/pairing).

ijenko.Place.buses({
  "placeId": ""
}, context)

Input

  • input object
    • withPairing boolean: Filter out buses that have no pairing window
    • placeId required string: Unique identifier of a Place.

Output

Place.pairing

Get the state of the pairing window of the Bus.

Note: requires full access to the Account.

ijenko.Place.pairing({
  "placeId": "",
  "busId": ""
}, context)

Input

  • input object
    • placeId required string: Unique identifier of a Place.
    • busId required string: Unique identifier of a Bus.

Output

Place.openPairing

Open/Close the pairing window.

Note: requires full access to the Account.

ijenko.Place.openPairing({
  "pairing": {
    "enabled": true
  },
  "placeId": "",
  "busId": ""
}, context)

Input

  • input object
    • pairing required BusPairing
    • placeId required string: Unique identifier of a Place.
    • busId required string: Unique identifier of a Bus.

Output

Place.devices

Get the list of Devices available in this Place.

ijenko.Place.devices({
  "placeId": ""
}, context)

Input

  • input object
    • devices string: Devices selector. Device tags or device classes or device ids or '*' for any. Multiple values are separated by '|' and interpreted as « OR ».
    • embed-metadata array: Request to include the given keys of metadata in the response. If a key doesn't exist on the resource it is ignored.
    • placeId required string: Unique identifier of a Place.

Output

Place.Electricity.autonomy

Compute the autonomy rate of the Place on a time period.

autonomy = 1 - (elec_drawn / elec_total_usage)

ijenko.Place.Electricity.autonomy({
  "when": "",
  "span": "",
  "placeId": ""
}, context)

Input

  • input object
    • when required string: A time part of the time span.
    • span required string (values: H, D, Wmo, Wsu, M, Y): Timespan: H (hour), D (day), Wmo (week starting on Monday), Wsu (week starting on Sunday), M (month), Y (year)
    • placeId required string: Unique identifier of a Place.

Output

Place.Electricity.getFlows

Get the mapping of virtual electricity flows to functionalities.

Some rules are applied to expand the virtual flows using the concrete flows available.

The factor tells how each energy value coming from a functionality must be added with values from other functionality to compute the energy of the virtual flow. Factors are usually 1 or -1.

The code property gives the result which may be partial:

  • If all flows are available, 200000 is returned.
  • If no flows are available (indicating that the place has no electricity functionality or that no functionality has been attached to a flow), the code is 200001. The missing property contains all the requested flows.
  • If some flows are missing, the code is 200002 and the missing property lists them.
ijenko.Place.Electricity.getFlows({
  "flows": [],
  "placeId": ""
}, context)

Input

  • input object
    • flows required array: Names of the flows requested
    • placeId required string: Unique identifier of a Place.

Output

Place.Electricity.getFlowsSetup

Get the mapping of functionalities to electricity flows.

A functionality is attached to at most one flow.

ijenko.Place.Electricity.getFlowsSetup({
  "placeId": ""
}, context)

Input

  • input object
    • placeId required string: Unique identifier of a Place.

Output

Place.Electricity.selfConsumption

Compute the self-consumption rate of the Place on a time period.

selfConsumption = 1 - (elec_feed_in / elec_total_usage)

ijenko.Place.Electricity.selfConsumption({
  "when": "",
  "span": "",
  "placeId": ""
}, context)

Input

  • input object
    • when required string: A time part of the time span.
    • span required string (values: H, D, Wmo, Wsu, M, Y): Timespan: H (hour), D (day), Wmo (week starting on Monday), Wsu (week starting on Sunday), M (month), Y (year)
    • placeId required string: Unique identifier of a Place.

Output

Place.functionalities

Get the list of Functionalities available in this Place.

ijenko.Place.functionalities({
  "placeId": ""
}, context)

Input

  • input object
    • embed-metadata array: Request to include the given keys of metadata in the response. If a key doesn't exist on the resource it is ignored.
    • placeId required string: Unique identifier of a Place.
    • devices string: Devices selector. Device tags or device classes or device ids or '*' for any. Multiple values are separated by '|' and interpreted as « OR ».
    • functionalities string: Functionality selector: Functionality tags or functionality class (optionally, '@' followed by a endpoint in decimal) or '*' for all. Multiple values are separated by '|' and are interpreted as « OR ».

Output

Place.getMetadata

Get the metadata.

ijenko.Place.getMetadata({
  "placeId": ""
}, context)

Input

  • input object
    • placeId required string: Unique identifier of a Place.

Output

Place.patchMetadata

Modify the metadata. Keys are limited to the same format as tags (up to 21 characters, a-z0-9, starting with a-z). Values can be any JSON value.

ijenko.Place.patchMetadata({
  "metadataPatch": {},
  "placeId": ""
}, context)

Input

  • input object
    • metadataPatch required MetadataPatch
    • placeId required string: Unique identifier of a Place.

Output

Place.notifications

Get the list of Notifications available in this Place.

ijenko.Place.notifications({
  "placeId": ""
}, context)

Input

  • input object
    • embed-metadata array: Request to include the given keys of metadata in the response. If a key doesn't exist on the resource it is ignored.
    • placeId required string: Unique identifier of a Place.

Output

Place.newNotification

Create a new Notification.

ijenko.Place.newNotification({
  "notification": {
    "name": ""
  },
  "placeId": ""
}, context)

Input

  • input object
    • notification required NotificationNew
    • placeId required string: Unique identifier of a Place.

Output

Place.programs

Get the list of Programs available in this Place.

ijenko.Place.programs({
  "placeId": ""
}, context)

Input

  • input object
    • embed-metadata array: Request to include the given keys of metadata in the response. If a key doesn't exist on the resource it is ignored.
    • placeId required string: Unique identifier of a Place.

Output

Place.newProgram

Create a new Program.

Note: requires full access to the Account.

ijenko.Place.newProgram({
  "programInfo": {
    "name": "",
    "code": null
  },
  "placeId": ""
}, context)

Input

  • input object
    • programInfo required ProgramNew
    • placeId required string: Unique identifier of a Place.

Output

Place.run

Run an Action on zero, one or multiple Functionalities selected with tags.

Device and Functionality selection are combined with « AND ».

If no functionality is matched by the device/functionality selection, an empty array is returned.

ijenko.Place.run({
  "placeId": "",
  "action": "",
  "devices": "",
  "functionalities": "",
  "arguments": []
}, context)

Input

  • input object
    • placeId required string: Unique identifier of a Place.
    • action required string: Identifier of an Action inside a Functionality.
    • devices required string: Devices selector. Device tags or device classes or device ids or '*' for any. Multiple values are separated by '|' and interpreted as « OR ».
    • functionalities required string: Functionality selector: Functionality tags or functionality class (optionally, '@' followed by a endpoint in decimal) or '*' for all. Multiple values are separated by '|' and are interpreted as « OR ».
    • arguments required ActionArgs

Output

Program.delete

Delete a Program.

Note: requires full access to the Account.

ijenko.Program.delete({
  "programId": ""
}, context)

Input

  • input object
    • programId required string: Unique identifier of a Program.

Output

Output schema unknown

Programs.get

Get information about a Program.

ijenko.Programs.get({
  "programId": ""
}, context)

Input

  • input object
    • programId required string: Unique identifier of a Program.

Output

Program.patch

Modify a Program:

  • name
  • status (enabled/disabled)
  • code

Note: requires full access to the Account.

ijenko.Program.patch({
  "programPatch": {},
  "programId": ""
}, context)

Input

  • input object
    • programPatch required ProgramPatch
    • programId required string: Unique identifier of a Program.

Output

Output schema unknown

Program.log

Get the execution history list of this Program.

ijenko.Program.log({
  "from": "",
  "programId": ""
}, context)

Input

  • input object
    • from required string: Beginning of the time interval.
    • to string: End of the interval. Default: now.
    • programId required string: Unique identifier of a Program.

Output

Program.getMetadata

Get the metadata of the Program.

ijenko.Program.getMetadata({
  "programId": ""
}, context)

Input

  • input object
    • programId required string: Unique identifier of a Program.

Output

Program.patchMetadata

Modify the metadata of a Program. Keys are limited to the same format as tags (up to 21 characters, a-z0-9, starting with a-z). Values can be any JSON value.

ijenko.Program.patchMetadata({
  "metadataPatch": {},
  "programId": ""
}, context)

Input

  • input object
    • metadataPatch required MetadataPatch
    • programId required string: Unique identifier of a Program.

Output

Program.run

Launch the Program. The result will be available later in the run history.

ijenko.Program.run({
  "programId": ""
}, context)

Input

  • input object
    • programId required string: Unique identifier of a Program.

Output

Output schema unknown

Definitions

AccountId

  • AccountId string: Unique identifier of the Account

AccountLogin

  • AccountLogin string

ActionArgs

ActionMultiResult

ActionName

  • ActionName string

ActionResult

  • ActionResult object

AnyJSON

AppId

  • AppId string

AttributeName

  • AttributeName string

AttributeValue

  • AttributeValue object
    • value required AnyJSON
    • when required string

AttributesValues

  • AttributesValues object: Keys are attribute ids

AuthChangePassword

  • AuthChangePassword object

AuthLogin

  • AuthLogin object
    • appId required AppId
    • login required string
    • password required Password
    • ttl integer: Desired maximum life-time in seconds for the refresh token

AuthRefresh

  • AuthRefresh object
    • appId required AppId
    • refreshToken required string

AuthResetPassword

  • AuthResetPassword object

AuthTokens

  • AuthTokens object
    • accessToken required string
    • accessTokenExpires required string
    • refreshToken required string
    • refreshTokenExpires required string

BusId

  • BusId string

BusItem

BusPairing

  • BusPairing object
    • duration integer: Duration of the pairing window.
    • enabled required boolean

BusProtocol

  • BusProtocol string

CountryCode

  • CountryCode string: Country code (ISO 3166-1 alpha-2)

DefaultError

  • DefaultError object: Any error.
    • code required integer
    • message required string

Device

DeviceAddress

  • DeviceAddress string

DeviceClass

  • DeviceClass string

DeviceId

  • DeviceId string: Unique identifier of the Device

DeviceItem

DevicePatch

  • DevicePatch object
    • name string: Name of the Device as defined by the user. Can be used for user interfaces.

DeviceTag

  • DeviceTag string

ElectricityAutonomy

  • ElectricityAutonomy object
    • autonomy number: Average electricity autonomy in % (value in range 0, 1, rounded)
    • code required ElectricityStatusCode
    • from string
    • message string: Message for cases where computation is not possible (codes 200001, 200002)
    • to string

ElectricityFlow

ElectricityFlowFormula

ElectricityFlowFunctionality

ElectricityFlowName

  • ElectricityFlowName string (values: battery_charge, battery_discharge, battery_grid, elec_total_gen, elec_total_usage, elec_feed_in, elec_drawn, elec_local, elec_from_household, elec_to_pv, elec_usage): Name of an electricity flow

ElectricityFlows

ElectricityFlowsSetup

ElectricityFunctionality

ElectricityMissingFlows

  • ElectricityMissingFlows object: List of missing flows (not available either directly or indirectly)
    • battery_charge boolean (values: true)
    • battery_discharge boolean (values: true)
    • battery_grid boolean (values: true)
    • elec_drawn boolean (values: true)
    • elec_feed_in boolean (values: true)
    • elec_from_household boolean (values: true)
    • elec_local boolean (values: true)
    • elec_to_pv boolean (values: true)
    • elec_total_gen boolean (values: true)
    • elec_total_usage boolean (values: true)
    • elec_usage boolean (values: true)

ElectricitySelfConsumption

  • ElectricitySelfConsumption object
    • code required ElectricityStatusCode
    • from string
    • message string: Message for cases where computation is not possible (codes 200001, 200002)
    • selfConsumption number: Average self-consumption rate in % (value in range 0, 1, rounded)
    • to string

ElectricityStatusCode

  • ElectricityStatusCode integer (values: 200000, 200001, 200002): Status code. 200000 means OK. Other codes indicate full or partial failure.

ElectricityStatusMessage

  • ElectricityStatusMessage string: Message for cases where computation is not possible (codes 200001, 200002)

ElectricityVirtualFlows

ErrorEntity

  • ErrorEntity object: An error related to access to an entity (400, 403, 404, 410)
    • code required integer
    • message required string
    • resource required ResourceRef

ErrorGatewayUnreachable

  • ErrorGatewayUnreachable object: The gateway of the Place is not reachable.
    • code required string (values: 450)
    • message required string

ErrorSubEntity

  • ErrorSubEntity object: An error related to access to an sub-entity (400, 403, 404, 410)
    • code required integer
    • message required string
    • resource required object
      • entity required string (values: Action, Attribute, Bus)
      • href required string
      • id required string
      • parent object: Container resource.
        • entity required string (values: Place, Functionality)
        • id required string

Functionality

FunctionalityClass

  • FunctionalityClass string

FunctionalityCreated

  • FunctionalityCreated object: A resource has been created. The resource property gives its reference.
    • code required integer (values: 201)
    • message required string (values: Functionality created)
    • resource required FunctionalityResource

FunctionalityEndpoint

  • FunctionalityEndpoint integer

FunctionalityId

  • FunctionalityId string: Unique identifier of the Functionality

FunctionalityItem

FunctionalityName

  • FunctionalityName string: Free functionality name

FunctionalityNew

FunctionalityPatch

FunctionalityResource

  • FunctionalityResource object
    • entity required string (values: Functionality)
    • href required string
    • id required FunctionalityId

FunctionalityTag

  • FunctionalityTag string

Locale

Metadata

  • Metadata object: Keys are limited to the same format as tags (up to 21 characters, a-z0-9, starting with a-z). Values can be any JSON value.

MetadataKey

  • MetadataKey string

MetadataPatch

  • MetadataPatch object
    • add object: list of pairs key/value to add/replace
    • remove array: list of keys to remove

MetadataSelected

  • MetadataSelected object: Subset of metadata attached to the resource selected using the 'embed-metadata' parameter

Notification

  • Notification object
    • data object
    • metadata Metadata
    • name required string
    • place required PlaceId
    • routing string

NotificationCreated

  • NotificationCreated object: A resource has been created. The resource property gives its reference.
    • code required integer (values: 201)
    • message required string (values: Notification created)
    • resource required NotificationResource

NotificationId

  • NotificationId string: Unique identifier of the Notification

NotificationItem

NotificationNew

  • NotificationNew object
    • data object
    • metadata Metadata
    • name required string
    • routing string

NotificationPatch

  • NotificationPatch object
    • data object
    • name string
    • routing string

NotificationResource

  • NotificationResource object
    • entity required string (values: Notification)
    • href required string
    • id required NotificationId

Password

  • Password string

PhoneNumber

  • PhoneNumber string: Phone number of the User in international format, for SMS notifications.

Place

PlaceCreated

  • PlaceCreated object: A resource has been created. The resource property gives its reference.
    • code required integer (values: 201)
    • message required string (values: Place created)
    • resource required PlaceResource

PlaceId

  • PlaceId string: Unique identifier of the Place

PlaceItem

  • PlaceItem object
    • id required PlaceId
    • name required string

PlaceNew

PlacePatch

PlaceResource

  • PlaceResource object
    • entity required string (values: Place)
    • href required string
    • id required PlaceId

Program

ProgramCreated

  • ProgramCreated object: A resource has been created. The resource property gives its reference.
    • code required integer (values: 201)
    • message required string (values: Program created)
    • resource required ProgramResource

ProgramId

  • ProgramId string: Unique identifier of the Program

ProgramItem

ProgramLog

  • ProgramLog object

ProgramNew

  • ProgramNew object

ProgramPatch

  • ProgramPatch object
    • code AnyJSON
    • enabled boolean
    • name string

ProgramResource

  • ProgramResource object
    • entity required string (values: Program)
    • href required string
    • id required ProgramId

ResourceRef

  • ResourceRef object
    • entity required string (values: Device, Functionality, Notification, Place, Program, User, Account, AccountsBase)
    • href required string
    • id required string

Tag

  • Tag string

Tags

  • Tags array

TagsPatch

  • TagsPatch object
    • add array: list of tags to add
    • remove array: list of tags to remove

TimeZone

TokenId

  • TokenId string

User

  • User object
    • account AccountId
    • canLogin required boolean: true if the user owning the account (can get tokens with /auth/login)
    • email required UserEmail
    • locale required Locale
    • metadata Metadata
    • name required string
    • phoneNumber PhoneNumber

UserCreated

  • UserCreated object: A resource has been created. The resource property gives its reference.
    • code required integer (values: 201)
    • message required string (values: User created)
    • resource required UserResource

UserEmail

  • UserEmail string

UserId

  • UserId string: Unique identifier of the User

UserItem

UserMe

UserMePatch

  • UserMePatch object

UserNew

UserPatch

UserResource

  • UserResource object
    • entity required string (values: User)
    • href required string
    • id required UserId

UserTokenItem

  • UserTokenItem object: Token for User API access
    • appName required string: Application name
    • id required TokenId
    • lastUse string: Time of last use of the token to access the API. Updated at most every 15 minutes. If absent, the token has never been used.
    • places array: List of Places to which the User has access. If absent, it means any Place of the account are allowed.
    • refreshTokenExpires string: If absent, infinite validity.
    • self boolean: True if this token is the one used for this API request
    • user required UserItem

ZipCode

  • ZipCode string: Postal code
6.0.0

5 years ago

5.0.0

7 years ago

4.0.0

7 years ago

3.0.0

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago