Quickstart
This guide walks you through creating your first workflow and executing it as a job using the JustWorkflowIt API.
Prerequisites
Section titled “Prerequisites”- A JustWorkflowIt account (sign up)
- An API auth token (create one in the dashboard under Settings > API Tokens)
Your First Workflow
Section titled “Your First Workflow”-
Create an organization (if you don’t have one yet)
Terminal window curl -X POST https://api.justworkflowit.com/organizations \-H "Authorization: Bearer $TOKEN" \-H "Content-Type: application/json" \-d '{"name": "My Org", "displayName": "My Organization"}'Save the returned
organizationId. -
Register a workflow
Terminal window curl -X POST https://api.justworkflowit.com/organizations/$ORG_ID/workflows \-H "Authorization: Bearer $TOKEN" \-H "Content-Type: application/json" \-d '{"name": "hello-world"}'Save the returned
workflowId. -
Register a workflow version with a step definition
Terminal window curl -X POST https://api.justworkflowit.com/organizations/$ORG_ID/workflows/$WORKFLOW_ID/versions \-H "Authorization: Bearer $TOKEN" \-H "Content-Type: application/json" \-d '{"definition": "{\"workflowName\":\"hello-world\",\"steps\":[{\"name\":\"greet\",\"integrationDetails\":{\"type\":\"/justworkflowit/noop\",\"inputDefinition\":{\"$ref\":\"#/definitions/workflowInput\"},\"outputDefinition\":{\"$ref\":\"#/definitions/workflowInput\"}},\"transitionToStep\":null}],\"definitions\":{\"workflowInput\":{\"type\":\"object\",\"properties\":{\"message\":{\"type\":\"string\"}},\"required\":[\"message\"],\"additionalProperties\":false}}}"}'Save the returned
versionId. -
Tag the version as
$LIVETerminal window curl -X PUT https://api.justworkflowit.com/organizations/$ORG_ID/workflows/$WORKFLOW_ID/tags/\$LIVE \-H "Authorization: Bearer $TOKEN" \-H "Content-Type: application/json" \-d "{\"versionId\": \"$VERSION_ID\"}" -
Submit a job
Terminal window curl -X POST https://api.justworkflowit.com/organizations/$ORG_ID/jobs \-H "Authorization: Bearer $TOKEN" \-H "Content-Type: application/json" \-d "{\"workflowId\": \"$WORKFLOW_ID\",\"workflowVersion\": {\"tag\": \"\$LIVE\"},\"inputJson\": {\"message\": \"Hello, World!\"}}" -
Poll for completion
Terminal window curl https://api.justworkflowit.com/organizations/$ORG_ID/jobs/$JOB_ID \-H "Authorization: Bearer $TOKEN"The job will transition:
PENDING->RUNNING->SUCCEEDED.
What’s Next?
Section titled “What’s Next?”- Learn about workflow concepts and step executors
- Set up authentication for production use
- Explore the full API Reference