-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for parameter substitution when provisioning workflows #6547
Changes from 9 commits
72c7c1b
c94a04d
e8703b8
0a83ad2
4358e8e
ee9afa1
98f8ae1
c7aa470
a918a6b
fda9311
c594fa1
77c325e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -28,13 +28,42 @@ The following table lists the available path parameters. | |||||
| :--- | :--- | :--- | | ||||||
| `workflow_id` | String | The ID of the workflow to be provisioned. Required. | | ||||||
|
||||||
#### Example request | ||||||
## Query parameters | ||||||
|
||||||
If you have included a substitution expression in the template, you may pass it as a query parameter or as a string value of a request body field. For example, if you specified a credential field in a template as `openAI_key: '${{ openai_key }}'`, then you can include the `openai_key` parameter as a query parameter or body field so it can be substituted during provisioning. | ||||||
kolchfa-aws marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
```json | ||||||
POST /_plugins/_flow_framework/workflow/<workflow_id>/_provision?<parameter>=<value> | ||||||
``` | ||||||
|
||||||
| Parameter | Data type | Description | | ||||||
| :--- | :--- | :--- | | ||||||
| User-provided | String | Parameters that match substitutions in the template. Optional. | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was already making a similar edit in fda9311 :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The wording that you chose is perfect, thank you 😄 Let me add links |
||||||
|
||||||
#### Example requests | ||||||
|
||||||
```json | ||||||
POST /_plugins/_flow_framework/workflow/8xL8bowB8y25Tqfenm50/_provision | ||||||
``` | ||||||
{% include copy-curl.html %} | ||||||
|
||||||
The following request substitutes the expression `${{ openai_key }}` with the value "12345" using a query parameter: | ||||||
|
||||||
```json | ||||||
POST /_plugins/_flow_framework/workflow/8xL8bowB8y25Tqfenm50/_provision?openai_key=12345 | ||||||
``` | ||||||
{% include copy-curl.html %} | ||||||
|
||||||
The following request substitutes the expression `${{ openai_key }}` with the value "12345" using the request body: | ||||||
|
||||||
```json | ||||||
POST /_plugins/_flow_framework/workflow/8xL8bowB8y25Tqfenm50/_provision | ||||||
{ | ||||||
"openai_key" : "12345" | ||||||
} | ||||||
``` | ||||||
{% include copy-curl.html %} | ||||||
|
||||||
#### Example response | ||||||
|
||||||
OpenSearch responds with the same `workflow_id` that was used in the request: | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this end in a colon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an intro sentence to the example.