...
Once an adaptor is added (step 1, above) it is in the "Posted" state. The states normally set by the YOUnite Data Hub are: POSTED, CONFIGURED, and DOWN.
The adaptor moves between states as follows:
...
State | Description |
---|---|
Posted | Adaptor is successfully POSTed. An API consumer can make this request or it can be done through the YOUnite UI. |
Configured | The adaptor has:
|
Pause | The adaptor is running but not accepting adaptor (read/write) requests. |
Play Read-Only | The adaptor is accepting read requests only. |
Play | The adaptor is accepting read and write requests. |
An adaptor state can be changed using the request:
Anchor | ||||
---|---|---|---|---|
|
Code Block | ||
---|---|---|
| ||
PUT /zones/zone-uuid/adaptors/adaptorsadaptor-uuid/ops |
Before Before making a request, the adaptor's changeVersion needs to be retrieved by peforming a GET on the adaptor:
...
Code Block | ||
---|---|---|
| ||
{ "state": "ADAPTOR_PLAY_RO", "changeVersion": 4117664412 } |
Changing an Adaptor's Operational State
The states normally set by the YOUnite Data Hub are: POSTED, CONFIGURED, and DOWN. The ../controls endpoint changes an adaptor's state to operational states and those normally set only by the datahub. However, there may be situations where you want to use this endpoing to set these states, such as if an adaptor is an unknown state and restarting the adaptor does not provide a remedy.
Note: Under normal circumstances this resource should never be used and it can render an adaptor and the source entity read/write requests in an unknown state.
This resource overwrites the adaptor to a state normally set by the datahub. Valid states for this request are the normal adaptor operational states:
- ADAPTOR_PAUSE
- ADAPTOR_PLAY
- ADAPTOR_PLAY_RO
And the states normally set only by the datahub:
- ADAPTOR_POSTED
- ADAPTOR_CONFIGURED
- ADAPTOR_DOWN
Code Block | ||
---|---|---|
| ||
PUT /zones/zone-uuid/adaptors/adaptor-uuid/controls |
8. Manage an Adaptor
See the YOUnite API documentation (https://younite.us/api) for more requests that can be made to the adaptors endpoint.
...