---
id: workflow-read
title: Read a workflow
description: >-
  Returns the workflow and one resolved revision: the latest by default, or the
  one selected with `revision` or `alias` (mutually exclusive).
sidebar_label: Read a workflow
hide_title: true
hide_table_of_contents: true
api: >-
  eJztWN1v3DYM/1cIvTTFfL5069DBwB7SrhsyYEGRpU2BIqh1Fn1WI0uuJN/ldvD/PlD+uC/fpe1TH/qU+EyKP5I/UqTXzPO5Y8kHdmvsfa7MEgTmUksvjXbsLmICXWZlRc8sYdfoa6sd+AJh2WtwLcBoBIvOqAUKsLiQThqdBDnFPToPsxUdzWvlIzA2vCElhwozjwKW0heQ9qopyaRcSe5SOCtrX3OlVoAPmaqdXODTmEXMVGg5IbsULGE9nsQiFyxiFbe8RI+W/FszSfgr7gsWMc1LZAmTJGbxcy0tCpZ4W2PEXFZgyVmyZn5VkZTzVuo5a/ZjMUTMYo4WdYYJcHBoF2gnpdTklBRwli7zj3Ecp097t3ugTxxkSqL2k6wwDjXc4wrOlFmizbhDcKqeR1Br+blGqNCCsXOu5X/B5RAAfOBlpQjkMv8o89uXs9u8qufnmjVR5/HnGu1q43IfXzbiKEGeoz30tM06+EK6Ibeg63KGNj5qKeRuzMyxeA5WcGMkmAwnQWWk9g6433VcyQWy5i5iDrPaSr8KyZ4ht2gval+w5MMdvbboKqMdOkLy8/k5/dm1f7PP6RbJHqfJema0R+3pCF5VSmYhI9NPjs5ZH3psZp8w80RJS5T1skXRGwuS0gd3elKx6EB5Q9QPLXNDoCOWWeQexQXJ1JXo/r/btybFYQ5OM4jd4+q0Di/lRFiZ+4nLuNYtd9r8n1K7+OcSghpsqe0kY4QsoXRPHjvlGWlPpMfSTQdspLxdOZcjgSDYdtxuiZ4L7kfy2WzHfgRZbmzJPUsY5WTiZYmksknRF6o0TbQp2y2qXG9K+RRVepZdts1u0NlAP6DKlsrXUmYH6G5bOaz3nU4SgfPceqnnwD0826nyXwI/+ntprLJ0rRSfkWzbxQ9LO6+V2rrcYkhJJwWpQUnnYWgQUGuFzkEqdaZqgX8MOr/T2Wn8jYnvVF6O1FQInELu8Mr4NgcHAg5Lrr3M3qF14zXSEqXtV+/kSMuNGOq6JFK0dzKLhi495O2u6X68OlLGu5F9Y9Gh9rAsUG+a5ULy/vKOCVeA9vz9+8Om+ypcgIDWGhsD5WlmxAocXzlYFtzDMpxujZ4nwHUrCCmBSiPgUNQl1xO68Sn7kAr0XCp6pUUERsOCKylC3UPOpaotuigMHqi9XbXXap6jFkS8XKISJzp8Zc1MYfnTSKfvivJNKzFSk4eMdJ5rwa3onAqOn13/+Qpe/Hb+Ajpb0HrkonayEMAdpMcwpWEq2C3mFsdjeXwdIJAMvL2+jADjeQxp4X3lkum0bwgTt3Iey1jgYhpAu80rbfwkN7UW6e4F/U1nEOG7kJ5qQFfGwyDvPPe1G208g8bz8+ehlVBIHzt6MwyE0VQK2Ot3gA/SeUe2paZkZo/AHRx1060pezrSRtvAbJ3GreWro9U3zvPkcZ6Hq/LxSeUL7l7nsXJTus+nmdG57O5O5/j8kaiUtfNQ8AUNW+21BZ31FTzJjMAnXQsJXeTXsS7yVuND1a4R7fzdNZQflfyjkn9U8ndZye1kXRja3OcYgAZox0K7lqKhbTKUd7vR11ZtsZJXMqaJrlLc0wAWZ6bcWQz/pRJvo7C9Hg4O0UH9vkrPrRCLun/+7Ie6v29vWBOYkhtSX/QDGXsWn8fnbOA7u9qCAxdvLsMaY5wveeg53aJ8jVwAHzi6T431poV9Z59furh5fPDTSnEZ+B6S0vNss304tj3B01MiBW0ehXGeBNfrGXf41qqmoZ/bjwmUZSEdjXaCJTlXbn+0P4zOkc8UR+CGFXd7LVpwVZNY+K7xDba/4OPFCSD9OL5BcUcPVra7zVeF4+y6K8Kn8B18qhp1um+JerXtcx8MKVhD60iBXKAN3rcvLrIMK7+lcvAVhsI2tJe/Xt/QprNb7XvVHU4fhbNetxI35h510wzoPD0TwKb5H5zNcV8=
