API: Gateways
- Overview
- Quick start
- Various Topics
- Manage Results
- Core Resources
- Other resources
Summary
Gateways are the core of the automation system. They run the Yombo automation software. The API allows nearly full control over gateways, including adding, disabling, and deleting gateways.
GET - All gateways
Retrieve all gateways available to the current user.
Filters
List of available filters:
- machine_label
- label
- description
- status
- created_at
- updated_at
Request URLs
- GET https://api.yombo.net/api/v1/gateway
Parameters
None
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
https://api.yombo.net/api/v1/gateway?_pagelimit=2
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway?_pagelimit=2'
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
response = requests.get(url, headers=headers)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway?_pagelimit=2",
"uri_description": "List of gateways.",
"doc_uri": "https://yombo.net/API:Gateways",
"gateway": [
{
"id": "JrlPM5XdgQG68ylW",
"machine_label": "tester_gateway",
"label": "tester gateway",
"description": "Tester gateway that doesn't survive long.",
"mqtt_auth": "K6OKVOcoV9A51HiZs8ICZZggGwx3GLQV",
"mqtt_auth_next": "I5Q5Mx5S7v9qZNnud10t8sNG1o0xGR5v",
"mqtt_auth_last_rotate": 1511833220,
"internal_ipv4": "192.168.1.179",
"external_ipv4": "167.136.36.31",
"internal_ipv6": null,
"external_ipv6": null,
"internal_port": 8080,
"external_port": 8080,
"internal_secure_port": 8443,
"external_secure_port": 8443,
"internal_mqtt": 1883,
"internal_mqtt_le": 1885,
"internal_mqtt_ss": 1884,
"internal_mqtt_ws": 8081,
"internal_mqtt_ws_le": 8445,
"internal_mqtt_ws_ss": 8444,
"external_mqtt": 1883,
"external_mqtt_le": 1885,
"external_mqtt_ss": 1884,
"external_mqtt_ws": 8081,
"external_mqtt_ws_le": 8445,
"external_mqtt_ws_ss": 8444,
"is_master": 1,
"master_gateway": "JrlPM5XdgQG68ylW",
"last_connect": null,
"status": 0,
"created_at": 1511833037,
"updated_at": 1511833220,
"fqdn": "yombotester1a.example.com"
},
{
"id": "BuJv8VWJKwJUpngz",
"machine_label": "garage_rpi_zero_w",
"label": "Garage Raspberry PI Zero",
"description": "",
"mqtt_auth": "Z3E1KckZUemW6r76PGWVrkoftiEPECHW",
"mqtt_auth_next": "u547jeotRNl7kI7I2XuvtcFuCUfTst0S",
"mqtt_auth_last_rotate": 1508870680,
"internal_ipv4": "192.168.1.32",
"external_ipv4": "167.136.36.31",
"internal_ipv6": null,
"external_ipv6": null,
"internal_port": 8080,
"external_port": 8080,
"internal_secure_port": 8443,
"external_secure_port": 8443,
"internal_mqtt": 1883,
"internal_mqtt_le": 1885,
"internal_mqtt_ss": 1884,
"internal_mqtt_ws": 8081,
"internal_mqtt_ws_le": 8445,
"internal_mqtt_ws_ss": 8444,
"external_mqtt": 1883,
"external_mqtt_le": 1885,
"external_mqtt_ss": 1884,
"external_mqtt_ws": 8081,
"external_mqtt_ws_le": 8445,
"external_mqtt_ws_ss": 8444,
"is_master": 0,
"master_gateway": "km8M7lRv0E31ebmx",
"last_connect": null,
"status": 1,
"created_at": 1502153449,
"updated_at": 1507561179,
"fqdn": "garagepi.example.com"
}
],
"locator": "gateway",
"locator_type": "objects"
},
"code": 200,
"warnings": [],
"pages": {
"total_items": 7,
"page_limit": 2,
"total_pages": 4,
"page_start": 1
},
"message": "OK",
"html_message": "OK"
}
GET - Specific gateway
Retrieve a specific gateway id.
Request URLs
- GET https://api.yombo.net/api/v1/gateway/{gateway_id}
Parameters
None
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
https://api.yombo.net/api/v1/gateway/km8M7lRv0E31ebmx
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway/km8M7lRv0E31ebmx
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
response = requests.get(url, headers=headers)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway/BuJv8VWJKwJUpngz",
"uri_description": "Detailed information for a single gateway.",
"doc_uri": "https://yombo.net/API:Gateways",
"gateway": {
"id": "BuJv8VWJKwJUpngz",
"machine_label": "garage_rpi_zero_w",
"label": "Garage Raspberry PI Zero",
"description": "",
"mqtt_auth": "Z3E1KckZUemW6r76PGWVrkoftiEPECHW",
"mqtt_auth_next": "u547jeotRNl7kI7I2XuvtcFuCUfTst0S",
"mqtt_auth_last_rotate": 1508870680,
"internal_ipv4": "192.168.1.32",
"external_ipv4": "167.136.36.31",
"internal_ipv6": null,
"external_ipv6": null,
"internal_port": 8080,
"external_port": 8080,
"internal_secure_port": 8443,
"external_secure_port": 8443,
"internal_mqtt": 1883,
"internal_mqtt_le": 1885,
"internal_mqtt_ss": 1884,
"internal_mqtt_ws": 8081,
"internal_mqtt_ws_le": 8445,
"internal_mqtt_ws_ss": 8444,
"external_mqtt": 1883,
"external_mqtt_le": 1885,
"external_mqtt_ss": 1884,
"external_mqtt_ws": 8081,
"external_mqtt_ws_le": 8445,
"external_mqtt_ws_ss": 8444,
"is_master": 0,
"master_gateway": "km8M7lRv0E31ebmx",
"last_connect": null,
"status": 1,
"created_at": 1502153449,
"updated_at": 1507561179,
"fqdn": "garagepi.example.com"
},
"locator": "gateway",
"locator_type": "object"
},
"code": 200,
"warnings": [],
"message": "OK",
"html_message": "OK"
}
POST - Create new gateway
Creates a new gateway. Rules for status field apply.
The response for a new gateway differs from other gateway responses. This includes the gateway hash and UUID. The gateway hash is stored as a non-reversible hash and cannot be recovered over the API; however a new hash can be generated using the newhash endpoint.
Request URLs
- POST https://api.yombo.net/api/v1/gateway
Parameters
Name | Type | Description |
---|---|---|
Required | ||
machine_name | string | Machine name for this gateway. Once set, this cannot be changed. Can only contain: a-z and _ (underscore). |
label | string | A short human friendly label for the gateway. |
description | string | A great place to keep track of gateway notes, details, setup information, etc. |
Optional | ||
master_gateway | string | Default: Itself - The gateway id of the master gateway. Set this to another gateway to make this gateway a slave. |
is_master | string | Default: 1 - 0 = Don't act like a master, 1 = act like a master. This used by other gateways to determine if another gataway is behaving as a master gateway. |
status | string | Default: 1 - Status for the gateway. |
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
-X POST -d '{"label": "Master bedroom", "machine_name": "master_bedroom",
"description": "Handles master bedroom bluetooth tracker and IR blaster."}' \
https://api.yombo.net/api/v1/gateway
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway'
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
payload = {
"label": "Master bedroom",
"machine_name": "master_bedroom",
"description": "Handles master bedroom bluetooth tracker and IR blaster.",
}
response = requests.post(url, headers=headers, json=payload)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway",
"uri_description": "Create new gateway.",
"doc_uri": "https://yombo.net/API:Gateways",
"gateway": {
"label": "Master bedroom",
"machine_label": "master_bedroom",
"description": "Handles master bedroom bluetooth tracker and IR blaster.",
"mqtt_auth": "1XCxumFXMdYSBk8wuo8EC5ARTiHx6irI",
"mqtt_auth_next": "PY2oIhyI1d4YZ3jLi1FZpTaHsmgeDYbJ",
"updated_at": 1518638063,
"created_at": 1518638063,
"id": "2dx6Q9e3djkPBb4a",
"hash": "DhHvTND76QfAphXLrj6TBM2B62PPmoeAQs0pFjNt",
"uuid": "R8UERqhWKoTe8ugx"
},
"locator": "gateway",
"locator_type": "object"
},
"code": 201,
"warnings": [],
"message": "Created",
"html_message": "Created"
}
PUT / PATCH - Update a gateway
Update a gateway. When using PUT, all required parameters must be sent. When using PATCH, only send in desired changes.
Request URLs
- PATCH https://api.yombo.net/api/v1/gateway/{gateway_id}
- PUT https://api.yombo.net/api/v1/gateway/{gateway_id}
Parameters
See post new gateway parameters.
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
-X PUT -d '{"description": "Handles bluetooth tracking."}' \
https://api.yombo.net/api/v1/gateway/WQ9akXabloyqb
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway/WQ9akXabloyqb'
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
payload = {
"description": "Handles bluetooth tracking.",
}
response = requests.put(url, headers=headers, json=payload)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway/djkPBb4a2dx6Q9e3",
"uri_description": "Update gateway.",
"doc_uri": "https://yombo.net/API:Gateways",
"gateway": {
"id": "2dx6Q9e3djkPBb4a",
"machine_label": "master_bedroom",
"label": "Master bedroom",
"description": "Handles bluetooth tracking.",
"mqtt_auth": "1XCxumFXMdYSBk8wuo8EC5ARTiHx6irI",
"mqtt_auth_prev": "hyI1diNyMuygpsTPlPIN8fqD08JeKqQg",
"mqtt_auth_next": "PY2oIhyI1d4YZ3jLi1FZpTaHsmgeDYbJ",
"mqtt_auth_last_rotate": 1518638063,
"internal_ipv4": null,
"external_ipv4": null,
"internal_ipv6": null,
"external_ipv6": null,
"internal_port": 0,
"external_port": 0,
"internal_secure_port": 0,
"external_secure_port": 0,
"internal_mqtt": 0,
"internal_mqtt_le": 0,
"internal_mqtt_ss": 0,
"internal_mqtt_ws": 0,
"internal_mqtt_ws_le": 0,
"internal_mqtt_ws_ss": 0,
"external_mqtt": 0,
"external_mqtt_le": 0,
"external_mqtt_ss": 0,
"external_mqtt_ws": 0,
"external_mqtt_ws_le": 0,
"external_mqtt_ws_ss": 0,
"is_master": null,
"master_gateway": "",
"last_connect": null,
"status": 0,
"created_at": 1518638063,
"updated_at": 1518638382
},
"locator": "gateway",
"locator_type": "object"
},
"code": 200,
"warnings": [],
"message": "Updated",
"html_message": "Updated"
}
DELETE - Delete a gateway
Delete a gateway. This doesn't actually delete the gateway right away, but simply marks it for deletion later. This is the same as setting the status to 2. To undelete the gateway, simply change the status back to 1 using the PATCH method.
Request URLs
- DELETE https://api.yombo.net/api/v1/gateway/{gateway_id}
Parameters
None
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
-X DELETE https://api.yombo.net/api/v1/gateway/2dx6Q9e3djkPBb4a
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway/2dx6Q9e3djkPBb4a'
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
response = requests.put(url, headers=headers)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway/2dx6Q9e3djkPBb4a",
"uri_description": "Gateway deleted",
"doc_uri": "https://yombo.net/API:Gateways",
"gateway": "Deleted",
"locator": "gateway",
"locator_type": "string"
},
"code": 200,
"warnings": [],
"message": "Deleted",
"html_message": "Deleted"
}
GET - Generate new login
If a gateway needs to be re-installed and the user didn't perform a configuration backup, this URL allows a new gateway hash to be generated.
Request URLs
- GET https://api.yombo.net/api/v1/gateway/{gateway_id}/new_hash
Parameters
None
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
-X PUT -d '{"description": "Handles bluetooth tracking."}' \
https://api.yombo.net/api/v1/gateway/ZWemW63E1KVrpngz/new_hash
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway/ZWemW63E1KVrpngz/new_hash'
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
response = requests.get(url, headers=headers)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway/ZWemW63E1KVrpngz/new_hash",
"uri_description": "Gateway hash created, owner notified.",
"doc_uri": "https://yombo.net/API:Gateways",
"gateway": {
"id": "ZWemW63E1KVrpngz",
"machine_label": "garage_rpi_zero_w",
"label": "Garage Raspberry PI Zero",
"description": "",
"mqtt_auth": "ckZU9pPEClZY9aD176PGWVrkoftiEnHW",
"mqtt_auth_next": "JKwJUe87I2XuvtcFuCUotRBuJvfTst0S",
"mqtt_auth_last_rotate": 1508870680,
"internal_ipv4": "10.133.144.32",
"external_ipv4": "23.114.217.31",
"internal_ipv6": null,
"external_ipv6": null,
"internal_port": 8080,
"external_port": 8080,
"internal_secure_port": 8443,
"external_secure_port": 8443,
"internal_mqtt": 1883,
"internal_mqtt_le": 1885,
"internal_mqtt_ss": 1884,
"internal_mqtt_ws": 8081,
"internal_mqtt_ws_le": 8445,
"internal_mqtt_ws_ss": 8444,
"external_mqtt": 1883,
"external_mqtt_le": 1885,
"external_mqtt_ss": 1884,
"external_mqtt_ws": 8081,
"external_mqtt_ws_le": 8445,
"external_mqtt_ws_ss": 8444,
"is_master": 0,
"master_gateway": "E31ebmxkm8M7lRv0",
"last_connect": null,
"status": 1,
"created_at": 1502153449,
"updated_at": 1518654031,
"hash": "O7bKUeVc13MqLyMc6vFhJ2P7uF3XCQRMMpCFmcch2UKFcXuBCg",
"uuid": "D2r3usBlA2WyJ7C0",
"api_auth": "LoEtdLeaUgBggszM07nCrXYpSvo0TEcjVdgDBWyC"
},
"locator": "gateway",
"locator_type": "object"
},
"code": 200,
"warnings": [],
"message": "Updated",
"html_message": "Updated"
}
GET - Gateway commands
A read only resource. Page limit and filtering is not available.
Get all possible commands for a gateway. This includes all commands for all gateways within a cluster. This takes into consideration modules installed onto the gateways and device types assigned to those modules.
Request URLs
- GET https://api.yombo.net/api/v1/gateway/{gateway_id}/command
Parameters
None
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/command
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/command
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
response = requests.get(url, headers=headers)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway/PZywd7j0VLR4PzWz/command",
"uri_description": "List of possible commands for a gateway.",
"doc_uri": "https://yombo.net/API:Gateways",
"gateway_command": [
{
"id": "aWvzB0ENZ23JO",
"voice_cmd": "on",
"machine_label": "on",
"label": "On",
"description": "Sends an on command",
"public": 2,
"status": 1,
"created_at": 1482065387,
"updated_at": 1518130546,
"always_load": 1
},
{
"id": "6qBJKkN6kw3nW",
"voice_cmd": "off",
"machine_label": "off",
"label": "Off",
"description": "Sends an off command",
"public": 2,
"status": 1,
"created_at": 1482065387,
"updated_at": 1482065387,
"always_load": 1
}
],
"locator": "gateway_command",
"locator_type": "objects"
},
"code": 200,
"warnings": [],
"message": "OK",
"html_message": "OK"
}
GET - Gateway device types
A read only resource. Page limit and filtering is not available.
Get all possible device types for a gateway. This includes all device types for all gateways within a cluster. This takes into consideration modules installed onto the gateways and device types assigned to those modules.
Request URLs
- GET https://api.yombo.net/api/v1/gateway/{gateway_id}/device_type
Parameters
None
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/device_type
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/device_type'
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
response = requests.get(url, headers=headers)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway/PZywd7j0VLR4PzWz/device_type",
"uri_description": "List of possible device types for a gateway.",
"doc_uri": "https://yombo.net/API:Gateways",
"gateway_device_type": [
{
"id": "7BxzOXpb",
"category_id": "dD8X67zW",
"machine_label": "x10_house",
"label": "X10 House Code",
"description": "Send an X10 housecode - A single letter A-P.",
"platform": null,
"public": 2,
"status": 1,
"created_at": 1482065387,
"updated_at": 1482065387,
"variable_groups": [],
"variable_fields": [],
"always_load": 1
},
{
"id": "pyXnExEL",
"category_id": "dD8X67zW",
"machine_label": "x10_lamp",
"label": "X10 Lamp",
"description": "An X10 lamp module or device.",
"platform": "x10_light,light",
"public": 2,
"status": 1,
"created_at": 1482065387,
"updated_at": 1482065387,
"variable_groups": [
{
"id": "VnogrX2jXAzEJ",
"relation_id": "pyXnExEL",
"relation_type": "device_type",
"group_machine_label": "x10_address",
"group_label": "X10 Address 1",
"group_description": "X10 Address information",
"group_weight": 1,
"status": 1,
"created_at": 1482065388,
"updated_at": 1482065388
}
],
"variable_fields": [
{
"id": "90MlzLxOo5XAr2",
"group_id": "VnogrX2jXAzEJ",
"field_machine_label": "house",
"field_label": "House Code",
"field_description": "House code A-P.",
"field_weight": 0,
"value_required": 0,
"value_max": 0,
"value_min": 0,
"encryption": "nosuggestion",
"value_casing": "none",
"input_type_id": "gowWdDyk",
"default_value": "",
"field_help_text": "The house code of the X10 module, in the range between A and P.",
"multiple": false,
"created_at": 1482065388,
"updated_at": 1482065389
},
{
"id": "XJYae1q6oANlp0",
"group_id": "VnogrX2jXAzEJ",
"field_machine_label": "unit_code",
"field_label": "Unit Code",
"field_description": "X10 unit code, 1-16",
"field_weight": 1,
"value_required": 0,
"value_max": 16,
"value_min": 1,
"encryption": "nosuggestion",
"value_casing": "none",
"input_type_id": "PLDAaDBX",
"default_value": "",
"field_help_text": "",
"multiple": false,
"created_at": 1482065388,
"updated_at": 1499459267
}
],
"always_load": 1
}
],
"locator": "gateway_device_type",
"locator_type": "objects"
},
"code": 200,
"warnings": [],
"message": "OK",
"html_message": "OK"
}
GET - Gateway device type commands
A read only resource. Page limit and filtering is not available.
Get all possible device type commands for a gateway. This includes all device type commands for all gateways within a cluster. This takes into consideration modules installed onto the gateways and device types assigned to those modules.
Request URLs
- GET https://api.yombo.net/api/v1/gateway/{gateway_id}/device_type_command
Parameters
None
Example
{{API example | curl=curl \ -H "x-api-key: abc123xyz789" \ -H "authorization: Bearer Waro7g0Mwl4YBJ..." \ https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/device_type_command | python=import requests
url = 'https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/device_type_command' headers = {
'x-api-key': 'abc123xyz789', 'authorization': 'Waro7g0Mwl4YBJ...', }
response = requests.get(url, headers=headers) | json={{
"response": { "uri": "/api/v1/gateway/PZywd7j0VLR4PzWz/device_type_command", "uri_description": "List of possible device type commands for a gateway.", "doc_uri": "https://yombo.net/API:Gateways", "gateway_device_type_command": [ { "id": "g0aYKR4v", "device_type_id": "pyXnExEL", "command_id": "aWvzB0ENZ23JO", "created_at": 1482065387 }, { "id": "nJ3m4Na8", "device_type_id": "o6xaZXbQ", "command_id": "grEylYo2ZY1L3", "created_at": 1504771909 } ], "locator": "gateway_device_type_command", "locator_type": "integer" }, "code": 200, "warnings": [], "message": "OK", "html_message": "OK"
} }}
GET - Gateway DNS
Page limit and filtering is not available.
Retrieves domain name information for a gateway.
Request URLs
- GET https://api.yombo.net/api/v1/gateway/{gateway_id}/dns_name
Parameters
None
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/dns_name
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/dns_name'
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
response = requests.get(url, headers=headers)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway/PZywd7j0VLR4PzWz/dns_name",
"uri_description": "View gateway DNS Name information.",
"doc_uri": "https://yombo.net/API:Gateways",
"dns_name": {
"gateway_id": "PZywd7j0VLR4PzWz",
"dns_name": "zeros",
"dns_domain_id": "zd49p5",
"dns_domain": "example.com",
"allow_change_at": 1504745551,
"fqdn": "zeros.example.com"
},
"locator": "dns_name",
"locator_type": "object"
},
"code": 200,
"warnings": [],
"message": "OK",
"html_message": "OK"
}
POST - New or update gateway DNS
This endpoint created or updates a DNS domain name. The http verbs PATCH and PUT mapped to the POST http verb for compatibility and all function the same.
Request URLs
- POST https://api.yombo.net/api/v1/gateway/{gateway_id}/dns_name
Parameters
Name | Type | Description |
---|---|---|
Required | ||
dns_domain_id | string | The domain ID, retrieved from DNS Domains. |
dns_name | string | The desired 3rd level domain. Can only contain letters and numbers, must have at least one letter. |
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
-X POST -d '{"label": "Master bedroom", "machine_name": "master_bedroom",
"description": "Handles master bedroom bluetooth tracker and IR blaster."}' \
https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/dns_name
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/dns_name'
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
payload = {
"label": "Master bedroom",
"machine_name": "master_bedroom",
"description": "Handles master bedroom bluetooth tracker and IR blaster.",
}
response = requests.post(url, headers=headers, json=payload)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway/PZywd7j0VLR4PzWz/dns_name",
"uri_description": "Create new gateway dns name.",
"doc_uri": "https://yombo.net/API:Gateways",
"dns_name": {
"gateway_id": "PZywd7j0VLR4PzWz",
"dns_name": "example2",
"dns_domain_id": "zd49p5",
"dns_domain": "yombo.me",
"allow_change_at": 1521250092,
"fqdn": "example2.yombo.me"
},
"locator": "dns_name",
"locator_type": "object"
},
"code": 201,
"warnings": [],
"message": "Created",
"html_message": "Created"
}
GET - Gateway input types
A read only resource. Page limit and filtering is not available.
Get all possible input types for a gateway. This includes all device type commands for all gateways within a cluster. This takes into consideration modules installed onto the gateways and device types assigned to those modules.
Request URLs
- GET https://api.yombo.net/api/v1/gateway/{gateway_id}/input_type
Parameters
None
Example
<div id="curl<random_number></random_number>" class="tab-pane fade in active" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
curl \
-H "x-api-key: abc123xyz789" \
-H "authorization: Bearer Waro7g0Mwl4YBJ..." \
https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/input_type
<div id="python<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
import requests
url = 'https://api.yombo.net/api/v1/gateway/PZywd7j0VLR4PzWz/input_type'
headers = {
'x-api-key': 'abc123xyz789',
'authorization': 'Waro7g0Mwl4YBJ...',
}
response = requests.get(url, headers=headers)
<div id="output<random_number></random_number>" class="tab-pane fade" style="border: 1px solid #ccc; border-radius: 5px; padding: 0.7em;">
{
"response": {
"uri": "/api/v1/gateway/PZywd7j0VLR4PzWz/input_type",
"uri_description": "List of possible input types for a gateway.",
"doc_uri": "https://yombo.net/API:Gateways",
"gateway_input_type": [
{
"id": "axQ9Ow0e",
"category_id": "3d7lwmZV",
"machine_label": "yombo_command",
"label": "Yombo Command",
"description": "A command that is available to a Yombo gateway.",
"input_regex": null,
"public": 2,
"status": 1,
"created_at": 1494572707,
"updated_at": 1494575956,
"always_load": 1
},
{
"id": "0KDGLxQl",
"category_id": "3d7lwmZV",
"machine_label": "checkbox",
"label": "Checkbox",
"description": "A simple yes/no, on/off checkbox.",
"input_regex": null,
"public": 2,
"status": 1,
"created_at": 1513904761,
"updated_at": 1513904761,
"always_load": 1
}
],
"locator": "gateway_input_type",
"locator_type": "objects"
},
"code": 200,
"warnings": [],
"message": "OK",
"html_message": "OK"
}