Skip to content

Commit 5023989

Browse files
committed
Add docs on passing credentials to /flows api
1 parent 89336c8 commit 5023989

File tree

1 file changed

+70
-0
lines changed
  • docs/api/admin/methods/post/flows

1 file changed

+70
-0
lines changed

docs/api/admin/methods/post/flows/index.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,76 @@ The `rev` property, if provided, should reflect the revision of flows that was r
6969
}
7070
{% endhighlight %}
7171

72+
#### Setting node credentials
73+
74+
There are two ways to provide credentials with this request. The individual node
75+
objects in the `flows` array can contain a `credentials` property containing the
76+
credentials for that node.
77+
78+
Alternatively, the top level object can include a `credentials` property that has
79+
credentials for individual nodes, or a complete encrypted set.
80+
81+
**Inline node credentials :**
82+
83+
{% highlight json %}
84+
{
85+
"rev": "abc-123",
86+
"flows": [
87+
{
88+
"type": "tab",
89+
"id": "396c2376.c693dc",
90+
"label": "Sheet 1",
91+
"credentials": {
92+
"user": "my-username",
93+
"pass": "my-password"
94+
}
95+
}
96+
]
97+
}
98+
{% endhighlight %}
99+
100+
**Separate node credentials :**
101+
102+
103+
{% highlight json %}
104+
{
105+
"rev": "abc-123",
106+
"flows": [
107+
{
108+
"type": "tab",
109+
"id": "396c2376.c693dc",
110+
"label": "Sheet 1"
111+
}
112+
],
113+
"credentials": {
114+
"396c2376.c693dc": {
115+
"user": "my-username",
116+
"pass": "my-password"
117+
}
118+
}
119+
}
120+
{% endhighlight %}
121+
122+
**Encrypted node credentials:**
123+
124+
{% highlight json %}
125+
{
126+
"rev": "abc-123",
127+
"flows": [
128+
{
129+
"type": "tab",
130+
"id": "396c2376.c693dc",
131+
"label": "Sheet 1"
132+
}
133+
],
134+
"credentials": {
135+
"$": "beea417990012379ca6d4116bd1fda5bOWbwy7UnQvccxAEH1V1pSEETTfSNerYGvP4Aai6RT/DNpnjCCP/fdzildzlJhFjYcRKdO1Q="
136+
}
137+
}
138+
{% endhighlight %}}
139+
140+
141+
72142
### Response
73143

74144
Status Code | Reason | Response

0 commit comments

Comments
 (0)