Farmbot-Web-App/api_docs.md

19 KiB

POST /api/devices

Request

{"user_id"=>"557825a7766f6c2cf8090000", "name"=>"Frank", "uuid"=>"123", "token"=>"321", "controller"=>"api/devices", "action"=>"create"}

Response

{"_id":"557825a7766f6c2cf80b0000","name":"Frank","uuid":"123","token":"321"}

GET /api/devices

Request

{"format"=>"json", "controller"=>"api/devices", "action"=>"index"}

Response

[{"_id":"557825ac766f6c2cf8920000","name":"zachery_beer","uuid":"47ec14b2-73f4-416a-b36f-7f3e204c713e","token":"sqcLf5GSmTbsmkhBO-PmwQ"}]

GET /api/devices

Request

{"format"=>"json", "controller"=>"api/devices", "action"=>"index"}

Response

{"error":"You failed to authenticate with the API. Ensure that you have provided a `bot_token` and `bot_uuid` header in the HTTP request."}

PUT /api/devices/557825ab766f6c2cf85a0000

Request

{"name"=>"Cyrus Pouros", "id"=>"557825ab766f6c2cf85a0000", "controller"=>"api/devices", "action"=>"update"}

Response

{"_id":"557825ab766f6c2cf85a0000","name":"Cyrus Pouros","uuid":"47ec14b2-73f4-416a-b36f-7f3e204c713e","token":"sqcLf5GSmTbsmkhBO-PmwQ"}

DELETE /api/devices/557825ac766f6c2cf89a0000

Request

{"fromat"=>"json", "id"=>"557825ac766f6c2cf89a0000", "controller"=>"api/devices", "action"=>"destroy"}

Response

 

GET /api/schedules

Request

{"controller"=>"api/schedules", "action"=>"index"}

Response

[{"_id":"557825a7766f6c2cf82d0000","start_time":"2015-06-09T05:01:00.000Z","end_time":"2015-06-12T00:01:00.000Z","next_time":"2015-06-11T05:01:00.000Z","repeat":1,"time_unit":"daily","sequence_id":"557825a7766f6c2cf8300000","sequence_name":"Re-contextualized foreground knowledge base","calendar":["2015-06-09T05:01:00.000Z"]},{"_id":"557825a7766f6c2cf8320000","start_time":"2015-06-09T05:01:00.000Z","end_time":"2015-06-12T00:01:00.000Z","next_time":"2015-06-11T05:01:00.000Z","repeat":1,"time_unit":"daily","sequence_id":"557825a7766f6c2cf8350000","sequence_name":"Total context-sensitive application","calendar":["2015-06-09T05:01:00.000Z"]}]

POST /api/schedules

Request

{"sequence_id"=>"557825a7766f6c2cf83f0000", "start_time"=>"2015-02-17T15:16:17.000Z", "end_time"=>"2099-02-17T18:19:20.000Z", "repeat"=>"4", "time_unit"=>"minutely", "controller"=>"api/schedules", "action"=>"create"}

Response

