---
id: workflow-config-usage
title: List workflows using a secret or variable
description: >-
  Lists the workflows that use the entry, paginated. Check it before you delete
  an entry. A workflow uses an entry when all of these hold:
sidebar_label: List workflows using a secret or variable
hide_title: true
hide_table_of_contents: true
api: >-
  eJztWG1vGzcS/isDfqmDW720Z6N3uk++ID24uLhBmiAFUkOilrMSay655XBlq8L+98OQu5LW3shODzjcB3+xzLfhw5lnXnZ2IsgVidln8cn528K4OyDMPQYCaRVspNdyaZDETSYUUu51FbSzYib+rSkQhDXCXXuSRzJATRin0Qa/zaCSK21lQDWG12vMb0EHWGLhPMLW1aDQYECQNu0fw+VeHkui/QrcrdGCNAZcwfIJYe2Mmv1qf7Uj+NBdCEZvkMDZHjTQgdAUGc/rQFA4o9Bn4DzPyHYMcuk2CDqMWeS16y7WYR2lkSwRLP8hFpIbR+ghuN5VGRBPaAJNBz300XgkZzZI8Z6rQGBkQArgcaNJOxuB8Ylugt/sLPIP3yzzoDcI0mhJSBl4LNCjzTHdyBBnsGgNOb6+fPtmAYXzIFvjZrDYSN9f6Uw9ZoX+ZM32gW3ZWLm04FEqkB7BaAqoIk1yV9uAKj49akvmORKxairpQ2sxcH4lrf5DMoPiBIuIQpcItHY+sDrX0rZvlwZqkisci0y4Cn08eKXETHSwRrmzhV7N4jaRiUp6WWJAz5TeCc1ErWRYi0ywUsRMaCUy4fH3WntUYhZ8jZmgfI2lFLOdCNuKd1Hw2q5E85D0TLN0ZWtWreBskRer+Xg8XrxioHgvy8qwEJ7+bvl39W0xlaLJWji/1+i3BzxGlzqIAQjaBlyhFwyhkLUJYnYxzUQp73VZlzyYDsJrN4CtyyV6Vr1Hqk0gqNCzNyKc5UaWFSq2z8V02od9Mf0SVFcUhE9gLbVN8KZHuIeBUpA+aLuCymkbIgvbWKGd7UGaNjeZIMxrr8M2GnaJ0qO/rMNazD7f8LJHqpwlJIb13XTKP4/v3AejRD1XnAxeDCJ3NqANLE5WldF5hDf5jVjm7rEq3PI3zFlJlWfKBp0QKRmOd0nvJ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P376IJpIlcLxccaTrPjteDqeij3hxfURHLh8dxW/mh2FUsag03ZxuG971PWoiQ3bNQY5CHbJ6yFrdofo9tL8fWn+/i+bv63LBLwPk/gBFhsp3hxizOd9S5hSGuZIkolZbJQlb77JxNpR4L273VISfvSmaXg69TnZx5UmVoMSs0IawhMe8F+0WgdfE3tt+25wLMjETMS28deBerKteuL6fYf3cP8ND9qA8HUaOnvfhuVX8Iy2+SCqLonZ7TGmDq1WorlpMrFGqdBHdGnhMs+xOn7Go+Kfn7VPCP9680FkQvbD84NwHKUPwtnt0o4P7hZt0+zRBR4zwKb5Dzdzngw=
sidebar_class_name: get api-method
info_path: docs/api/nullplatform-api
custom_edit_url: null
canonical: 'https://docs.nullplatform.com/docs/api/workflow-config-usage'
---
<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"List workflows using a secret or variable"}
>
</Heading>

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

</MethodEndpoint>

Lists the workflows that use the entry, paginated. Check it before you delete an entry. A workflow uses an entry when all of these hold:

- The entry lives on the workflow itself, on its folder, or on a folder above it.
- No entry with the same name sits closer to the workflow, so this is the entry the workflow resolves.
- Its latest revision, or the revision of one of its active aliases, references the name: `secrets.NAME` for a secret, `vars.NAME` for a variable.

Only the workflows you can read are listed and counted, so with access to part of the organization the list can be shorter than the real usage.

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

<ParamsDetails
  parameters={[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"The config entry id (`cfg_...`).","example":"cfg_2b9d1f0a"},{"in":"query","name":"limit","schema":{"type":"integer","default":50,"maximum":500},"description":"The maximum number of results per page (clamped to 500).","example":50},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0},"description":"The starting point for pagination.","example":0}]}
>

</ParamsDetails>

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

</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The paginated list of workflows that use the entry.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"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"}}}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}}}}},"503":{"description":"The secrets and variables store is not configured on this engine (`config_entries_unavailable`), as plain JSON.","content":{"application/json":{"schema":{"title":"ConfigError","type":"object","description":"The error body secrets-and-variables endpoints return: a machine-readable code plus a message.","properties":{"error":{"type":"string","description":"Machine-readable code, e.g. `invalid_name`, `invalid_value`, `invalid_secret`, `invalid_place`, `invalid_path`, `place_required`, `secret_flag_immutable`, `workflow_not_found`, `not_found`, `config_entries_unavailable`.","example":"invalid_place"},"message":{"type":"string","example":"Provide exactly one of path or workflow"}}}}}},"4XX":{"description":"Client error. Invalid paging parameters return a problem body; an unknown entry is a plain JSON 404 (`not_found`).","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'"}}}}}}},"application/json":{"schema":{"title":"ConfigError","type":"object","description":"The error body secrets-and-variables endpoints return: a machine-readable code plus a message.","properties":{"error":{"type":"string","description":"Machine-readable code, e.g. `invalid_name`, `invalid_value`, `invalid_secret`, `invalid_place`, `invalid_path`, `place_required`, `secret_flag_immutable`, `workflow_not_found`, `not_found`, `config_entries_unavailable`.","example":"invalid_place"},"message":{"type":"string","example":"Provide exactly one of path or workflow"}}}}}},"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>

