{"_id":"577bce9d4ca2f10e006016d1","project":"573f3f6c87cbd20e00208e41","user":"5564f227f0f70f0d00a9ab20","editedParams":true,"editedParams2":true,"version":{"_id":"573f3f6c87cbd20e00208e42","__v":2,"project":"573f3f6c87cbd20e00208e41","createdAt":"2016-05-18T20:59:16.635Z","releaseDate":"2016-05-18T20:59:16.635Z","categories":["573f3f6c87cbd20e00208e44","573f3f6c87cbd20e00208e43","573f3f6c87cbd20e00208e45","573f3f6c87cbd20e00208e46","573f3f6c87cbd20e00208e47","573f3f6c87cbd20e00208e48","573f3f6c87cbd20e00208e49","573f3f6c87cbd20e00208e4a","573f3f6c87cbd20e00208e4b","579a382265f89a170099946f","57bce03036eff81700666963"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":0,"category":{"_id":"573f3f6c87cbd20e00208e49","version":"573f3f6c87cbd20e00208e42","__v":0,"project":"573f3f6c87cbd20e00208e41","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-20T16:02:55.724Z","from_sync":false,"order":4,"slug":"flow-triggers","title":"Flow Triggers"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-05T15:13:33.046Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"# With no data\ncurl -X POST \\\n  https://triggers.octoblu.com/v2/flows/d8140878-7a88-461c-9036-257a5b336caa/triggers/3a12d4e0-21c7-11e6-87d2-799e938b6bc1\n\n# With form-urlencoded data\n# can be accessed in the designer as msg.data.foo\ncurl -X POST \\\n  -d foo=bar \\\n  https://triggers.octoblu.com/v2/flows/d8140878-7a88-461c-9036-257a5b336caa/triggers/3a12d4e0-21c7-11e6-87d2-799e938b6bc1\n\n# With JSON data\n# can be accessed in the designer as msg.data.foo\ncurl -X POST \\\n  -H 'content-type: application/json' \\\n  -d '{\"foo\": \"bar\"}' \\\n  https://triggers.octoblu.com/v2/flows/d8140878-7a88-461c-9036-257a5b336caa/triggers/3a12d4e0-21c7-11e6-87d2-799e938b6bc1\n  \n\n# With custom authentication\nUUID=fd205f32-7846-4057-911b-3d580747b6c9\nTOKEN=9f63aaa056618ee5c79197660c4de874718e41da\n\ncurl -X POST \\\n  https://${UUID}:${TOKEN}:::at:::triggers.octoblu.com/v2/flows/d8140878-7a88-461c-9036-257a5b336caa/triggers/3a12d4e0-21c7-11e6-87d2-799e938b6bc1\n","language":"curl"}]},"method":"post","results":{"codes":[{"status":201,"name":"","code":"{\n  \"triggered\":true\n}","language":"json"}]},"settings":"573f36307eeb8b190094cab0","auth":"optional","params":[{"_id":"577bce9d4ca2f10e006016d3","ref":"","in":"path","required":false,"desc":"The UUID of the flow containing the trigger to activate","default":"d8140878-7a88-461c-9036-257a5b336caa","type":"string","name":"flow_id"},{"_id":"577bce9d4ca2f10e006016d2","ref":"","in":"path","required":false,"desc":"The UUID of the trigger to activate","default":"3a12d4e0-21c7-11e6-87d2-799e938b6bc1","type":"string","name":"trigger_id"}],"url":"/v2/flows/:flow_id/triggers/:trigger_id"},"isReference":false,"order":3,"body":"This causes the trigger service to send a Meshblu message to the flow to tell it to trigger. If no authentication information is passed, it will send the message as the identity of the Trigger Service.\n\nAdditionally, any POST data sent will be made available to the flow.\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Breaking changes to the V1 API\",\n  \"body\": \"Unlike the [V1 API](doc:testinput) , the V2 API *does not* wrap the POST body in `msg.payload` nor `msg.params` in the designer. Instead, the post body will be available on the `msg.data` object. Metadata about the request can be accessed on `msg.metadata`.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"In order to activate the trigger, the trigger service's UUID must be in the flow's `message.from` whitelist. Generally, the [Octoblu](https://octoblu.com) Designer will manage the Whitelist for the user. See the [Meshblu whitelist documentation](https://meshblu.readme.io/docs/whitelists-2-0) for more information.\",\n  \"title\": \"Check the Permissions\"\n}\n[/block]","excerpt":"Activate a trigger in a flow.","slug":"post-trigger-v2","type":"endpoint","title":"Trigger V2"}

postTrigger V2

Activate a trigger in a flow.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

flow_id:
stringd8140878-7a88-461c-9036-257a5b336caa
The UUID of the flow containing the trigger to activate
trigger_id:
string3a12d4e0-21c7-11e6-87d2-799e938b6bc1
The UUID of the trigger to activate

Examples


Result Format


Documentation

This causes the trigger service to send a Meshblu message to the flow to tell it to trigger. If no authentication information is passed, it will send the message as the identity of the Trigger Service. Additionally, any POST data sent will be made available to the flow. [block:callout] { "type": "danger", "title": "Breaking changes to the V1 API", "body": "Unlike the [V1 API](doc:testinput) , the V2 API *does not* wrap the POST body in `msg.payload` nor `msg.params` in the designer. Instead, the post body will be available on the `msg.data` object. Metadata about the request can be accessed on `msg.metadata`." } [/block] [block:callout] { "type": "warning", "body": "In order to activate the trigger, the trigger service's UUID must be in the flow's `message.from` whitelist. Generally, the [Octoblu](https://octoblu.com) Designer will manage the Whitelist for the user. See the [Meshblu whitelist documentation](https://meshblu.readme.io/docs/whitelists-2-0) for more information.", "title": "Check the Permissions" } [/block]

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 }}