{"_id":"557825a7766f6c2cf8410000","start_time":"2015-02-17T15:16:17.000Z","end_time":"2099-02-17T18:19:20.000Z","next_time":"2015-06-10T11:56:17.000Z","repeat":4,"time_unit":"minutely","sequence_id":"557825a7766f6c2cf83f0000","sequence_name":"Up-sized actuating customer loyalty","calendar":["2015-06-09T00:00:17.000Z","2015-06-09T00:04:17.000Z","2015-06-09T00:08:17.000Z","2015-06-09T00:12:17.000Z","2015-06-09T00:16:17.000Z","2015-06-09T00:20:17.000Z","2015-06-09T00:24:17.000Z","2015-06-09T00:28:17.000Z","2015-06-09T00:32:17.000Z","2015-06-09T00:36:17.000Z","2015-06-09T00:40:17.000Z","2015-06-09T00:44:17.000Z","2015-06-09T00:48:17.000Z","2015-06-09T00:52:17.000Z","2015-06-09T00:56:17.000Z","2015-06-09T01:00:17.000Z","2015-06-09T01:04:17.000Z","2015-06-09T01:08:17.000Z","2015-06-09T01:12:17.000Z","2015-06-09T01:16:17.000Z","2015-06-09T01:20:17.000Z","2015-06-09T01:24:17.000Z","2015-06-09T01:28:17.000Z","2015-06-09T01:32:17.000Z","2015-06-09T01:36:17.000Z","2015-06-09T01:40:17.000Z","2015-06-09T01:44:17.000Z","2015-06-09T01:48:17.000Z","2015-06-09T01:52:17.000Z","2015-06-09T01:56:17.000Z","2015-06-09T02:00:17.000Z","2015-06-09T02:04:17.000Z","2015-06-09T02:08:17.000Z","2015-06-09T02:12:17.000Z","2015-06-09T02:16:17.000Z","2015-06-09T02:20:17.000Z","2015-06-09T02:24:17.000Z","2015-06-09T02:28:17.000Z","2015-06-09T02:32:17.000Z","2015-06-09T02:36:17.000Z","2015-06-09T02:40:17.000Z","2015-06-09T02:44:17.000Z","2015-06-09T02:48:17.000Z","2015-06-09T02:52:17.000Z","2015-06-09T02:56:17.000Z","2015-06-09T03:00:17.000Z","2015-06-09T03:04:17.000Z","2015-06-09T03:08:17.000Z","2015-06-09T03:12:17.000Z","2015-06-09T03:16:17.000Z","2015-06-09T03:20:17.000Z","2015-06-09T03:24:17.000Z","2015-06-09T03:28:17.000Z","2015-06-09T03:32:17.000Z","2015-06-09T03:36:17.000Z","2015-06-09T03:40:17.000Z","2015-06-09T03:44:17.000Z","2015-06-09T03:48:17.000Z","2015-06-09T03:52:17.000Z","2015-06-09T03:56:17.000Z","2015-06-09T04:00:17.000Z","2015-06-09T04:04:17.000Z","2015-06-09T04:08:17.000Z","2015-06-09T04:12:17.000Z","2015-06-09T04:16:17.000Z","2015-06-09T04:20:17.000Z","2015-06-09T04:24:17.000Z","2015-06-09T04:28:17.000Z","2015-06-09T04:32:17.000Z","2015-06-09T04:36:17.000Z","2015-06-09T04:40:17.000Z","2015-06-09T04:44:17.000Z","2015-06-09T04:48:17.000Z","2015-06-09T04:52:17.000Z","2015-06-09T04:56:17.000Z","2015-06-09T05:00:17.000Z","2015-06-09T05:04:17.000Z","2015-06-09T05:08:17.000Z","2015-06-09T05:12:17.000Z","2015-06-09T05:16:17.000Z","2015-06-09T05:20:17.000Z","2015-06-09T05:24:17.000Z","2015-06-09T05:28:17.000Z","2015-06-09T05:32:17.000Z","2015-06-09T05:36:17.000Z","2015-06-09T05:40:17.000Z","2015-06-09T05:44:17.000Z","2015-06-09T05:48:17.000Z","2015-06-09T05:52:17.000Z","2015-06-09T05:56:17.000Z","2015-06-09T06:00:17.000Z","2015-06-09T06:04:17.000Z","2015-06-09T06:08:17.000Z","2015-06-09T06:12:17.000Z","2015-06-09T06:16:17.000Z","2015-06-09T06:20:17.000Z","2015-06-09T06:24:17.000Z","2015-06-09T06:28:17.000Z","2015-06-09T06:32:17.000Z","2015-06-09T06:36:17.000Z","2015-06-09T06:40:17.000Z","2015-06-09T06:44:17.000Z","2015-06-09T06:48:17.000Z","2015-06-09T06:52:17.000Z","2015-06-09T06:56:17.000Z","2015-06-09T07:00:17.000Z","2015-06-09T07:04:17.000Z","2015-06-09T07:08:17.000Z","2015-06-09T07:12:17.000Z","2015-06-09T07:16:17.000Z","2015-06-09T07:20:17.000Z","2015-06-09T07:24:17.000Z","2015-06-09T07:28:17.000Z","2015-06-09T07:32:17.000Z","2015-06-09T07:36:17.000Z","2015-06-09T07:40:17.000Z","2015-06-09T07:44:17.000Z","2015-06-09T07:48:17.000Z","2015-06-09T07:52:17.000Z","2015-06-09T07:56:17.000Z","2015-06-09T08:00:17.000Z","2015-06-09T08:04:17.000Z","2015-06-09T08:08:17.000Z","2015-06-09T08:12:17.000Z","2015-06-09T08:16:17.000Z","2015-06-09T08:20:17.000Z","2015-06-09T08:24:17.000Z","2015-06-09T08:28:17.000Z","2015-06-09T08:32:17.000Z","2015-06-09T08:36:17.000Z","2015-06-09T08:40:17.000Z","2015-06-09T08:44:17.000Z","2015-06-09T08:48:17.000Z","2015-06-09T08:52:17.000Z","2015-06-09T08:56:17.000Z","2015-06-09T09:00:17.000Z","2015-06-09T09:04:17.000Z","2015-06-09T09:08:17.000Z","2015-06-09T09:12:17.000Z","2015-06-09T09:16:17.000Z","2015-06-09T09:20:17.000Z","2015-06-09T09:24:17.000Z","2015-06-09T09:28:17.000Z","2015-06-09T09:32:17.000Z","2015-06-09T09:36:17.000Z","2015-06-09T09:40:17.000Z","2015-06-09T09:44:17.000Z","2015-06-09T09:48:17.000Z","2015-06-09T09:52:17.000Z","2015-06-09T09:56:17.000Z","2015-06-09T10:00:17.000Z","2015-06-09T10:04:17.000Z","2015-06-09T10:08:17.000Z","2015-06-09T10:12:17.000Z","2015-06-09T10:16:17.000Z","2015-06-09T10:20:17.000Z","2015-06-09T10:24:17.000Z","2015-06-09T10:28:17.000Z","2015-06-09T10:32:17.000Z","2015-06-09T10:36:17.000Z","2015-06-09T10:40:17.000Z","2015-06-09T10:44:17.000Z","2015-06-09T10:48:17.000Z","2015-06-09T10:52:17.000Z","2015-06-09T10:56:17.000Z","2015-06-09T11:00:17.000Z","2015-06-09T11:04:17.000Z","2015-06-09T11:08:17.000Z","2015-06-09T11:12:17.000Z","2015-06-09T11:16:17.000Z","2015-06-09T11:20:17.000Z","2015-06-09T11:24:17.000Z","2015-06-09T11:28:17.000Z","2015-06-09T11:32:17.000Z","2015-06-09T11:36:17.000Z","2015-06-09T11:40:17.000Z","2015-06-09T11:44:17.000Z","2015-06-09T11:48:17.000Z","2015-06-09T11:52:17.000Z","2015-06-09T11:56:17.000Z","2015-06-09T12:00:17.000Z","2015-06-09T12:04:17.000Z","2015-06-09T12:08:17.000Z","2015-06-09T12:12:17.000Z","2015-06-09T12:16:17.000Z","2015-06-09T12:20:17.000Z","2015-06-09T12:24:17.000Z","2015-06-09T12:28:17.000Z","2015-06-09T12:32:17.000Z","2015-06-09T12:36:17.000Z","2015-06-09T12:40:17.000Z","2015-06-09T12:44:17.000Z","2015-06-09T12:48:17.000Z","2015-06-09T12:52:17.000Z","2015-06-09T12:56:17.000Z","2015-06-09T13:00:17.000Z","2015-06-09T13:04:17.000Z","2015-06-09T13:08:17.000Z","2015-06-09T13:12:17.000Z","2015-06-09T13:16:17.000Z","2015-06-09T13:20:17.000Z","2015-06-09T13:24:17.000Z","2015-06-09T13:28:17.000Z","2015-06-09T13:32:17.000Z","2015-06-09T13:36:17.000Z","2015-06-09T13:40:17.000Z","2015-06-09T13:44:17.000Z","2015-06-09T13:48:17.000Z","2015-06-09T13:52:17.000Z","2015-06-09T13:56:17.000Z","2015-06-09T14:00:17.000Z","2015-06-09T14:04:17.000Z","2015-06-09T14:08:17.000Z","2015-06-09T14:12:17.000Z","2015-06-09T14:16:17.000Z","2015-06-09T14:20:17.000Z","2015-06-09T14:24:17.000Z","2015-06-09T14:28:17.000Z","2015-06-09T14:32:17.000Z","2015-06-09T14:36:17.000Z","2015-06-09T14:40:17.000Z","2015-06-09T14:44:17.000Z","2015-06-09T14:48:17.000Z","2015-06-09T14:52:17.000Z","2015-06-09T14:56:17.000Z","2015-06-09T15:00:17.000Z","2015-06-09T15:04:17.000Z","2015-06-09T15:08:17.000Z","2015-06-09T15:12:17.000Z","2015-06-09T15:16:17.000Z","2015-06-09T15:20:17.000Z","2015-06-09T15:24:17.000Z","2015-06-09T15:28:17.000Z","2015-06-09T15:32:17.000Z","2015-06-09T15:36:17.000Z","2015-06-09T15:40:17.000Z","2015-06-09T15:44:17.000Z","2015-06-09T15:48:17.000Z","2015-06-09T15:52:17.000Z","2015-06-09T15:56:17.000Z","2015-06-09T16:00:17.000Z","2015-06-09T16:04:17.000Z","2015-06-09T16:08:17.000Z","2015-06-09T16:12:17.000Z","2015-06-09T16:16:17.000Z","2015-06-09T16:20:17.000Z","2015-06-09T16:24:17.000Z","2015-06-09T16:28:17.000Z","2015-06-09T16:32:17.000Z","2015-06-09T16:36:17.000Z","2015-06-09T16:40:17.000Z","2015-06-09T16:44:17.000Z","2015-06-09T16:48:17.000Z","2015-06-09T16:52:17.000Z","2015-06-09T16:56:17.000Z","2015-06-09T17:00:17.000Z","2015-06-09T17:04:17.000Z","2015-06-09T17:08:17.000Z","2015-06-09T17:12:17.000Z","2015-06-09T17:16:17.000Z","2015-06-09T17:20:17.000Z","2015-06-09T17:24:17.000Z","2015-06-09T17:28:17.000Z","2015-06-09T17:32:17.000Z","2015-06-09T17:36:17.000Z","2015-06-09T17:40:17.000Z","2015-06-09T17:44:17.000Z","2015-06-09T17:48:17.000Z","2015-06-09T17:52:17.000Z","2015-06-09T17:56:17.000Z","2015-06-09T18:00:17.000Z","2015-06-09T18:04:17.000Z","2015-06-09T18:08:17.000Z","2015-06-09T18:12:17.000Z","2015-06-09T18:16:17.000Z","2015-06-09T18:20:17.000Z","2015-06-09T18:24:17.000Z","2015-06-09T18:28:17.000Z","2015-06-09T18:32:17.000Z","2015-06-09T18:36:17.000Z","2015-06-09T18:40:17.000Z","2015-06-09T18:44:17.000Z","2015-06-09T18:48:17.000Z","2015-06-09T18:52:17.000Z","2015-06-09T18:56:17.000Z","2015-06-09T19:00:17.000Z","2015-06-09T19:04:17.000Z","2015-06-09T19:08:17.000Z","2015-06-09T19:12:17.000Z","2015-06-09T19:16:17.000Z","2015-06-09T19:20:17.000Z","2015-06-09T19:24:17.000Z","2015-06-09T19:28:17.000Z","2015-06-09T19:32:17.000Z","2015-06-09T19:36:17.000Z","2015-06-09T19:40:17.000Z","2015-06-09T19:44:17.000Z","2015-06-09T19:48:17.000Z","2015-06-09T19:52:17.000Z","2015-06-09T19:56:17.000Z","2015-06-09T20:00:17.000Z","2015-06-09T20:04:17.000Z","2015-06-09T20:08:17.000Z","2015-06-09T20:12:17.000Z","2015-06-09T20:16:17.000Z","2015-06-09T20:20:17.000Z","2015-06-09T20:24:17.000Z","2015-06-09T20:28:17.000Z","2015-06-09T20:32:17.000Z","2015-06-09T20:36:17.000Z","2015-06-09T20:40:17.000Z","2015-06-09T20:44:17.000Z","2015-06-09T20:48:17.000Z","2015-06-09T20:52:17.000Z","2015-06-09T20:56:17.000Z","2015-06-09T21:00:17.000Z","2015-06-09T21:04:17.000Z","2015-06-09T21:08:17.000Z","2015-06-09T21:12:17.000Z","2015-06-09T21:16:17.000Z","2015-06-09T21:20:17.000Z","2015-06-09T21:24:17.000Z","2015-06-09T21:28:17.000Z","2015-06-09T21:32:17.000Z","2015-06-09T21:36:17.000Z","2015-06-09T21:40:17.000Z","2015-06-09T21:44:17.000Z","2015-06-09T21:48:17.000Z","2015-06-09T21:52:17.000Z","2015-06-09T21:56:17.000Z","2015-06-09T22:00:17.000Z","2015-06-09T22:04:17.000Z","2015-06-09T22:08:17.000Z","2015-06-09T22:12:17.000Z","2015-06-09T22:16:17.000Z","2015-06-09T22:20:17.000Z","2015-06-09T22:24:17.000Z","2015-06-09T22:28:17.000Z","2015-06-09T22:32:17.000Z","2015-06-09T22:36:17.000Z","2015-06-09T22:40:17.000Z","2015-06-09T22:44:17.000Z","2015-06-09T22:48:17.000Z","2015-06-09T22:52:17.000Z","2015-06-09T22:56:17.000Z","2015-06-09T23:00:17.000Z","2015-06-09T23:04:17.000Z","2015-06-09T23:08:17.000Z","2015-06-09T23:12:17.000Z","2015-06-09T23:16:17.000Z","2015-06-09T23:20:17.000Z","2015-06-09T23:24:17.000Z","2015-06-09T23:28:17.000Z","2015-06-09T23:32:17.000Z","2015-06-09T23:36:17.000Z","2015-06-09T23:40:17.000Z","2015-06-09T23:44:17.000Z","2015-06-09T23:48:17.000Z","2015-06-09T23:52:17.000Z","2015-06-09T23:56:17.000Z"]}

