Space Operator
  • Welcome
  • Visual Builder
    • Flows
      • API Key & POST Request
      • WebSocket
        • Signature Requests
      • Nested Flows
      • Learn Solana
      • Add flows to your websites
      • Iterate with Localhost
    • Nodes
      • Web Assembly Nodes
        • space-cli
        • space-lib
        • Examples in Rust
          • Rectangle
          • Filter
          • Regex
        • Uploading WASM binary via UI
      • Native Nodes
        • Code Template
        • Node Definition
        • ValueSet
        • Submitting Native Nodes
        • Tracing
      • Mock Nodes
      • JS Node
      • API Input Node
  • Self-hosting
    • Docker Compose
    • Serving HTTPS
    • Lightsail Instance
    • Export data to your instance
  • FAQ
    • Servers
  • References
    • Flows
    • Flow Deployment
Powered by GitBook
On this page
  • Generate an API Key
  • Setup your flow: add Flow Input & Flow Outputs nodes
  • Making a POST request
  • Examples with cURL
  • Viewing the results

Was this helpful?

  1. Visual Builder
  2. Flows

API Key & POST Request

PreviousFlowsNextWebSocket

Last updated 1 year ago

Was this helpful?

Generate an API Key

Go to

Setup your flow: add Flow Input & Flow Outputs nodes

  • Flow Input nodes for every input you would like to pass dynamically. The label of the Flow Input node will be the key in the JSON body of the POST requests { "inputs": {"<key>": <value>...} }

  • Flow Output node for every output you would like to log or export

Making a POST request

POST https://dev-api.spaceoperator.com/flow/start/{flow_id}

Trigger a flow via an API.

Headers

Name
Type
Description

x-api-key*

your-api-key

Content-Type*

application/json

Request Body

Name
Type
Description

data-raw

JSON

Pass a JSON object with the flow inputs. <key> should match Flow Input node label, value can be anything.

{ "inputs": {"<key>": <value>...} }

{
    "flow_run_id": "f6d6d2e0-9cb3-4f35-9009-a6d2936da519"
}
{
    "error": "failed to verify access token, at /build/crates/space-operator-bin/src/middleware/auth.rs:168:24"
}

Examples with cURL

curl --location --request POST 'https://api.spaceoperator.com/flow/start/588' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "inputs": {
        "number 1": 100,
        "number 2": 10,
    }
}'

Viewing the results

Viewing the result of a flow run via API is coming soon.

In the meantime, use the UI to see the results. Open the flow, click on the background, and navigate to the Flow Logs

Leaving the flow editor open during the API call will show the progress

https://www.spaceoperator.com/dashboard/profile/apikey
294KB
Side-by-side - POST request and UI.mp4