Pass triggered task parameters using JSON payload using RESTful POST

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2020 02:25 PM
I have a triggered task that is set up to accept around 10 parameters as well as a bearer token to kick off a pipeline. I know that I can pass parameters into a triggered task API call via the URI (i.e. ?param1=value1$param2=value2) using a RESTful GET. This is less than ideal and I don’t like the idea of the parameters being in the URI.
Is it possible to pass parameters into a triggered task via a JSON payload using RESTful POST?
To clarify, I have tried it and the pipeline kicks off but with empty parameters so it ends up failing.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2020 02:29 PM
When you trigger a pipeline with a POST, the body is passed into the pipeline as an input document. So you can’t pass pipeline parameters per se, but you can still parameterize the snap fields off of the input document.
You can pass the bearer token in the Authorization header to avoid passing that in the URI as well.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2020 02:32 PM
Ohhh. The body is passed as a document. That would explain it. So the only way to pass in parameters is to pass them in the URI?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2020 12:08 PM
The only other option is to pass them through headers.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2020 12:33 PM
Is there a benefit to using custom headers over URI parameters?