POST /api/schedules

Request

{"start_time"=>"2015-02-17T15:16:17.000Z", "end_time"=>"2099-02-17T18:19:20.000Z", "repeat"=>"4", "time_unit"=>"minutely", "controller"=>"api/schedules", "action"=>"create"}

Response

{"error":"You most likely forgot to provide an `*_id` attribute in your request parameters. Examples of possible missing params: schedule_id, sequence_id, id, etc.."}

GET /api/schedules

Request

{"controller"=>"api/schedules", "action"=>"index"}

Response

{"error":"You failed to authenticate with the API. Ensure that you have provided a `bot_token` and `bot_uuid` header in the HTTP request."}

GET /api/schedules

Request

{"controller"=>"api/schedules", "action"=>"index"}

Response

[]

GET /api/schedules

Request

{"controller"=>"api/schedules", "action"=>"index"}

Response

{"error":"You failed to authenticate with the API. Ensure that you have provided a `bot_token` and `bot_uuid` header in the HTTP request."}

DELETE /api/schedules/557825a7766f6c2cf80e0000

Request

{"id"=>"557825a7766f6c2cf80e0000", "controller"=>"api/schedules", "action"=>"destroy"}

Response

 

DELETE /api/schedules/557825a7766f6c2cf8190000

Request

{"id"=>"557825a7766f6c2cf8190000", "controller"=>"api/schedules", "action"=>"destroy"}

