Skip to content

REST API

The web service exposes a REST API at /api/v1/. All flow operations in the web UI use this API, and you can call it directly for automation.

Interactive API documentation is available at /api/docs (Swagger UI) with the full OpenAPI spec at /api/docs/spec.

Authentication

API endpoints that interact with ServiceNow require a session. Create one by configuring your connection in the Settings panel or by calling the auth test endpoint.

Endpoints that don't need a ServiceNow connection (validate, diagram, samples) work without authentication.

Endpoints

Flows

MethodPathDescription
GET/api/v1/flowsList all flows on the connected instance
GET/api/v1/flows/{sys_id}Get a flow's full details
GET/api/v1/flows/{sys_id}/yamlExport a flow as YAML
POST/api/v1/flowsCreate a new flow from YAML
PUT/api/v1/flows/{sys_id}Update an existing flow from YAML

Offline (no ServiceNow connection needed)

MethodPathDescription
POST/api/v1/flows/validateValidate a YAML flow definition
POST/api/v1/flows/diagramGenerate a flow diagram from YAML
GET/api/v1/samplesList available sample YAML files

Utility

MethodPathDescription
POST/api/v1/auth/testTest ServiceNow connection credentials
POST/api/v1/flows/edit-statusCheck if a flow is safe to edit
GET/healthzHealth check

Export with Identity Metadata

When exporting for later updates, add ?with_uuid=true to include step IDs and metadata:

GET /api/v1/flows/{sys_id}/yaml?with_uuid=true

The exported YAML will include sys_id, step id fields, and a _metadata section needed for the update workflow.

Validate

Send a YAML body to validate offline:

POST /api/v1/flows/validate
Content-Type: text/yaml

schema: nebula
name: My Flow
type: flow
...

Returns validation errors (if any) without contacting ServiceNow.