WWWHerd Documentation
Home
Quick Start
All in One Container
Providers
REST API
Development Guide
Home
Quick Start
All in One Container
Providers
REST API
Development Guide
  • Home
  • Quick Start
  • All in One Container
  • Providers
  • REST API
  • Development Guide

REST API

All calls require the header 'auth-token' containing valid authorization token. The tokens can be created in the Admin tab of the WWWHerd UI. All examples assume the environment variable WWWHERD_REST_TOKEN with the auth-token.

Response codes:

  • 401 - Bad login information
  • 403 - Bad auth-token
  • 406 - Token has expired.

GET /api/design

Gets all designs.

Example:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  http://localhost:8000/api/design

GET /api/design/:designId

Get a design with the id as :designId.

Example:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  http://localhost:8000/api/design/1

POST /api/runs

The json body will have the following fields:

  • name
  • narrative
  • values
  • host
  • provider_id (int)
  • design_id (int)
  • flowids (json int array)
  • tag_ids (json int array)

You can get these values as the output from GET /api/design or GET /api/design/:designId. A successful response will have the run's id.

Example. This assumes the integration test has been imported:

  curl -X POST \
    -H "Content-Type: application/json" \
    -H "auth-token:  ${`WWWHERD_REST_TOKEN`}" \
    -d '{"name":"Run Jacks Pet Store ","narrative":"Verify Jacks Pet Store.","values":null,"host":"http://localhost:8888","flowids":[1,2,3],"provider_id":1,"design_id":1,"tag_ids":[2,3] }' \
    http://localhost:8000/api/runs

GET /api/runs/:runId

Get information and status about the run with the id as :runId.

The status values are as follows:

  • 1= New and not yet seen by the system.
  • 2= Waiting for a node.
  • 3= Running
  • 4= Cancelling
  • 5= Canceled
  • 6= Done without result
  • 7= Done and errored
  • 8= Done with a passing result
  • 9= Done and failed by assertions
  • 10= Skipped (unlikely at the run level)
  • 11= Blocked (unlikely at the run level)
  • 12= Disabled (unlikely at the run level)
  • 13= Unknown. This will always be a bug.

Example:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  http://localhost:8000/api/runs/1

GET /api/cancel/:runId

Cancel the run with the id as :runId.

Example:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  http://localhost:8000/api/cancel/1

GET /api/run-logs/:runId

Get the logs for the run with the id as :runId. The logs won't be available until the run is done. The data returned is Base64 encoded.

Example:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  http://localhost:8000/api/run-logs/1  | base64 --decode

GET /api/stats/report/:runId

Get the formatted report for the run with the id as :runId. Particularly useful for test reporting.

Example:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  http://localhost:8000/api/stats/report/1 

GET /api/workorders

Get all the configured work orders. The data returned is a list of work orders.

Example:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  http://localhost:8000/api/workorders

GET /api/workorder/:workorderId

Get a work order with the id as :workorderId.

Example:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  http://localhost:8000/api/workorder/1

GET /api/workorders/runs

Get all the runs for all work orders.

Example:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  http://localhost:8000/api/workorders/runs

GET /api/workorders/runs/:runId

Get a work order run with the id as :runId.

Example:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  http://localhost:8000/api/workorders/runs/1

POST /api/workorders/start/:workorderId

Start a work order with the id as :workorderId.

The json body can have the following fields:

  • name
  • narrative
  • host
  • provider_id (int)

Example:

curl -X POST \
  -H "Content-Type: application/json" \
  -H "auth-token: ${WWWHERD_REST_TOKEN}" \
  -d '{"name":"Run Work Order","narrative":"Starting a work order.","host":"http://localhost:8888","provider_id":1}' \
  http://localhost:8000/api/workorders/start/1

Visit us at WWWHerd or Contact us Copyright (c) 2026 Ginfra Project. All rights reserved.

Last Updated: 4/12/26, 5:17 PM
Prev
Providers
Next
Development Guide