arazzo: 1.0.1 info: title: MuleSoft Audit Application Inventory summary: Walk from organization to environment to the applications running in it. description: >- Builds a deployment inventory by traversing the Anypoint hierarchy. The workflow resolves the working organization, lists its environments, and then lists every CloudHub application running in the first environment using that organization and environment as the required headers. 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: anypointPlatformApi url: ../openapi/mulesoft-anypoint-platform-openapi.yml type: openapi workflows: - workflowId: audit-application-inventory summary: Enumerate the applications running in an organization's first environment. description: >- Resolves an organization, lists its environments, selects the first environment, and lists the applications deployed within it. inputs: type: object required: - bearerToken - orgId properties: bearerToken: type: string description: Anypoint Platform bearer access token. orgId: type: string description: The organization id to audit. steps: - stepId: getOrganization description: >- Confirm the organization exists and capture its id for the environment lookup. operationId: getOrganization parameters: - name: Authorization in: header value: "Bearer $inputs.bearerToken" - name: orgId in: path value: $inputs.orgId successCriteria: - condition: $statusCode == 200 outputs: orgId: $response.body#/id - stepId: listEnvironments description: >- List the organization's environments and capture the first environment id and client id for the application lookup. operationId: listEnvironments parameters: - name: Authorization in: header value: "Bearer $inputs.bearerToken" - name: orgId in: path value: $steps.getOrganization.outputs.orgId successCriteria: - condition: $statusCode == 200 outputs: environmentId: $response.body#/data/0/id - stepId: listApplications description: >- List the CloudHub applications running in the selected environment. operationId: listApplications parameters: - name: Authorization in: header value: "Bearer $inputs.bearerToken" - name: X-ANYPNT-ORG-ID in: header value: $steps.getOrganization.outputs.orgId - name: X-ANYPNT-ENV-ID in: header value: $steps.listEnvironments.outputs.environmentId successCriteria: - condition: $statusCode == 200 outputs: applications: $response.body outputs: orgId: $steps.getOrganization.outputs.orgId environmentId: $steps.listEnvironments.outputs.environmentId applications: $steps.listApplications.outputs.applications