Response

{"error":"You can't perform that action. Not your schedule."}

PATCH /api/schedules/557825ac766f6c2cf8ad0000

Request

{"schedule"=>{"repeat"=>"66"}, "id"=>"557825ac766f6c2cf8ad0000", "controller"=>"api/schedules", "action"=>"update"}

Response

{"_id":"557825ac766f6c2cf8ad0000","start_time":"2015-06-09T05:01:00.000Z","end_time":"2015-06-12T00:01:00.000Z","next_time":"2015-06-11T05:01:00.000Z","repeat":66,"time_unit":"daily","sequence_id":"557825ac766f6c2cf8b00000","sequence_name":"Seamless systemic alliance","calendar":["2015-06-09T05:01:00.000Z"]}

PATCH /api/schedules/557825ac766f6c2cf8b80000

Request

{"repeat"=>"66", "id"=>"557825ac766f6c2cf8b80000", "controller"=>"api/schedules", "action"=>"update"}

Response

{"error":"You can't perform that action. Not your schedule."}

POST /api/sequences

Request

{"name"=>"Scare Birds", "steps"=>[{"message_type"=>"move_relative", "command"=>{"action"=>"MOVE RELATIVE", "x"=>"1", "y"=>"2", "z"=>"3", "speed"=>"100", "delay"=>"0"}}], "controller"=>"api/sequences", "action"=>"create"}

