{"__v":1,"_id":"555fb747d7777119003ad035","category":{"__v":3,"_id":"555fb694336c041700a9b86e","pages":["555fb747d7777119003ad035","555fb7e5336c041700a9b870","555fb8c5d7777119003ad03a"],"project":"555f9bf814d68e0d00966587","version":"555f9bf814d68e0d0096658a","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-22T23:07:00.798Z","from_sync":false,"order":3,"slug":"subscription","title":"Subscription"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"555f9bf814d68e0d00966587","user":"555f9a010758330d000d531a","version":{"__v":9,"_id":"555f9bf814d68e0d0096658a","project":"555f9bf814d68e0d00966587","createdAt":"2015-05-22T21:13:28.470Z","releaseDate":"2015-05-22T21:13:28.470Z","categories":["555f9bf814d68e0d0096658b","555f9e9ed7777119003acfee","555fa040d7777119003acffd","555fa344d7777119003ad00b","555fa3e6d7777119003ad00f","555fb694336c041700a9b86e","555fb779336c041700a9b86f","555fb86bd7777119003ad039","555fbf1a336c041700a9b87f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["586e55fbd8e4e939009cbf08"],"next":{"pages":[],"description":""},"createdAt":"2015-05-22T23:09:59.439Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n  'subscription': {\n    \"created\": 1410106353,\n    \"icon\": \"https://upload.wikimedia.org/wikipedia/commons/8/88/Red_triangle_alert_icon.png\",\n    \"name\": \"Important stuff\",\n    \"public\": \"4be3-eda97a-0d7faeab05a0-89403-ad4751c49\",\n  }\n}","language":"json","status":200},{"code":"{\n\t'error': {\n    'id':4,\n   \t'message': 'Already listening to that service',\n  }\n}","language":"json","status":409},{"code":"{\n \t'error': {\n    'id': 6,\n   \t'message': 'Service not found',\n  }\n}","language":"json","status":404}]},"settings":"","auth":"required","params":[{"_id":"555fb747d7777119003ad037","ref":"","in":"body","required":true,"desc":"The device UUID","default":"D867AB3E-36D2-11E4-AEA8-76C9E2E253B6","type":"string","name":"uuid"},{"_id":"555fb747d7777119003ad036","ref":"","in":"body","required":true,"desc":"The service's public token","default":"4be3-eda97a-0d7faeab05a0-89403-ad4751c49","type":"string","name":"service"}],"url":"/subscription"},"isReference":false,"order":0,"body":"Subscribes the device/client to the target service. This will allow the client to receive messages sent by the service.","excerpt":"","slug":"subscribe-to-service","type":"post","title":"Subscribe to a service"}

postSubscribe to a service


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

uuid:
required
stringD867AB3E-36D2-11E4-AEA8-76C9E2E253B6
The device UUID
service:
required
string4be3-eda97a-0d7faeab05a0-89403-ad4751c49
The service's public token

Result Format


Documentation

Subscribes the device/client to the target service. This will allow the client to receive messages sent by the service.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}