OpenAPI Specification
openapi: 3.0.1
info:
description: Activity Log
title: CarbonHub activities workflows API
version: 1.0.0
servers:
- url: https://api.validere.io
security:
- Staging: []
- Integration: []
- Local: []
tags:
- description: Workflow
name: workflows
paths:
/app/v1/workflows:
post:
operationId: create_workflow
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ICreateWorkflowInput'
required: true
responses:
'200':
description: A successful operation
summary: Trigger a Workflow
tags:
- workflows
/app/v1/workflows/search:
post:
operationId: search_workflows
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- $ref: '#/components/schemas/WorkflowSort'
- $ref: '#/components/schemas/WorkflowFilter'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PagedWorkflowList'
description: Successfully operation
summary: Search Workflows
tags:
- workflows
/app/v1/workflows/{workflow_id}:
get:
operationId: get_workflow
parameters:
- $ref: '#/components/parameters/WorkflowId'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/IWorkflow'
description: A successful operation
summary: Get a workflow
tags:
- workflows
put:
operationId: put_workflow
parameters:
- $ref: '#/components/parameters/WorkflowId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/IUpdateWorkflowInput'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/IWorkflow'
description: A successful operation
summary: Update a workflow
tags:
- workflows
delete:
operationId: delete_workflow
parameters:
- $ref: '#/components/parameters/WorkflowId'
responses:
'200':
description: A successful operation
summary: Delete a workflow
tags:
- workflows
/app/v1/workflows/{workflow_id}/form_submissions/search:
post:
operationId: search_workflow_form_submissions
parameters:
- $ref: '#/components/parameters/WorkflowId'
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- $ref: '#/components/schemas/FormSubmissionSort'
- $ref: '#/components/schemas/FormSubmissionFilter'
- type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PagedWorkflowFormSubmissionList'
description: successful operation
summary: Search form submissions on a workflow
tags:
- workflows
components:
schemas:
FormSubmissionWithoutAnswers:
properties:
company_id:
format: uuid
type: string
created_by:
format: uuid
type: string
form_schema_id:
format: uuid
type: string
form_schema_version:
type: number
id:
format: uuid
type: string
status:
$ref: '#/components/schemas/FormSubmissionStatus'
type: object
IWorkflow:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
description:
type: string
company_id:
type: string
format: uuid
workflow_template_id:
type: string
format: uuid
status:
type: string
enum:
- complete
- in_progress
- overdue
- dismissed
- missed
- error
config:
type: object
properties:
start:
type: string
steps:
type: object
additionalProperties:
anyOf:
- type: object
properties:
type:
type: string
enum:
- system_action
name:
type: string
maxLength: 256
description:
type: string
maxLength: 1024
next:
type: string
end:
type: boolean
task:
anyOf:
- type: object
properties:
output:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 1
maxLength: 1024
pattern: ^\$.*$
description: path must be a JSON path to specify the JSON fields starting with $
example: $.answers.section1[0].question_leak.value
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
example:
$TRIGGERING_ASSET_ID: $.asset_trigger.metadata.id
$LEAK_EQUIPMENT: $.answers.section1[0].question_leak.value
$ASSOCIATED_ASSET_ID: $.asset.id
$ASSOCIATED_ASSET_NAME: $.asset.name
$ASSOCIATED_ASSET_TYPE: $.asset.asset_type
$FOO: bar
input:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 3
maxLength: 64
pattern: ^\$[A-Z]+[A-Z_0-9]+
description: variable name must start with $ and use only uppercase letters, digits and the dash character, variable name must not start with $VALIDERE, reserved namespace
example: $TRIGGERING_ASSET_NAME
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for accessing workflow variables. Value accept static value or a Variable name
example:
$.description: foo
$.questions.question_leak.default_answer: $LEAK_EQUIPMENT
type:
type: string
enum:
- create_event
event_schema_id:
type: string
format: uuid
event_status:
type: string
enum:
- open
- resolved
- overdue
- dismissed
required:
- type
- event_schema_id
- event_status
- type: object
properties:
output:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 1
maxLength: 1024
pattern: ^\$.*$
description: path must be a JSON path to specify the JSON fields starting with $
example: $.answers.section1[0].question_leak.value
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
example:
$TRIGGERING_ASSET_ID: $.asset_trigger.metadata.id
$LEAK_EQUIPMENT: $.answers.section1[0].question_leak.value
$ASSOCIATED_ASSET_ID: $.asset.id
$ASSOCIATED_ASSET_NAME: $.asset.name
$ASSOCIATED_ASSET_TYPE: $.asset.asset_type
$FOO: bar
input:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 3
maxLength: 64
pattern: ^\$[A-Z]+[A-Z_0-9]+
description: variable name must start with $ and use only uppercase letters, digits and the dash character, variable name must not start with $VALIDERE, reserved namespace
example: $TRIGGERING_ASSET_NAME
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for accessing workflow variables. Value accept static value or a Variable name
example:
$.description: foo
$.questions.question_leak.default_answer: $LEAK_EQUIPMENT
type:
type: string
enum:
- form_choice
form_schema_id:
type: string
format: uuid
choices:
type: array
items:
type: object
properties:
answer_filter:
type: object
additionalProperties:
nullable: true
description: an array of answer filters is similar to an and operation which will match answers with a common section_id and section_index. filter must contain question_id and answer to make the condition meaningful
next:
type: string
required:
- answer_filter
- next
minItems: 1
maxItems: 8
required:
- type
- form_schema_id
- choices
- type: object
properties:
output:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 1
maxLength: 1024
pattern: ^\$.*$
description: path must be a JSON path to specify the JSON fields starting with $
example: $.answers.section1[0].question_leak.value
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
example:
$TRIGGERING_ASSET_ID: $.asset_trigger.metadata.id
$LEAK_EQUIPMENT: $.answers.section1[0].question_leak.value
$ASSOCIATED_ASSET_ID: $.asset.id
$ASSOCIATED_ASSET_NAME: $.asset.name
$ASSOCIATED_ASSET_TYPE: $.asset.asset_type
$FOO: bar
input:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 3
maxLength: 64
pattern: ^\$[A-Z]+[A-Z_0-9]+
description: variable name must start with $ and use only uppercase letters, digits and the dash character, variable name must not start with $VALIDERE, reserved namespace
example: $TRIGGERING_ASSET_NAME
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for accessing workflow variables. Value accept static value or a Variable name
example:
$.description: foo
$.questions.question_leak.default_answer: $LEAK_EQUIPMENT
type:
type: string
enum:
- delay
time_period:
type: string
enum:
- hours
- days
- weeks
- months
duration:
type: number
minimum: 0
exclusiveMinimum: true
from:
type: string
enum:
- now
- previous_workflow
required:
- type
- time_period
- duration
- type: object
properties:
output:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 1
maxLength: 1024
pattern: ^\$.*$
description: path must be a JSON path to specify the JSON fields starting with $
example: $.answers.section1[0].question_leak.value
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
example:
$TRIGGERING_ASSET_ID: $.asset_trigger.metadata.id
$LEAK_EQUIPMENT: $.answers.section1[0].question_leak.value
$ASSOCIATED_ASSET_ID: $.asset.id
$ASSOCIATED_ASSET_NAME: $.asset.name
$ASSOCIATED_ASSET_TYPE: $.asset.asset_type
$FOO: bar
input:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 3
maxLength: 64
pattern: ^\$[A-Z]+[A-Z_0-9]+
description: variable name must start with $ and use only uppercase letters, digits and the dash character, variable name must not start with $VALIDERE, reserved namespace
example: $TRIGGERING_ASSET_NAME
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for accessing workflow variables. Value accept static value or a Variable name
example:
$.description: foo
$.questions.question_leak.default_answer: $LEAK_EQUIPMENT
type:
type: string
enum:
- create_form
form_schema_id:
type: string
format: uuid
form_status:
type: string
enum:
- validated
- invalidated
- pending
- submitted
- draft
required:
- type
- form_schema_id
- form_status
required:
- type
- name
- task
- type: object
properties:
type:
type: string
enum:
- user_task
name:
type: string
maxLength: 256
description:
type: string
maxLength: 1024
next:
type: string
end:
type: boolean
task:
anyOf:
- type: object
properties:
output:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 1
maxLength: 1024
pattern: ^\$.*$
description: path must be a JSON path to specify the JSON fields starting with $
example: $.answers.section1[0].question_leak.value
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
example:
$TRIGGERING_ASSET_ID: $.asset_trigger.metadata.id
$LEAK_EQUIPMENT: $.answers.section1[0].question_leak.value
$ASSOCIATED_ASSET_ID: $.asset.id
$ASSOCIATED_ASSET_NAME: $.asset.name
$ASSOCIATED_ASSET_TYPE: $.asset.asset_type
$FOO: bar
input:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 3
maxLength: 64
pattern: ^\$[A-Z]+[A-Z_0-9]+
description: variable name must start with $ and use only uppercase letters, digits and the dash character, variable name must not start with $VALIDERE, reserved namespace
example: $TRIGGERING_ASSET_NAME
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for accessing workflow variables. Value accept static value or a Variable name
example:
$.description: foo
$.questions.question_leak.default_answer: $LEAK_EQUIPMENT
type:
type: string
enum:
- manual_task
required:
- type
- type: object
properties:
output:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 1
maxLength: 1024
pattern: ^\$.*$
description: path must be a JSON path to specify the JSON fields starting with $
example: $.answers.section1[0].question_leak.value
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
example:
$TRIGGERING_ASSET_ID: $.asset_trigger.metadata.id
$LEAK_EQUIPMENT: $.answers.section1[0].question_leak.value
$ASSOCIATED_ASSET_ID: $.asset.id
$ASSOCIATED_ASSET_NAME: $.asset.name
$ASSOCIATED_ASSET_TYPE: $.asset.asset_type
$FOO: bar
input:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 3
maxLength: 64
pattern: ^\$[A-Z]+[A-Z_0-9]+
description: variable name must start with $ and use only uppercase letters, digits and the dash character, variable name must not start with $VALIDERE, reserved namespace
example: $TRIGGERING_ASSET_NAME
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for accessing workflow variables. Value accept static value or a Variable name
example:
$.description: foo
$.questions.question_leak.default_answer: $LEAK_EQUIPMENT
type:
type: string
enum:
- submit_form
form_schema_id:
type: string
format: uuid
autocomplete:
type: boolean
description: Completes workflow as soon as a form is associated to task. Defaults to false
auto_attach:
type: boolean
description: Will automatically attach any workflow that matches the schema + asset to this open task
form_required:
type: boolean
description: Lock task from completion if they do not have a form associated
required:
- type
- form_schema_id
- type: object
properties:
output:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 1
maxLength: 1024
pattern: ^\$.*$
description: path must be a JSON path to specify the JSON fields starting with $
example: $.answers.section1[0].question_leak.value
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
example:
$TRIGGERING_ASSET_ID: $.asset_trigger.metadata.id
$LEAK_EQUIPMENT: $.answers.section1[0].question_leak.value
$ASSOCIATED_ASSET_ID: $.asset.id
$ASSOCIATED_ASSET_NAME: $.asset.name
$ASSOCIATED_ASSET_TYPE: $.asset.asset_type
$FOO: bar
input:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 3
maxLength: 64
pattern: ^\$[A-Z]+[A-Z_0-9]+
description: variable name must start with $ and use only uppercase letters, digits and the dash character, variable name must not start with $VALIDERE, reserved namespace
example: $TRIGGERING_ASSET_NAME
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for accessing workflow variables. Value accept static value or a Variable name
example:
$.description: foo
$.questions.question_leak.default_answer: $LEAK_EQUIPMENT
type:
type: string
enum:
- complete_event
event_step_id:
type: string
format: uuid
required:
- type
- event_step_id
- type: object
properties:
output:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 1
maxLength: 1024
pattern: ^\$.*$
description: path must be a JSON path to specify the JSON fields starting with $
example: $.answers.section1[0].question_leak.value
- type: string
minLength: 1
maxLength: 1024
pattern: ^(?!\$).*$
description: static value cannot start with $
example: foo
description: key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
example:
$TRIGGERING_ASSET_ID: $.asset_trigger.metadata.id
$LEAK_EQUIPMENT: $.answers.section1[0].question_leak.value
$ASSOCIATED_ASSET_ID: $.asset.id
$ASSOCIATED_ASSET_NAME: $.asset.name
$ASSOCIATED_ASSET_TYPE: $.asset.asset_type
$FOO: bar
input:
type: object
additionalProperties:
anyOf:
- type: string
minLength: 3
maxLength: 64
pattern: ^\$[A-Z]+[A-Z_0-9]+
description: variable name must start with $ and use only uppercase letters, digits and the dash character, variable name must not start with $VALIDERE, reserved namespace
example: $TRIGGERING_ASSET_NAME
- type: string
minLength: 1
# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/validere/refs/heads/main/openapi/validere-workflows-api-openapi.yml