Response

{"_id":"557825ac766f6c2cf8950000","name":"Scare Birds","color":"yellow"}

POST /api/sequences

Request

{"steps"=>[{"message_type"=>"move_relative", "command"=>{"action"=>"MOVE RELATIVE", "x"=>"1", "y"=>"2", "z"=>"3", "speed"=>"100", "delay"=>"0"}}], "controller"=>"api/sequences", "action"=>"create"}

Response

{"name":"Name is required"}

GET /api/sequences

Request

{"controller"=>"api/sequences", "action"=>"index"}

Response

[{"_id":"557825ac766f6c2cf8a70000","name":"Adaptive scalable budgetary management","color":"gray"},{"_id":"557825ac766f6c2cf8a90000","name":"Persevering zero tolerance firmware","color":"orange"}]

GET /api/sequences/557825a7766f6c2cf8020000/steps/557825a7766f6c2cf8030000

Request

{"sequence_id"=>"557825a7766f6c2cf8020000", "id"=>"557825a7766f6c2cf8030000", "controller"=>"api/steps", "action"=>"show"}

Response

{"_id":"557825a7766f6c2cf8030000","message_type":"single_command","command":{"action":"MOVE RELATIVE","x":1,"y":2,"z":3,"speed":100,"delay":0},"sequence_id":"557825a7766f6c2cf8020000","position":1}

