---
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: eJztGF1v20byrwz2JY6Potxeih4E3IPTSwofcEHgJk2B1ChX3KG09XKX2VlKVgX998PskpRk0XaapzzkSaQ4398zWxHkgsTso/jg/G1l3BoUVtrqoJ0lcZMJhVR63fC7mIlrDK23BGGJsO4xpFXgLIJHcmaFCjyuNGlnZxHOyIAUYL5h0rI1IQPn4xdGIjRYBlSw1mEJRY9aMEwhjZZUwFndhlYaswG8K01LeoXPc5EJ16CXLNmVEjPRyzPzKJXIRCO9rDGgZ/22QrP8jQxLkQkraxQzoRnM46dWe1RiFnyLmaByibUUs60Im4ahKHhtF2J33xaDxTxW6NGWOAMJhH6FflJry0ppBWfFuvojz/Piea92L+gzgtJotGFSLh2hhVvcwJlxa/SlJAQy7SKD1upPLUKDHpxfSKv/iipHA+CdrBvDQq6rP3T14eX8Q9W0iwsrdlmn8acW/Wavcm9fMaIoi7xAf6pp8jqEpabBt2Dbeo4+f5BT9N0Ym4fsOXDBPZPIMlKCxmkbCGQ4VtzoFYrdTSYIy9brsInOnqP06C/bsBSzjzf82SM1zhISS/L9xQX/HPN/dz+mkyT3Ypq5l84GtIFJyKYxuowemf5JTGd7qrGb/4ll4JD0HLJBJyl6ZhFSh6hOH1QiO0HeB+rHFLnR0JkoPcqA6pJh2kZ1zzf3uWl16oPHI0jc4uZxHFnrifK6ChMqpbUpdpL/H0O7/N8VRDQ4QDtyxkiwxNR9lOxUlow90QFrmg6yMfJh5lyNGILF9uN8awxSyTDiz92h7Uckq5yvZRAzwT6ZBF0jo+xd9Jkou122T9uDULnep/JjodJH2VUqdgPOXvSTUDlA+bshcyTocVk5zfejSpIBBemDtguQAb47yvJ/xvjo+9JYZtnWGDln2FTFT1O7ao05aG45FIxTgLZgNAUYCgS01iARFNqWplX4nwHn30y7yL/Q8R3Ky5GcioYz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ueS8L03ux3/nU5KnOtKE9tciVklDd1f8E6t88Cx6gFx46HjcDleSdMyWLxufQHvzzhhPSJIv5TtpbjhlxR2f9McZ9ddKX4OX8HBclTpvjHazaHOvTG0EjteSpcoFfqoffpwWZbYhAOUk1scm21oMj+/esf77nHNv1fjI/VRcbbbBPHO3aLd7QbpAr+zgLvd/wEgwSoy
sidebar_class_name: "get api-method"
info_path: docs/api/workflows
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<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>


      