HydraCore
API by router

Workflow files

List Workflows

GET
/v1/workflow-files

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

include_superseded?Include Superseded
Defaultfalse

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/workflow-files'
Example Response
[  {    "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  }]

Create Workflow

POST
/v1/workflow-files

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
content*Content

Full workflow content (YAML frontmatter + Markdown body)

description?string|null
name*Name
Lengthlength <= 200
slug*Slug
Match^[a-z0-9][a-z0-9_-]*$
Lengthlength <= 100

Response Body

Successful Response

application/json
  1. response
content?string|null
content_hash*Content Hash
created_at*Created At
Formatdate-time
description*string|null
frontmatter*
id*Id
Formatuuid
name*Name
signed_at*|null
signed_by*string|null
slug*Slug
status*Status
superseded_by*|null
tenant_id*Tenant Id
Formatuuid
updated_at*Updated At
Formatdate-time
version*Version
Example Request
curl -X POST 'https://example.com/v1/workflow-files' \  -H 'Content-Type: application/json' \  -d '{  "content": "string",  "name": "string",  "slug": "string"}'
Example Response
{  "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}

Get Workflow

GET
/v1/workflow-files/{workflow_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

workflow_id*Workflow Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
content?string|null
content_hash*Content Hash
created_at*Created At
Formatdate-time
description*string|null
frontmatter*
id*Id
Formatuuid
name*Name
signed_at*|null
signed_by*string|null
slug*Slug
status*Status
superseded_by*|null
tenant_id*Tenant Id
Formatuuid
updated_at*Updated At
Formatdate-time
version*Version
Example Request
curl -X GET 'https://example.com/v1/workflow-files/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "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}

Delete Workflow

DELETE
/v1/workflow-files/{workflow_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

workflow_id*Workflow Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

Example Request
curl -X DELETE 'https://example.com/v1/workflow-files/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
Empty

Update Workflow

PUT
/v1/workflow-files/{workflow_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

workflow_id*Workflow Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
content?string|null
description?string|null
name?string|null

Response Body

Successful Response

application/json
  1. response
content?string|null
content_hash*Content Hash
created_at*Created At
Formatdate-time
description*string|null
frontmatter*
id*Id
Formatuuid
name*Name
signed_at*|null
signed_by*string|null
slug*Slug
status*Status
superseded_by*|null
tenant_id*Tenant Id
Formatuuid
updated_at*Updated At
Formatdate-time
version*Version
Example Request
curl -X PUT 'https://example.com/v1/workflow-files/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "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}

Activate Workflow

POST
/v1/workflow-files/{workflow_id}/activate

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

workflow_id*Workflow Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
signer*Signer

Identity of the signer (tenant admin, Haldir)

Lengthlength <= 200

Response Body

Successful Response

application/json
  1. response
content?string|null
content_hash*Content Hash
created_at*Created At
Formatdate-time
description*string|null
frontmatter*
id*Id
Formatuuid
name*Name
signed_at*|null
signed_by*string|null
slug*Slug
status*Status
superseded_by*|null
tenant_id*Tenant Id
Formatuuid
updated_at*Updated At
Formatdate-time
version*Version
Example Request
curl -X POST 'https://example.com/v1/workflow-files/497f6eca-6276-4993-bfeb-53cbbbba6f08/activate' \  -H 'Content-Type: application/json' \  -d '{  "signer": "string"}'
Example Response
{  "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}

Create New Version

POST
/v1/workflow-files/{workflow_id}/new-version

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

workflow_id*Workflow Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
content*Content

Full workflow content (YAML frontmatter + Markdown body)

description?string|null
name*Name
Lengthlength <= 200
slug*Slug
Match^[a-z0-9][a-z0-9_-]*$
Lengthlength <= 100

Response Body

Successful Response

application/json
  1. response
content?string|null
content_hash*Content Hash
created_at*Created At
Formatdate-time
description*string|null
frontmatter*
id*Id
Formatuuid
name*Name
signed_at*|null
signed_by*string|null
slug*Slug
status*Status
superseded_by*|null
tenant_id*Tenant Id
Formatuuid
updated_at*Updated At
Formatdate-time
version*Version
Example Request
curl -X POST 'https://example.com/v1/workflow-files/497f6eca-6276-4993-bfeb-53cbbbba6f08/new-version' \  -H 'Content-Type: application/json' \  -d '{  "content": "string",  "name": "string",  "slug": "string"}'
Example Response
{  "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}