DELETE /api/sequences/557825a7766f6c2cf81e0000/steps/557825a7766f6c2cf81f0000

Request

{"sequence_id"=>"557825a7766f6c2cf81e0000", "id"=>"557825a7766f6c2cf81f0000", "controller"=>"api/steps", "action"=>"destroy"}

Response

{"error":"You can't perform that action. Not your Sequence object."}

DELETE /api/sequences/557825a7766f6c2cf8230000/steps/557825a7766f6c2cf8240000

Request

{"sequence_id"=>"557825a7766f6c2cf8230000", "id"=>"557825a7766f6c2cf8240000", "controller"=>"api/steps", "action"=>"destroy"}

Response

 

DELETE /api/sequences/557825a7766f6c2cf8280000/steps/0000000000

Request

{"sequence_id"=>"557825a7766f6c2cf8280000", "id"=>"0000000000", "controller"=>"api/steps", "action"=>"destroy"}

Response

{"error":"Can't find Step(s) with ID(s): [\"0000000000\"]"}

PATCH /api/sequences/557825a7766f6c2cf8390000

Request

{"sequence"=>{"name"=>"Scare Birds", "steps"=>[{"message_type"=>"move_relative", "command"=>{"action"=>"MOVE RELATIVE", "x"=>"1", "y"=>"2", "z"=>"3", "speed"=>"100", "delay"=>"0"}}]}, "id"=>"557825a7766f6c2cf8390000", "controller"=>"api/sequences", "action"=>"update"}