sidebar_class_name: get api-method
info_path: docs/api/nullplatform-api
custom_edit_url: null
canonical: 'https://docs.nullplatform.com/docs/api/workflow-read'
---
<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Read a workflow"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/workflows/definitions/{id}"}
  context={"endpoint"}
>

</MethodEndpoint>

Returns the workflow and one resolved revision: the latest by default, or the one selected with `revision` or `alias` (mutually exclusive).

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"Workflow reference: a server-minted id (`wf_...`) or the workflow's client-chosen key (lowercase slug, unique per organization).","example":"wf_ifWBbWfpug0n"},{"in":"query","name":"revision","schema":{"type":"integer"},"description":"Return this revision number."},{"in":"query","name":"alias","schema":{"type":"string"},"description":"Return the revision this alias points at.","example":"live"}]}
>

</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>

</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The workflow and the resolved revision.","content":{"application/json":{"schema":{"type":"object","properties":{"workflow":{"title":"Workflow","type":"object","required":["id","name","createdAt","updatedAt"],"properties":{"id":{"type":"string","example":"wf_ifWBbWfpug0n"},"key":{"type":"string","example":"ami-drift-scanner"},"name":{"type":"string","example":"AMI drift scanner"},"description":{"type":"string"},"path":{"type":"string","example":"/action-items/ami-drift"},"organizationId":{"type":"string"},"nrn":{"type":"string"},"metadata":{"type":"object"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"revision":{"title":"Revision","type":"object","required":["workflowId","revision","createdAt"],"properties":{"workflowId":{"type":"string","example":"wf_ifWBbWfpug0n"},"revision":{"type":"integer","description":"Revision number, starting at 1.","example":3},"definition":{"type":"object","nullable":true,"description":"The full definition. `null` in list responses unless `includeDefinition=true`."},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"releaseNotes":{"type":"string"},"semanticVersion":{"type":"string"}}},"resolvedVia":{"type":"string","enum":["latest","alias","revision"]},"aliasName":{"type":"string","description":"Present when resolved via `alias`."}}}}}},"4XX":{"description":"Client error. The body says what went wrong: an error `type`, a human-readable `detail`, and, on validation failures, one entry per offending field.","content":{"application/problem+json":{"schema":{"title":"Problem","type":"object","description":"The standard error body (RFC 7807 problem details, served as `application/problem+json`).","properties":{"type":{"type":"string","description":"Error type URI, e.g. `https://workflow-system.dev/errors/workflow-not-found`.","example":"https://workflow-system.dev/errors/workflow-not-found"},"title":{"type":"string","example":"Not found"},"status":{"type":"integer","example":404},"detail":{"type":"string","example":"No workflow with id wf_ifWBbWfpug0n exists"},"instance":{"type":"string","example":"/workflows/definitions/wf_ifWBbWfpug0n"},"errors":{"type":"array","description":"Present on validation failures: one entry per offending field.","items":{"type":"object","properties":{"path":{"type":"string","example":"/steps/scan/config"},"message":{"type":"string","example":"must have required property 'code'"}}}}}}}}},"5XX":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"title":"Problem","type":"object","description":"The standard error body (RFC 7807 problem details, served as `application/problem+json`).","properties":{"type":{"type":"string","description":"Error type URI, e.g. `https://workflow-system.dev/errors/workflow-not-found`.","example":"https://workflow-system.dev/errors/workflow-not-found"},"title":{"type":"string","example":"Not found"},"status":{"type":"integer","example":404},"detail":{"type":"string","example":"No workflow with id wf_ifWBbWfpug0n exists"},"instance":{"type":"string","example":"/workflows/definitions/wf_ifWBbWfpug0n"},"errors":{"type":"array","description":"Present on validation failures: one entry per offending field.","items":{"type":"object","properties":{"path":{"type":"string","example":"/steps/scan/config"},"message":{"type":"string","example":"must have required property 'code'"}}}}}}}}}}}
>

</StatusCodes>

