@datafire/ijenko v6.0.0
@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
- input
object
- changePasswordInfo required AuthChangePassword
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
- output
array
- items PlaceItem
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
- input
object
- place PlaceNew
Output
- output PlaceCreated
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
- output
array
- items UserTokenItem
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
- tokenId required
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.
- embed-metadata
Output
- output
array
- items UserItem
Account.newUser
Add a User.
Note: requires full access to the Account.
ijenko.Account.newUser({
"userInfo": {
"email": "",
"name": "",
"locale": ""
}
}, context)
Input
- input
object
- userInfo required UserNew
Output
- output UserCreated
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.
- userId required
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.
- userId required
Output
- output User
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.
- userId required
Output
- output Metadata
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
- output Metadata
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
- input
object
- loginInfo required AuthLogin
Output
- output AuthTokens
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
- input
object
- refreshInfo required AuthRefresh
Output
- output AuthTokens
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
- input
object
- resetPasswordInfo required AuthResetPassword
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.
- deviceId required
Output
- output Device
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 class | Functionality class | Endpoints |
---|---|---|
MINT | CurrentPeriod | 1,2,3 |
MINT | ElectricityRates | 1,2,3 |
MINT | GenericRate | 1,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
- deviceId required
Output
- output FunctionalityCreated
Device.getMetadata
Get the metadata.
ijenko.Device.getMetadata({
"deviceId": ""
}, context)
Input
- input
object
- deviceId required
string
: Unique identifier of a Device.
- deviceId required
Output
- output Metadata
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
- output Metadata
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
- deviceId required
Output
- output ActionMultiResult
Device.getTags
Get the tags of a Device.
ijenko.Device.getTags({
"deviceId": ""
}, context)
Input
- input
object
- deviceId required
string
: Unique identifier of a Device.
- deviceId required
Output
- output Tags
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
- output Tags
Functionalities.get
Get the Functionality.
ijenko.Functionalities.get({
"functionalityId": ""
}, context)
Input
- input
object
- functionalityId required
string
: Unique identifier of a Functionality.
- functionalityId required
Output
- output Functionality
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.
- names
Output
- output AttributesValues
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.
- functionalityId required
Output
- output AttributeValue
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.
- functionalityId required
Output
- output Metadata
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
- output Metadata
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
- functionalityId required
Output
- output ActionResult
Functionality.getTags
Get the tags of a Functionality.
ijenko.Functionality.getTags({
"functionalityId": ""
}, context)
Input
- input
object
- functionalityId required
string
: Unique identifier of a Functionality.
- functionalityId required
Output
- output Tags
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
- output Tags
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
- output UserMe
Me.patch
Update User information (locale).
ijenko.Me.patch({
"userPatch": {}
}, context)
Input
- input
object
- userPatch required UserMePatch
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.
- notificationId required
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.
- notificationId required
Output
- output Notification
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.
- notificationId required
Output
- output Metadata
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
- output Metadata
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.
- embed-metadata
Output
- output
array
- items PlaceItem
Places.get
Get information about a Place.
ijenko.Places.get({
"placeId": ""
}, context)
Input
- input
object
- placeId required
string
: Unique identifier of a Place.
- placeId required
Output
- output Place
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.
- withPairing
Output
- output
array
- items BusItem
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.
- placeId required
Output
- output BusPairing
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
- output BusPairing
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.
- devices
Output
- output
array
- items DeviceItem
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.
- when required
Output
- output ElectricityAutonomy
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
is200001
. Themissing
property contains all the requested flows. - If some flows are missing, the
code
is200002
and themissing
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.
- flows required
Output
- output ElectricityFlows
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.
- placeId required
Output
- output ElectricityFlowsSetup
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.
- when required
Output
- output ElectricitySelfConsumption
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 ».
- embed-metadata
Output
- output
array
- items FunctionalityItem
Place.getMetadata
Get the metadata.
ijenko.Place.getMetadata({
"placeId": ""
}, context)
Input
- input
object
- placeId required
string
: Unique identifier of a Place.
- placeId required
Output
- output Metadata
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
- output Metadata
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.
- embed-metadata
Output
- output
array
- items NotificationItem
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
- output NotificationCreated
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.
- embed-metadata
Output
- output
array
- items ProgramItem
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
- output ProgramCreated
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
- placeId required
Output
- output ActionMultiResult
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.
- programId required
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.
- programId required
Output
- output Program
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.
- from required
Output
- output
array
- items ProgramLog
Program.getMetadata
Get the metadata of the Program.
ijenko.Program.getMetadata({
"programId": ""
}, context)
Input
- input
object
- programId required
string
: Unique identifier of a Program.
- programId required
Output
- output Metadata
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
- output Metadata
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.
- programId required
Output
Output schema unknown
Definitions
AccountId
- AccountId
string
: Unique identifier of the Account
AccountLogin
- AccountLogin
string
ActionArgs
- ActionArgs
array
- items AnyJSON
ActionMultiResult
- ActionMultiResult
array
- items ActionResult
ActionName
- ActionName
string
ActionResult
- ActionResult
object
- functionality FunctionalityId
- result
array
- items AnyJSON
- status required
integer
: Return code (HTTP status code)
AnyJSON
AppId
- AppId
string
AttributeName
- AttributeName
string
AttributeValue
- AttributeValue
object
- value required AnyJSON
- when required
string
AttributesValues
- AttributesValues
object
: Keys are attribute ids
AuthChangePassword
AuthLogin
- AuthLogin
object
AuthRefresh
- AuthRefresh
object
- appId required AppId
- refreshToken required
string
AuthResetPassword
AuthTokens
- AuthTokens
object
- accessToken required
string
- accessTokenExpires required
string
- refreshToken required
string
- refreshTokenExpires required
string
- accessToken required
BusId
- BusId
string
BusItem
- BusItem
object
- functionality required FunctionalityId
- id required BusId
- protocol required BusProtocol
BusPairing
- BusPairing
object
- duration
integer
: Duration of the pairing window. - enabled required
boolean
- duration
BusProtocol
- BusProtocol
string
CountryCode
- CountryCode
string
: Country code (ISO 3166-1 alpha-2)
DefaultError
- DefaultError
object
: Any error.- code required
integer
- message required
string
- code required
Device
- Device
object
- address required DeviceAddress
- attributes
object
: Each key is @ - class required DeviceClass
- functionalities required
array
- items FunctionalityItem
- isOnline required
boolean
- manufacturer
string
- metadata Metadata
- model
string
- name
string
: Name of the device. User defined. - place required PlaceId
- protocol BusProtocol
- tags required
array
- items DeviceTag
DeviceAddress
- DeviceAddress
string
DeviceClass
- DeviceClass
string
DeviceId
- DeviceId
string
: Unique identifier of the Device
DeviceItem
- DeviceItem
object
- address required DeviceAddress
- class required DeviceClass
- id required DeviceId
- isOnline required
boolean
- metadata MetadataSelected
- name
string
: Name of the Device as defined by the user. Can be used for user interfaces. - place required PlaceId
- tags required
array
- items DeviceTag
DevicePatch
- DevicePatch
object
- name
string
: Name of the Device as defined by the user. Can be used for user interfaces.
- name
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
- autonomy
ElectricityFlow
- ElectricityFlow
array
- items ElectricityFunctionality
ElectricityFlowFormula
- ElectricityFlowFormula
array
ElectricityFlowFunctionality
- ElectricityFlowFunctionality
object
- class required FunctionalityClass
- factor required
integer
- flow required ElectricityFlowName
- id required FunctionalityId
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
- ElectricityFlows
object
- code required ElectricityStatusCode
- flows ElectricityVirtualFlows
- message ElectricityStatusMessage
- missing ElectricityMissingFlows
ElectricityFlowsSetup
- ElectricityFlowsSetup
object
- battery_charge ElectricityFlow
- battery_discharge ElectricityFlow
- battery_grid ElectricityFlow
- elec_drawn ElectricityFlow
- elec_feed_in ElectricityFlow
- elec_from_household ElectricityFlow
- elec_local ElectricityFlow
- elec_to_pv ElectricityFlow
- elec_total_gen ElectricityFlow
- elec_total_usage ElectricityFlow
- elec_usage ElectricityFlow
ElectricityFunctionality
- ElectricityFunctionality
object
- class required FunctionalityClass
- id required FunctionalityId
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)
- battery_charge
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
- ElectricityVirtualFlows
object
- battery_charge ElectricityFlowFormula
- battery_discharge ElectricityFlowFormula
- battery_grid ElectricityFlowFormula
- elec_drawn ElectricityFlowFormula
- elec_feed_in ElectricityFlowFormula
- elec_from_household ElectricityFlowFormula
- elec_local ElectricityFlowFormula
- elec_to_pv ElectricityFlowFormula
- elec_total_gen ElectricityFlowFormula
- elec_total_usage ElectricityFlowFormula
- elec_usage ElectricityFlowFormula
ErrorEntity
- ErrorEntity
object
: An error related to access to an entity (400, 403, 404, 410)- code required
integer
- message required
string
- resource required ResourceRef
- code required
ErrorGatewayUnreachable
- ErrorGatewayUnreachable
object
: The gateway of the Place is not reachable.- code required
string
(values: 450) - message required
string
- code required
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
- entity required
- entity required
- code required
Functionality
- Functionality
object
- actions
array
- items ActionName
- attributes required
array
- items AttributeName
- class required FunctionalityClass
- device required DeviceId
- endpoint required FunctionalityEndpoint
- metadata Metadata
- name FunctionalityName
- tags required
array
- items FunctionalityTag
- actions
FunctionalityClass
- FunctionalityClass
string
FunctionalityCreated
- FunctionalityCreated
object
: A resource has been created. Theresource
property gives its reference.- code required
integer
(values: 201) - message required
string
(values: Functionality created) - resource required FunctionalityResource
- code required
FunctionalityEndpoint
- FunctionalityEndpoint
integer
FunctionalityId
- FunctionalityId
string
: Unique identifier of the Functionality
FunctionalityItem
- FunctionalityItem
object
- class required FunctionalityClass
- device required DeviceId
- endpoint required FunctionalityEndpoint
- id required FunctionalityId
- metadata MetadataSelected
- name FunctionalityName
- tags
array
- items FunctionalityTag
FunctionalityName
- FunctionalityName
string
: Free functionality name
FunctionalityNew
- FunctionalityNew
object
- class required FunctionalityClass
- endpoint required FunctionalityEndpoint
- metadata Metadata
- name FunctionalityName
- tags
array
- items FunctionalityTag
FunctionalityPatch
- FunctionalityPatch
object
- name FunctionalityName
FunctionalityResource
- FunctionalityResource
object
- entity required
string
(values: Functionality) - href required
string
- id required FunctionalityId
- entity required
FunctionalityTag
- FunctionalityTag
string
Locale
- Locale
string
: Locale identifier (language, region). See https://tools.ietf.org/html/rfc5646 and https://www.iana.org/assignments/lang-subtags-templates/lang-subtags-templates.xhtml .
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- items MetadataKey
- add
MetadataSelected
- MetadataSelected
object
: Subset of metadata attached to the resource selected using the 'embed-metadata' parameter
Notification
- Notification
object
NotificationCreated
- NotificationCreated
object
: A resource has been created. Theresource
property gives its reference.- code required
integer
(values: 201) - message required
string
(values: Notification created) - resource required NotificationResource
- code required
NotificationId
- NotificationId
string
: Unique identifier of the Notification
NotificationItem
- NotificationItem
object
: Notification- id required NotificationId
- metadata MetadataSelected
- name required
string
NotificationNew
- NotificationNew
object
- data
object
- metadata Metadata
- name required
string
- routing
string
- data
NotificationPatch
- NotificationPatch
object
- data
object
- name
string
- routing
string
- data
NotificationResource
- NotificationResource
object
- entity required
string
(values: Notification) - href required
string
- id required NotificationId
- entity required
Password
- Password
string
PhoneNumber
- PhoneNumber
string
: Phone number of the User in international format, for SMS notifications.
Place
- Place
object
- account AccountId
- country required CountryCode
- metadata Metadata
- name required
string
- timeZone required TimeZone
- zipCode required ZipCode
PlaceCreated
- PlaceCreated
object
: A resource has been created. Theresource
property gives its reference.- code required
integer
(values: 201) - message required
string
(values: Place created) - resource required PlaceResource
- code required
PlaceId
- PlaceId
string
: Unique identifier of the Place
PlaceItem
- PlaceItem
object
- id required PlaceId
- name required
string
PlaceNew
- PlaceNew
object
- country required CountryCode
- metadata Metadata
- name required
string
- timeZone required TimeZone
- zipCode required ZipCode
PlacePatch
- PlacePatch
object
- country CountryCode
- name
string
- timeZone TimeZone
- zipCode ZipCode
PlaceResource
- PlaceResource
object
- entity required
string
(values: Place) - href required
string
- id required PlaceId
- entity required
Program
- Program
object
ProgramCreated
- ProgramCreated
object
: A resource has been created. Theresource
property gives its reference.- code required
integer
(values: 201) - message required
string
(values: Program created) - resource required ProgramResource
- code required
ProgramId
- ProgramId
string
: Unique identifier of the Program
ProgramItem
- ProgramItem
object
- enabled required
boolean
- id required ProgramId
- metadata MetadataSelected
- name required
string
- enabled required
ProgramLog
- ProgramLog
object
- actions
array
- items ActionResult
- errors
array
- items
string
- items
- notifications
array
- items NotificationId
- when required
string
- actions
ProgramNew
ProgramPatch
- ProgramPatch
object
- code AnyJSON
- enabled
boolean
- name
string
ProgramResource
- ProgramResource
object
- entity required
string
(values: Program) - href required
string
- id required ProgramId
- entity required
ResourceRef
- ResourceRef
object
- entity required
string
(values: Device, Functionality, Notification, Place, Program, User, Account, AccountsBase) - href required
string
- id required
string
- entity required
Tag
- Tag
string
Tags
- Tags
array
- items Tag
TagsPatch
- TagsPatch
object
TimeZone
- TimeZone
string
: A time zone name from the Time Zone Database at https://www.iana.org/time-zones
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. Theresource
property gives its reference.- code required
integer
(values: 201) - message required
string
(values: User created) - resource required UserResource
- code required
UserEmail
- UserEmail
string
UserId
- UserId
string
: Unique identifier of the User
UserItem
- UserItem
object
- canLogin
boolean
: true if the user owning the account (can get tokens with /auth/login) - email required UserEmail
- id required UserId
- locale required Locale
- metadata MetadataSelected
- name required
string
- phoneNumber PhoneNumber
- canLogin
UserMe
- UserMe
object
- email required UserEmail
- id required UserId
- locale required Locale
- login AccountLogin
- metadata Metadata
- name required
string
- phoneNumber PhoneNumber
UserMePatch
- UserMePatch
object
- locale Locale
UserNew
- UserNew
object
- email required UserEmail
- locale required Locale
- metadata Metadata
- name required
string
- phoneNumber PhoneNumber
UserPatch
- UserPatch
object
- email UserEmail
- locale Locale
- name
string
- phoneNumber PhoneNumber
UserResource
- UserResource
object
- entity required
string
(values: User) - href required
string
- id required UserId
- entity required
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.- items PlaceItem
- refreshTokenExpires
string
: If absent, infinite validity. - self
boolean
: True if this token is the one used for this API request - user required UserItem
- appName required
ZipCode
- ZipCode
string
: Postal code