HydraCore
API by router

Workflow files

List Workflows

GET
/v1/workflow-files
AuthorizationBearer <token>

In: header

Query Parameters

include_superseded?Include Superseded
Defaultfalse

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X GET "https://loading/v1/workflow-files?include_superseded=false" \  -H "X-Api-Key: string"
[
  {
    "content": "string",
    "content_hash": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "description": "string",
    "frontmatter": {},
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "signed_at": "2019-08-24T14:15:22Z",
    "signed_by": "string",
    "slug": "string",
    "status": "string",
    "superseded_by": "a99fa58d-1b9b-4688-ad5f-382f6b17ef46",
    "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",
    "updated_at": "2019-08-24T14:15:22Z",
    "version": 0
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Workflow

POST
/v1/workflow-files
AuthorizationBearer <token>

In: header

Header Parameters

X-Api-Key?X-Api-Key
contentContent

Full workflow content (YAML frontmatter + Markdown body)

description?Description
nameName
Lengthlength <= 200
slugSlug
Match^[a-z0-9][a-z0-9_-]*$
Lengthlength <= 100

Response Body

curl -X POST "https://loading/v1/workflow-files" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{    "content": "string",    "name": "string",    "slug": "string"  }'
{
  "content": "string",
  "content_hash": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "description": "string",
  "frontmatter": {},
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "signed_at": "2019-08-24T14:15:22Z",
  "signed_by": "string",
  "slug": "string",
  "status": "string",
  "superseded_by": "a99fa58d-1b9b-4688-ad5f-382f6b17ef46",
  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Workflow

GET
/v1/workflow-files/{workflow_id}
AuthorizationBearer <token>

In: header

Path Parameters

workflow_idWorkflow Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X GET "https://loading/v1/workflow-files/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Api-Key: string"
{
  "content": "string",
  "content_hash": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "description": "string",
  "frontmatter": {},
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "signed_at": "2019-08-24T14:15:22Z",
  "signed_by": "string",
  "slug": "string",
  "status": "string",
  "superseded_by": "a99fa58d-1b9b-4688-ad5f-382f6b17ef46",
  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete Workflow

DELETE
/v1/workflow-files/{workflow_id}
AuthorizationBearer <token>

In: header

Path Parameters

workflow_idWorkflow Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X DELETE "https://loading/v1/workflow-files/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Api-Key: string"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update Workflow

Update a draft workflow. Signed/active workflows cannot be edited — create a new version instead.

PUT
/v1/workflow-files/{workflow_id}
AuthorizationBearer <token>

In: header

Path Parameters

workflow_idWorkflow Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key
content?Content
description?Description
name?Name

Response Body

curl -X PUT "https://loading/v1/workflow-files/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "content": "string",
  "content_hash": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "description": "string",
  "frontmatter": {},
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "signed_at": "2019-08-24T14:15:22Z",
  "signed_by": "string",
  "slug": "string",
  "status": "string",
  "superseded_by": "a99fa58d-1b9b-4688-ad5f-382f6b17ef46",
  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Activate Workflow

Sign and activate a workflow. Supersedes any previous active version of the same slug.

POST
/v1/workflow-files/{workflow_id}/activate
AuthorizationBearer <token>

In: header

Path Parameters

workflow_idWorkflow Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key
signerSigner

Identity of the signer (tenant admin, Haldir)

Lengthlength <= 200

Response Body

curl -X POST "https://loading/v1/workflow-files/497f6eca-6276-4993-bfeb-53cbbbba6f08/activate" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{    "signer": "string"  }'
{
  "content": "string",
  "content_hash": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "description": "string",
  "frontmatter": {},
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "signed_at": "2019-08-24T14:15:22Z",
  "signed_by": "string",
  "slug": "string",
  "status": "string",
  "superseded_by": "a99fa58d-1b9b-4688-ad5f-382f6b17ef46",
  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create New Version

Create a new version of an existing workflow. The old version remains until the new one is activated.

POST
/v1/workflow-files/{workflow_id}/new-version
AuthorizationBearer <token>

In: header

Path Parameters

workflow_idWorkflow Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key
contentContent

Full workflow content (YAML frontmatter + Markdown body)

description?Description
nameName
Lengthlength <= 200
slugSlug
Match^[a-z0-9][a-z0-9_-]*$
Lengthlength <= 100

Response Body

curl -X POST "https://loading/v1/workflow-files/497f6eca-6276-4993-bfeb-53cbbbba6f08/new-version" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{    "content": "string",    "name": "string",    "slug": "string"  }'
{
  "content": "string",
  "content_hash": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "description": "string",
  "frontmatter": {},
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "signed_at": "2019-08-24T14:15:22Z",
  "signed_by": "string",
  "slug": "string",
  "status": "string",
  "superseded_by": "a99fa58d-1b9b-4688-ad5f-382f6b17ef46",
  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}