Hookdeck · Arazzo Workflow

Hookdeck Decommission a Source

Version 1.0.0

Read a source, disable it to stop ingestion, then delete it.

1 workflow 1 source API 1 provider
View Spec View on GitHub WebhooksEvent GatewaysGatewaysEventsEvent InfrastructureEvent-DrivenMessagingQueuesRetriesTransformationsObservabilityArazzoWorkflows

Provider

hookdeck

Workflows

decommission-source
Safely disable then delete a source.
Reads a source, disables it to halt ingestion, confirms the disabled state, and deletes it.
3 steps inputs: sourceId outputs: deletedSourceId, disabledAt
1
readSource
getSource
Read the source to confirm it exists before decommissioning it.
2
disableSource
disableSource
Disable the source so it stops accepting inbound requests, confirming the disabled timestamp is set.
3
deleteSource
deleteSource
Delete the disabled source, removing it permanently.

Source API Descriptions

Arazzo Workflow Specification

hookdeck-decommission-source-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Hookdeck Decommission a Source
  summary: Read a source, disable it to stop ingestion, then delete it.
  description: >-
    Retiring a webhook endpoint should be done in two safe steps: stop accepting
    new requests, then remove the resource. This workflow reads the source to
    confirm it exists, disables it so it stops ingesting requests, verifies the
    disabled timestamp is set, then deletes it. Every step spells out its request
    inline so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: sourcesApi
  url: ../openapi/hookdeck-sources-api-openapi.yml
  type: openapi
workflows:
- workflowId: decommission-source
  summary: Safely disable then delete a source.
  description: >-
    Reads a source, disables it to halt ingestion, confirms the disabled state,
    and deletes it.
  inputs:
    type: object
    required:
    - sourceId
    properties:
      sourceId:
        type: string
        description: The id of the source to disable and delete.
  steps:
  - stepId: readSource
    description: >-
      Read the source to confirm it exists before decommissioning it.
    operationId: getSource
    parameters:
    - name: id
      in: path
      value: $inputs.sourceId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      sourceId: $response.body#/id
      name: $response.body#/name
  - stepId: disableSource
    description: >-
      Disable the source so it stops accepting inbound requests, confirming the
      disabled timestamp is set.
    operationId: disableSource
    parameters:
    - name: id
      in: path
      value: $steps.readSource.outputs.sourceId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.disabled_at != null
      type: jsonpath
    outputs:
      disabledAt: $response.body#/disabled_at
  - stepId: deleteSource
    description: >-
      Delete the disabled source, removing it permanently.
    operationId: deleteSource
    parameters:
    - name: id
      in: path
      value: $steps.readSource.outputs.sourceId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deletedSourceId: $response.body#/id
  outputs:
    deletedSourceId: $steps.deleteSource.outputs.deletedSourceId
    disabledAt: $steps.disableSource.outputs.disabledAt