Response

{"_id":"557825a7766f6c2cf8390000","name":"Scare Birds","color":"blue"}

PATCH /api/sequences/557825a8766f6c2cf8460000/steps/557825a8766f6c2cf8470000

Request

{"step"=>{"message_type"=>"read_status"}, "id"=>"557825a8766f6c2cf8470000", "sequence_id"=>"557825a8766f6c2cf8460000", "controller"=>"api/steps", "action"=>"update"}

Response

{"_id":"557825a8766f6c2cf8470000","message_type":"read_status","command":{"action":"MOVE RELATIVE","x":1,"y":2,"z":3,"speed":100,"delay":0},"sequence_id":"557825a8766f6c2cf8460000","position":1}

GET /api/sequences/557825a8766f6c2cf8530000/steps

Request

{"sequence_id"=>"557825a8766f6c2cf8530000", "controller"=>"api/steps", "action"=>"index"}

Response

[{"_id":"557825a8766f6c2cf8540000","message_type":"single_command","command":{"action":"MOVE RELATIVE","x":1,"y":2,"z":3,"speed":100,"delay":0},"sequence_id":"557825a8766f6c2cf8530000","position":1}]

GET /api/sequences/557825ab766f6c2cf8570000

Request

{"id"=>"557825ab766f6c2cf8570000", "controller"=>"api/sequences", "action"=>"show"}

Response

{"_id":"557825ab766f6c2cf8570000","name":"Function-based maximized toolset","color":"purple"}

DELETE /api/sequences/557825ab766f6c2cf85d0000

Request

{"id"=>"557825ab766f6c2cf85d0000", "controller"=>"api/sequences", "action"=>"destroy"}

Response

 

DELETE /api/sequences/557825ab766f6c2cf8650000

Request

{"id"=>"557825ab766f6c2cf8650000", "controller"=>"api/sequences", "action"=>"destroy"}

Response

{"error":"You can't perform that action. Not your Sequence object."}

POST /api/sequences/557825ab766f6c2cf86e0000/steps

Request

{"name"=>"Scare Birds", "message_type"=>"move_relative", "command"=>{"action"=>"MOVE RELATIVE", "x"=>"1", "y"=>"2", "z"=>"3", "speed"=>"100", "delay"=>"0"}, "sequence_id"=>"557825ab766f6c2cf86e0000", "controller"=>"api/steps", "action"=>"create"}

Response

{"_id":"557825ab766f6c2cf8700000","message_type":"move_relative","command":{"action":"MOVE RELATIVE","x":"1","y":"2","z":"3","speed":"100","delay":"0"},"sequence_id":"557825ab766f6c2cf86e0000","position":1}