Console: cdap-studio
Copy as MarkdownThese routes are on the console, port 3375. They take an API token as Authorization: Bearer ndt_...; see API tokens.
CDAP Studio flows.
List flows.
Super admins get every flow (with an API token only when it carries all of the account's permissions); everyone else gets their own.
neodesk cdap-studio list calls it.
200: The flows (application/json)
| Field | Type |
|---|---|
success |
true |
flows |
array of StudioFlowListed |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
Make a flow.
Only the operator role and super admins may; an API token only when it is full. The flow is saved as a draft of the account.
Needs the operator role, and a full API token. neodesk cdap-studio create calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
name |
string | yes | flow name, at most 100 characters; at most 100 characters |
description |
string | what the flow does; cut to 500 characters | |
flow_json |
string or object or array | The flow, as JSON text or as the JSON value: {"nodes": [{"id", "type", "label", "x", "y", "config"}], "wires": [{"from", "to", "fromPort", "toPort"}]}. At most 2 MB. |
200: Made (application/json)
| Field | Type | What it is |
|---|---|---|
success |
true |
|
id |
string | The new flow's ID |
| Error | When |
|---|---|
| 400 | The name is missing or too long, or the flow is not JSON or larger than 2 MB |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Import a flow file (give it with --data @flow.json).
Takes the content of a .bdflow file, as the export writes it, and saves it as a new draft of the account. Only the operator role and super admins may; an API token only when it is full. version, format, exportedAt and exportedBy of the file are not read.
Needs the operator role, and a full API token. neodesk cdap-studio import calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
name |
string | cut to 100 characters; "Imported Flow" when missing | |
description |
string | cut to 500 characters | |
flow |
object or array | yes | The flow itself: {"nodes": [...], "wires": [...]}. At most 2 MB. |
200: Imported (application/json)
| Field | Type | What it is |
|---|---|---|
success |
true |
|
id |
string | The new flow's ID |
| Error | When |
|---|---|
| 400 | flow is missing or not an object or list (Invalid .bdflow format), or larger than 2 MB |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Show one flow.
neodesk cdap-studio get calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The flow ID |
200: The flow (application/json)
| Field | Type |
|---|---|
success |
true |
flow |
StudioFlow |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 404 | No such flow, or the flow is somebody else's |
Change a flow.
Changes only what the body has. An empty name keeps the old one. Only the operator role and super admins may; an API token only when it is full.
Needs the operator role, and a full API token. neodesk cdap-studio set calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The flow ID |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
name |
string | cut to 100 characters |
description |
string or null | cut to 500 characters; null or no text empties it |
flow_json |
string or object or array | The flow, as JSON text or as the JSON value: {"nodes": [{"id", "type", "label", "x", "y", "config"}], "wires": [{"from", "to", "fromPort", "toPort"}]}. At most 2 MB. |
200: Changed (application/json)
| Error | When |
|---|---|
| 400 | The flow is not JSON or larger than 2 MB |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | No such flow, or the flow is somebody else's |
Delete a flow.
Only the operator role and super admins may; an API token only when it is full.
Needs the operator role, and a full API token. neodesk cdap-studio delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The flow ID |
200: Deleted (application/json)
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | No such flow, or the flow is somebody else's |
Mark a flow as deployed.
Sets the flow's status to deployed. Nothing is started. Only the operator role and super admins may; an API token only when it is full.
Needs the operator role, and a full API token. neodesk cdap-studio deploy calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The flow ID |
200: Marked (application/json)
| Field | Type |
|---|---|
success |
true |
status |
"deployed" |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | No such flow, or the flow is somebody else's |
Export a flow as a file (use --output).
Answers a .bdflow file (JSON) as an attachment named after the flow.
neodesk cdap-studio export calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The flow ID |
200: The .bdflow file (application/json)
| Field | Type | What it is |
|---|---|---|
version |
"1.0" |
|
format |
"bdflow" |
|
name |
string | |
description |
string | |
flow |
object or array | The flow itself |
exportedAt |
string (date-time) | |
exportedBy |
string |
| Error | When |
|---|---|
| 400 | The saved flow is not JSON or too large to export |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 404 | No such flow, or the flow is somebody else's |
Check a flow without running it.
A dry run: answers one made-up result per node and counts the nodes and wires. Nothing of the flow runs and no body is read. Only the operator role and super admins may; an API token only when it is full.
Needs the operator role, and a full API token. neodesk cdap-studio test calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The flow ID |
200: The dry run (application/json)
| Field | Type | What it is |
|---|---|---|
success |
true |
|
results |
array of object | |
results[].nodeId |
string | |
results[].nodeType |
string | |
results[].label |
string | The node's label, or its type |
results[].status |
"ok" |
|
results[].output |
object | |
results[].output._simulated |
true |
|
results[].output.value |
string | |
nodeCount |
integer | |
wireCount |
integer |
| Error | When |
|---|---|
| 400 | The saved flow is not JSON |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | No such flow, or the flow is somebody else's |
List flow templates.
neodesk cdap-studio templates calls it.
200: The templates (application/json)
| Field | Type |
|---|---|
success |
true |
templates |
array of object |
templates[].id |
string |
templates[].name |
string |
templates[].description |
string |
templates[].icon |
string |
templates[].flow |
object |
templates[].flow.nodes |
array of object |
templates[].flow.wires |
array of object |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |