Skip to main content
Docs

Search guides and API endpoints, for example “Idempotency-Key” or “submit job”.

    API reference

    Workflows

    On this page

    Validate a WorkflowSpec

    POST/api/v1/workflows/validate

    API key or token

    Request body

    application/json · ValidateWorkflowRequest

    Request fields
    FieldTypeDescription
    paramsobject | null
    specrequiredobject

    Example request

    curl -X POST "https://api.cognichem.com/api/v1/workflows/validate" \
      -H "X-Api-Key: $COGNICHEM_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "spec": {
        "limits": {
          "on_step_failure": "fail_fast"
        },
        "name": "vina-boltz-linear",
        "params": {},
        "spec_version": 1,
        "steps": [
          {
            "id": "dock",
            "inputs": {},
            "job_type": "autodockvina",
            "mode": "batch",
            "resource": "cpu",
            "type": "job"
          },
          {
            "id": "repredict",
            "inputs": {
              "ligands": {
                "$from": "dock.poses"
              }
            },
            "job_type": "boltz2",
            "mode": "batch",
            "resource": "a10",
            "type": "job"
          }
        ]
      }
    }'

    Responses

    Always returned for a well-formed envelope. `valid: false` with Diagnostic[] in `errors` when the spec is invalid. Malformed request bodies use the shared envelope 422 (Pydantic loc/msg). Caller tier is passed so `fanout_tier_capped` warnings can fire. · application/json · ValidateWorkflowResponse

    Response fields
    FieldTypeDescription
    errors[]requiredDiagnosticModel[]
    errors.coderequiredstring
    errors.messagerequiredstring
    errors.pathstring | null
    errors.portstring | null
    errors.step_idstring | null
    order[]requiredstring[]
    step_countrequiredinteger
    validrequiredboolean
    warnings[]requiredDiagnosticModel[]
    warnings.coderequiredstring
    warnings.messagerequiredstring
    warnings.pathstring | null
    warnings.portstring | null
    warnings.step_idstring | null
    Example 200 response
    {
      "errors": [],
      "order": [
        "dock",
        "repredict"
      ],
      "step_count": 2,
      "valid": true,
      "warnings": [
        {
          "code": "params_not_supplied",
          "message": "Spec declares params but none were supplied."
        }
      ]
    }

    Estimate a workflow run's cost

    POST/api/v1/workflows/estimate

    API key or token

    Request body

    application/json · EstimateWorkflowRequest

    Request fields
    FieldTypeDescription
    paramsobject | null
    specrequiredobject

    Example request

    curl -X POST "https://api.cognichem.com/api/v1/workflows/estimate" \
      -H "X-Api-Key: $COGNICHEM_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "spec": {
        "limits": {
          "on_step_failure": "fail_fast"
        },
        "name": "vina-boltz-linear",
        "params": {},
        "spec_version": 1,
        "steps": [
          {
            "id": "dock",
            "inputs": {},
            "job_type": "autodockvina",
            "mode": "batch",
            "resource": "cpu",
            "type": "job"
          },
          {
            "id": "repredict",
            "inputs": {
              "ligands": {
                "$from": "dock.poses"
              }
            },
            "job_type": "boltz2",
            "mode": "batch",
            "resource": "a10",
            "type": "job"
          }
        ]
      }
    }'

    Responses

    Successful Response · application/json · EstimateWorkflowResponse

    Response fields
    FieldTypeDescription
    assumptions[]requiredEstimateAssumption[]
    assumptions.costnumber | null
    assumptions.expected_runtime_secnumber | null
    assumptions.input_countsmap<string, EstimateInputCount> | null
    assumptions.job_typestring | null
    assumptions.max_fanoutinteger | null
    assumptions.multiplierinteger

    Default: 1

    assumptions.payload_scaledboolean | null
    assumptions.rate_per_secnumber | null
    assumptions.reasonrequiredstring
    assumptions.resourcestring | null
    assumptions.scaler_inputsobject | null
    assumptions.static_kinteger | null
    assumptions.step_idrequiredstring
    assumptions.tier_capinteger | null
    assumptions.uinteger | null
    assumptions.unit_costnumber | null
    assumptions.unresolved_binds[]string[] | null
    per_step[]requiredEstimateStepCost[]
    per_step.costrequirednumber
    per_step.step_idrequiredstring
    tierrequiredinteger
    timing_assumptions[]TimingAssumption[]
    timing_assumptions.coderequiredstring
    timing_assumptions.effective_fanoutinteger | null
    timing_assumptions.max_fanoutinteger | null
    timing_assumptions.messagestring | null
    timing_assumptions.modestring | null
    timing_assumptions.resourcestring | null
    timing_assumptions.step_idstring | null
    timing_assumptions.tier_capinteger | null
    totalrequirednumber
    warnings[]DiagnosticModel[]
    warnings.coderequiredstring
    warnings.messagerequiredstring
    warnings.pathstring | null
    warnings.portstring | null
    warnings.step_idstring | null
    Example 200 response
    {
      "assumptions": [
        {
          "cost": 0.25,
          "input_counts": {
            "ligands": {
              "basis": "propagated",
              "count": 25,
              "exceeds_max_items": false,
              "max_items": 100,
              "source": "embed3d.molecules"
            }
          },
          "job_type": "autodockvina",
          "multiplier": 1,
          "reason": "static",
          "resource": "cpu",
          "step_id": "dock",
          "unit_cost": 0.25
        }
      ],
      "per_step": [
        {
          "cost": 0.25,
          "step_id": "dock"
        },
        {
          "cost": 1,
          "step_id": "repredict"
        }
      ],
      "tier": 1,
      "timing_assumptions": [
        {
          "code": "gpu_concurrency_ceiling",
          "effective_fanout": 10,
          "message": "Platform GPU concurrency is capped near 10 containers; large GPU fan-outs may queue (not a live queue depth)."
        }
      ],
      "total": 1.25
    }

    List curated workflow templates

    GET/api/v1/workflows/templates

    API key or token

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/templates" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowTemplateListResponse

    Response fields
    FieldTypeDescription
    templates[]requiredWorkflowTemplateSummary[]
    templates.complexityrequiredstring
    templates.familyrequiredstring
    templates.idrequiredstring
    templates.namerequiredstring
    templates.params[]requiredstring[]
    templates.steps[]requiredWorkflowTemplateStep[]
    templates.steps.idrequiredstring
    templates.steps.job_typestring | null
    templates.steps.opstring | null
    templates.steps.typerequiredstring
    templates.summaryrequiredstring
    templates.titlerequiredstring
    Example 200 response
    {
      "templates": [
        {
          "complexity": "simple",
          "family": "virtual-screening",
          "id": "smiles-embed-dock",
          "name": "SMILES → 3D embed → dock",
          "params": [
            "ligands",
            "target_structure"
          ],
          "steps": [
            {
              "id": "embed3d",
              "job_type": "convert-batch",
              "type": "job"
            },
            {
              "id": "dock",
              "job_type": "autodockvina",
              "type": "job"
            }
          ],
          "summary": "Convert SMILES to 3D structures, detect pockets, then dock with AutoDock Vina.",
          "title": "Screen a compound library against a target"
        }
      ]
    }

    Get one curated workflow template

    GET/api/v1/workflows/templates/{template_id}

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    template_idrequiredstring

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/templates/TEMPLATE_ID" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowTemplateResponse

    Response fields
    FieldTypeDescription
    complexityrequiredstring
    familyrequiredstring
    idrequiredstring
    namerequiredstring
    specrequiredobject
    summaryrequiredstring
    titlerequiredstring
    Example 200 response
    {
      "complexity": "simple",
      "family": "virtual-screening",
      "id": "vina-boltz-linear",
      "name": "vina-boltz-linear",
      "spec": {
        "limits": {
          "on_step_failure": "fail_fast"
        },
        "name": "vina-boltz-linear",
        "params": {},
        "spec_version": 1,
        "steps": [
          {
            "id": "dock",
            "inputs": {},
            "job_type": "autodockvina",
            "mode": "batch",
            "resource": "cpu",
            "type": "job"
          },
          {
            "id": "repredict",
            "inputs": {
              "ligands": {
                "$from": "dock.poses"
              }
            },
            "job_type": "boltz2",
            "mode": "batch",
            "resource": "a10",
            "type": "job"
          }
        ]
      },
      "summary": "Dock with Vina, then re-predict with Boltz-2.",
      "title": "Re-predict docking hits with Boltz-2 affinities"
    }

    Get catalog workflow ports for a job type

    GET/api/v1/workflows/node-ports

    API key or token

    Parameters

    Query parameters
    NameTypeDescription
    job_typerequiredstring

    Limits: min length 1

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/node-ports?job_type=JOB_TYPE" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowNodePortsResponse

    Response fields
    FieldTypeDescription
    inputsrequiredobject
    job_typerequiredstring
    outputsrequiredobject
    Example 200 response
    {
      "inputs": {
        "molecules": {
          "cardinality": "many",
          "formats": [
            "smiles"
          ],
          "kind": "molecule_set",
          "max_items": 10000,
          "payload_field": "input_data",
          "required": true
        }
      },
      "job_type": "padel-descriptor",
      "outputs": {
        "archive": {
          "format": "zip",
          "kind": "archive",
          "resolver": "passthrough"
        },
        "descriptors": {
          "format": "csv",
          "kind": "table",
          "metrics": [],
          "resolver": "padel_descriptor"
        }
      }
    }

    List workflow runs

    GET/api/v1/workflows/runs

    API key or token

    Parameters

    Query parameters
    NameTypeDescription
    limitinteger

    Limits: ≥ 1, ≤ 100

    offsetinteger

    Limits: ≥ 0

    statusstring

    One of: "pending", "running", "paused", "completed", "failed", "cancelled"

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/runs" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowRunListResponse

    Response fields
    FieldTypeDescription
    items[]requiredWorkflowRunListItem[]
    items.charged_amountnumber

    Default: 0

    items.created_atstring | null
    items.definition_idstring | null
    items.estimated_costnumber

    Default: 0

    items.finished_atstring | null
    items.idrequiredstring
    items.max_run_costnumber | null
    items.remaining_holdnumber

    Default: 0

    items.run_namerequiredstring
    items.statusrequiredstring
    items.status_messagestring

    Default: ""

    items.step_countsobject
    items.updated_atstring | null
    limitrequiredinteger
    offsetrequiredinteger
    totalrequiredinteger

    Create a workflow run

    POST/api/v1/workflows/runs

    API key or tokenCharges your wallet

    Parameters

    Headers
    NameTypeDescription
    Idempotency-Keystring

    Request body

    application/json · CreateWorkflowRunRequest

    Request fields
    FieldTypeDescription
    definition_idstring | null
    max_run_costnumber | null
    paramsobject
    run_namerequiredstring

    Limits: min length 1

    specrequiredobject

    Example request

    curl -X POST "https://api.cognichem.com/api/v1/workflows/runs" \
      -H "X-Api-Key: $COGNICHEM_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
      "run_name": "vina-boltz-demo",
      "spec": {
        "limits": {
          "on_step_failure": "fail_fast"
        },
        "name": "vina-boltz-linear",
        "params": {},
        "spec_version": 1,
        "steps": [
          {
            "id": "dock",
            "inputs": {},
            "job_type": "autodockvina",
            "mode": "batch",
            "resource": "cpu",
            "type": "job"
          },
          {
            "id": "repredict",
            "inputs": {
              "ligands": {
                "$from": "dock.poses"
              }
            },
            "job_type": "boltz2",
            "mode": "batch",
            "resource": "a10",
            "type": "job"
          }
        ]
      }
    }'

    Responses

    Successful Response · application/json · WorkflowRunResponse

    Response fields
    FieldTypeDescription
    charged_amountnumber

    Default: 0

    created_atstring | null
    definition_idstring | null
    estimated_costnumber

    Default: 0

    finished_atstring | null
    idrequiredstring
    max_run_costnumber | null
    remaining_holdnumber

    Default: 0

    run_namerequiredstring
    specobject | null
    statusrequiredstring
    status_messagestring

    Default: ""

    step_countsobject
    steps[]WorkflowStepSummary[]
    steps.idrequiredstring
    steps.job_idstring | null
    steps.job_typestring | null
    steps.statusrequiredstring
    steps.status_messagestring

    Default: ""

    steps.step_indexinteger

    Default: 0

    steps.step_keyrequiredstring
    updated_atstring | null
    warnings[]object[]

    List artifacts for a workflow run

    GET/api/v1/workflows/runs/{run_id}/artifacts

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    run_idrequiredstring

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/runs/RUN_ID/artifacts" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowRunArtifactsResponse

    Response fields
    FieldTypeDescription
    items[]requiredWorkflowRunArtifactItem[]
    items.artifact_idrequiredstring
    items.data_formatrequiredstring
    items.data_kindrequiredstring
    items.expires_atstring | null
    items.is_virtualboolean

    Default: false

    items.job_idstring | null
    items.portrequiredstring
    items.record_countinteger

    Default: 0

    items.size_bytesinteger

    Default: 0

    items.step_indexinteger | null
    items.step_keystring | null

    Get a workflow run

    GET/api/v1/workflows/runs/{run_id}

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    run_idrequiredstring
    Query parameters
    NameTypeDescription
    include_specinteger

    Default: 0Limits: ≥ 0, ≤ 1

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/runs/RUN_ID" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowRunResponse

    Response fields
    FieldTypeDescription
    charged_amountnumber

    Default: 0

    created_atstring | null
    definition_idstring | null
    estimated_costnumber

    Default: 0

    finished_atstring | null
    idrequiredstring
    max_run_costnumber | null
    remaining_holdnumber

    Default: 0

    run_namerequiredstring
    specobject | null
    statusrequiredstring
    status_messagestring

    Default: ""

    step_countsobject
    steps[]WorkflowStepSummary[]
    steps.idrequiredstring
    steps.job_idstring | null
    steps.job_typestring | null
    steps.statusrequiredstring
    steps.status_messagestring

    Default: ""

    steps.step_indexinteger

    Default: 0

    steps.step_keyrequiredstring
    updated_atstring | null
    warnings[]object[]

    Delete a workflow run

    DELETE/api/v1/workflows/runs/{run_id}

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    run_idrequiredstring

    Example request

    curl -X DELETE "https://api.cognichem.com/api/v1/workflows/runs/RUN_ID" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response

    Resume a paused workflow run

    POST/api/v1/workflows/runs/{run_id}/resume

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    run_idrequiredstring

    Example request

    curl -X POST "https://api.cognichem.com/api/v1/workflows/runs/RUN_ID/resume" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowRunResponse

    Response fields
    FieldTypeDescription
    charged_amountnumber

    Default: 0

    created_atstring | null
    definition_idstring | null
    estimated_costnumber

    Default: 0

    finished_atstring | null
    idrequiredstring
    max_run_costnumber | null
    remaining_holdnumber

    Default: 0

    run_namerequiredstring
    specobject | null
    statusrequiredstring
    status_messagestring

    Default: ""

    step_countsobject
    steps[]WorkflowStepSummary[]
    steps.idrequiredstring
    steps.job_idstring | null
    steps.job_typestring | null
    steps.statusrequiredstring
    steps.status_messagestring

    Default: ""

    steps.step_indexinteger

    Default: 0

    steps.step_keyrequiredstring
    updated_atstring | null
    warnings[]object[]

    Cancel a workflow run

    POST/api/v1/workflows/runs/{run_id}/cancel

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    run_idrequiredstring

    Example request

    curl -X POST "https://api.cognichem.com/api/v1/workflows/runs/RUN_ID/cancel" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · CancelWorkflowRunResponse

    Response fields
    FieldTypeDescription
    cancelled_job_ids[]string[]
    messagerequiredstring
    run_idrequiredstring
    statusrequiredstring

    List workflow definitions

    GET/api/v1/workflows/definitions

    API key or token

    Parameters

    Query parameters
    NameTypeDescription
    limitinteger

    Limits: ≥ 1

    offsetinteger

    Limits: ≥ 0

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/definitions" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowDefinitionListResponse

    Response fields
    FieldTypeDescription
    items[]requiredWorkflowDefinitionListItem[]
    items.created_atstring | null
    items.descriptionrequiredstring
    items.graph_layoutobject | null
    items.idrequiredstring
    items.namerequiredstring
    items.spec_versionrequiredinteger
    items.updated_atstring | null
    items.user_idrequiredstring
    items.visibilitystring

    Default: "private"One of: "private", "link"

    limitrequiredinteger
    offsetrequiredinteger
    totalrequiredinteger

    Create a workflow definition

    POST/api/v1/workflows/definitions

    API key or token

    Parameters

    Headers
    NameTypeDescription
    Idempotency-Keystring

    Request body

    application/json · CreateWorkflowDefinitionRequest

    Request fields
    FieldTypeDescription
    descriptionstring

    Default: ""

    graph_layoutobject | null
    namerequiredstring

    Limits: min length 1

    specrequiredobject
    spec_versioninteger

    Default: 1Limits: ≥ 1

    Example request

    curl -X POST "https://api.cognichem.com/api/v1/workflows/definitions" \
      -H "X-Api-Key: $COGNICHEM_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
      "description": "Vina then Boltz linear chain",
      "graph_layout": {
        "nodes": {
          "dock": {
            "x": 0,
            "y": 0
          }
        }
      },
      "name": "my-triage",
      "spec": {
        "limits": {
          "on_step_failure": "fail_fast"
        },
        "name": "vina-boltz-linear",
        "params": {},
        "spec_version": 1,
        "steps": [
          {
            "id": "dock",
            "inputs": {},
            "job_type": "autodockvina",
            "mode": "batch",
            "resource": "cpu",
            "type": "job"
          },
          {
            "id": "repredict",
            "inputs": {
              "ligands": {
                "$from": "dock.poses"
              }
            },
            "job_type": "boltz2",
            "mode": "batch",
            "resource": "a10",
            "type": "job"
          }
        ]
      }
    }'

    Responses

    Successful Response · application/json · WorkflowDefinitionResponse

    Response fields
    FieldTypeDescription
    created_atstring | null
    descriptionrequiredstring
    graph_layoutobject | null
    idrequiredstring
    namerequiredstring
    share_tokenstring | null
    specrequiredobject
    spec_versionrequiredinteger
    updated_atstring | null
    user_idrequiredstring
    visibilitystring

    Default: "private"One of: "private", "link"

    Get a shared workflow definition

    GET/api/v1/workflows/definitions/shared/{token}

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    tokenrequiredstring

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/definitions/shared/TOKEN" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json

    Response fields: object

    Fork a shared definition into the caller's library

    POST/api/v1/workflows/definitions/shared/{token}/fork

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    tokenrequiredstring
    Headers
    NameTypeDescription
    Idempotency-Keystring

    Request body

    application/json · ForkSharedWorkflowDefinitionRequest

    Request fields
    FieldTypeDescription
    descriptionstring

    Default: ""

    namerequiredstring

    Limits: min length 1

    Example request

    curl -X POST "https://api.cognichem.com/api/v1/workflows/definitions/shared/TOKEN/fork" \
      -H "X-Api-Key: $COGNICHEM_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
      "name": "NAME"
    }'

    Responses

    Successful Response · application/json · WorkflowDefinitionResponse

    Response fields
    FieldTypeDescription
    created_atstring | null
    descriptionrequiredstring
    graph_layoutobject | null
    idrequiredstring
    namerequiredstring
    share_tokenstring | null
    specrequiredobject
    spec_versionrequiredinteger
    updated_atstring | null
    user_idrequiredstring
    visibilitystring

    Default: "private"One of: "private", "link"

    Enable link sharing for a definition

    POST/api/v1/workflows/definitions/{definition_id}/share

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    definition_idrequiredstring
    Headers
    NameTypeDescription
    Idempotency-Keystring

    Example request

    curl -X POST "https://api.cognichem.com/api/v1/workflows/definitions/DEFINITION_ID/share" \
      -H "X-Api-Key: $COGNICHEM_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)"

    Responses

    Successful Response · application/json · WorkflowDefinitionResponse

    Response fields
    FieldTypeDescription
    created_atstring | null
    descriptionrequiredstring
    graph_layoutobject | null
    idrequiredstring
    namerequiredstring
    share_tokenstring | null
    specrequiredobject
    spec_versionrequiredinteger
    updated_atstring | null
    user_idrequiredstring
    visibilitystring

    Default: "private"One of: "private", "link"

    Revoke link sharing for a definition

    DELETE/api/v1/workflows/definitions/{definition_id}/share

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    definition_idrequiredstring

    Example request

    curl -X DELETE "https://api.cognichem.com/api/v1/workflows/definitions/DEFINITION_ID/share" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowDefinitionResponse

    Response fields
    FieldTypeDescription
    created_atstring | null
    descriptionrequiredstring
    graph_layoutobject | null
    idrequiredstring
    namerequiredstring
    share_tokenstring | null
    specrequiredobject
    spec_versionrequiredinteger
    updated_atstring | null
    user_idrequiredstring
    visibilitystring

    Default: "private"One of: "private", "link"

    List definition version history

    GET/api/v1/workflows/definitions/{definition_id}/versions

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    definition_idrequiredstring
    Query parameters
    NameTypeDescription
    limitinteger

    Limits: ≥ 1

    offsetinteger

    Limits: ≥ 0

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/definitions/DEFINITION_ID/versions" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowDefinitionVersionListResponse

    Response fields
    FieldTypeDescription
    items[]requiredWorkflowDefinitionVersionListItem[]
    items.created_atstring | null
    items.created_by_user_idstring | null
    items.versionrequiredinteger
    limitrequiredinteger
    offsetrequiredinteger
    totalrequiredinteger

    Get a definition version snapshot

    GET/api/v1/workflows/definitions/{definition_id}/versions/{version}

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    definition_idrequiredstring
    versionrequiredinteger

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/definitions/DEFINITION_ID/versions/1" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowDefinitionVersionResponse

    Response fields
    FieldTypeDescription
    created_atstring | null
    created_by_user_idstring | null
    definition_idrequiredstring
    graph_layoutobject | null
    specrequiredobject
    versionrequiredinteger

    Restore a definition version

    POST/api/v1/workflows/definitions/{definition_id}/versions/{version}/restore

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    definition_idrequiredstring
    versionrequiredinteger
    Headers
    NameTypeDescription
    Idempotency-Keystring

    Example request

    curl -X POST "https://api.cognichem.com/api/v1/workflows/definitions/DEFINITION_ID/versions/1/restore" \
      -H "X-Api-Key: $COGNICHEM_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)"

    Responses

    Successful Response · application/json · WorkflowDefinitionResponse

    Response fields
    FieldTypeDescription
    created_atstring | null
    descriptionrequiredstring
    graph_layoutobject | null
    idrequiredstring
    namerequiredstring
    share_tokenstring | null
    specrequiredobject
    spec_versionrequiredinteger
    updated_atstring | null
    user_idrequiredstring
    visibilitystring

    Default: "private"One of: "private", "link"

    Download WorkflowSpec JSON export

    GET/api/v1/workflows/definitions/{definition_id}/download

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    definition_idrequiredstring
    Query parameters
    NameTypeDescription
    include_layoutinteger

    Default: 0Limits: ≥ 0, ≤ 1

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/definitions/DEFINITION_ID/download" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json

    Response fields: any

    Get a workflow definition

    GET/api/v1/workflows/definitions/{definition_id}

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    definition_idrequiredstring

    Example request

    curl "https://api.cognichem.com/api/v1/workflows/definitions/DEFINITION_ID" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response · application/json · WorkflowDefinitionResponse

    Response fields
    FieldTypeDescription
    created_atstring | null
    descriptionrequiredstring
    graph_layoutobject | null
    idrequiredstring
    namerequiredstring
    share_tokenstring | null
    specrequiredobject
    spec_versionrequiredinteger
    updated_atstring | null
    user_idrequiredstring
    visibilitystring

    Default: "private"One of: "private", "link"

    Update a workflow definition

    PATCH/api/v1/workflows/definitions/{definition_id}

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    definition_idrequiredstring
    Headers
    NameTypeDescription
    Idempotency-Keystring

    Request body

    application/json · UpdateWorkflowDefinitionRequest

    Request fields
    FieldTypeDescription
    descriptionstring | null
    graph_layoutobject | null
    namestring | null

    Limits: min length 1

    specobject | null
    spec_versioninteger | null

    Limits: ≥ 1

    Example request

    curl -X PATCH "https://api.cognichem.com/api/v1/workflows/definitions/DEFINITION_ID" \
      -H "X-Api-Key: $COGNICHEM_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
      "name": "my-triage-v2"
    }'

    Responses

    Successful Response · application/json · WorkflowDefinitionResponse

    Response fields
    FieldTypeDescription
    created_atstring | null
    descriptionrequiredstring
    graph_layoutobject | null
    idrequiredstring
    namerequiredstring
    share_tokenstring | null
    specrequiredobject
    spec_versionrequiredinteger
    updated_atstring | null
    user_idrequiredstring
    visibilitystring

    Default: "private"One of: "private", "link"

    Delete a workflow definition

    DELETE/api/v1/workflows/definitions/{definition_id}

    API key or token

    Parameters

    Path parameters
    NameTypeDescription
    definition_idrequiredstring

    Example request

    curl -X DELETE "https://api.cognichem.com/api/v1/workflows/definitions/DEFINITION_ID" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Responses

    Successful Response