API Documentation V1
Public API documentation Version 1.
Before You Begin
Making the requests described here exposes the system you are connecting to, so credentials and tokens must be stored securely.
Obtain Session Token
POST
https://api.ohmautomation.io/control/v1/auth
This endpoint allows you to obtain the session token required to make all other requests.
Headers
Name | Type | Description |
---|---|---|
Content-Type | string |
|
Request Body
Name | Type | Description |
---|---|---|
username* | string | Username |
password* | string | User password |
Delete Session
POST
https://api.ohmautomation.io/control/v1/logout
This endpoint allows you to delete the session, making the token unusable.
Headers
Name | Type | Description |
---|---|---|
X-Session-Token* | string | Session token to be deleted |
Shortcuts JSON
GET
https://api.ohmautomation.io/control/v1/shortcuts?token=abc
This endpoint retrieves a JSON with the user’s shortcut configuration corresponding to the token.
Query Parameters
Name | Type | Description |
---|---|---|
token* | string | Session token |
It is possible to avoid using the token in the URL by attaching it to the Headers.
Shortcuts JSON with Headers
GET
https://api.ohmautomation.io/control/v1/shortcuts
As with the previous method, this also retrieves a JSON with the shortcut configuration, but the token is indicated in the Headers. We recommend this approach since it doesn't expose the token in the URL.
Headers
Name | Type | Description |
---|---|---|
Content-Type | string |
|
X-Session-Token* | string | Session token |
Execute Shortcut
POST
https://api.ohmautomation.io/control/v1/shortcut
Headers
Name | Type | Description |
---|---|---|
Content-Type | string |
|
X-Session-Token* | string | Session token |
Request Body
Name | Type | Description |
---|---|---|
id* | string | Shortcut ID |
command* | string |
|
View Shortcut via Web
GET
https://api.ohmautomation.io/control/v1/shortcut?token=abc&link=0&lang=it
This endpoint allows viewing and executing a shortcut.
Query Parameters
Name | Type | Description |
---|---|---|
token* | string | Session token |
id* | string | Shortcut ID |
lang | string | Display language ( |
Last updated