-
Notifications
You must be signed in to change notification settings - Fork 49
Api Home
This API represents an external service for interacting with the enableiot.com system
Nearly all of the REST methods require an access token. There are two types of access tokens:
-
Device token - this token is assigned to a device (client) when it activates the device. The token has very limited permissions such as enabling the device to create time series (register components) and to send observations for only those time series.
-
User token - this token is derived using a user's credentials. The token enables access to the user resource, the account resources associated with the user, device resources associates with those account resources, etc.
Note: User tokens are very powerful. Treat user tokens just as you would treat a password.
####Authorization Header For REST methods which require an access token, the token must be sent using the HTTP 'Authorization' header, like this:
Authorization: Bearer<space><token>
For example:
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....
API entry point.
/v1/api
Note, while the individual messages are versioned, the entire API version will need to change when message changes result endpoint incompatibility.
Domain
+---Users
|
+---Devices
|
+---Components (a component is a Metric or Actuator)
|
+---Metrics
|
+---Actuators
| Object | Definition |
|---|---|
| Domain | A logic organization that groups a universe of Devices, and allows one or more users with common interests to manage these devices. |
| User | A human who interacts with the system though the UI. Users can have different roles. |
| Component | Capable of outputting data. Each Component has a globally unique identifier cid and a user-defined label name, which is unique only in the namespace of the same device. Also, the component has a type and other attributes taken from the components catalog. A component can be either a metric or an actuator. |
| Metric (sensor) | Represents a series of values obtained from a specific sensor. Examples: temperature, humidity, wind speed, geographic coordinates, sound waveforms, images |
| Actuator | Represents a setting which can be modified on a device, typically resulting in physical response. Examples: turn on a LED, open a valve, capture an image. The actuator can change the setting and/or output its current state. |
| Device | A physical object containing zero or more components. The components can be an integral part of the device or external objects that use the device as a hub. A device does not necessarily have a route to the cloud. Each Device has a globally unique identifier deviceId. |
| Gateway | A device which also has a route to the cloud. The gateway can route messages from other (non-gateway) devices to and from the cloud. Each Gateway has a globally unique identifier gatewayId (which is identical to its deviceId). |
CRUD or create, read, update and delete, represents a set of basic functionality on an model identity.
- Account Management - Domain CRUD
- Device Management - Device CRUD
-
Component Types Catalog - Registry of supported Component Types
- Component Types List - Full List of supported Component Types
- Rule Management - Rule CRUD
- Data API - Send/query Data on behalf of a specific account from specific device
- Alert Management - Alert CRUD
- Error Handling - Error Handling Message Structure and considerations