arazzo: 1.0.1 info: title: Zuplo Discover Account and List Its Buckets summary: Resolve the account name from the API key, then list that account's API key buckets. description: >- A discovery flow for tooling that holds an API key but does not yet know which account it belongs to. The workflow calls who-am-i to resolve the account associated with the key and then lists that account's API key buckets. 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: zuploApi url: ../openapi/zuplo-openapi.yml type: openapi workflows: - workflowId: discover-account-and-buckets summary: Resolve the account from the API key, then list its buckets. description: >- Calls who-am-i to discover the account tied to the API key, then lists the API key buckets belonging to that account. inputs: type: object required: - apiKey properties: apiKey: type: string description: The Zuplo Developer API key, sent as a Bearer token. steps: - stepId: whoAmI description: >- Resolve the caller's subject and account from the API key. The account field is included when calling with an API key. operationId: V1_whoAmI parameters: - name: Authorization in: header value: Bearer $inputs.apiKey successCriteria: - condition: $statusCode == 200 outputs: account: $response.body#/account sub: $response.body#/sub - stepId: listBuckets description: List the API key buckets for the resolved account. operationId: ApiKeyBucketsService_list parameters: - name: Authorization in: header value: Bearer $inputs.apiKey - name: accountName in: path value: $steps.whoAmI.outputs.account successCriteria: - condition: $statusCode == 200 outputs: buckets: $response.body#/data outputs: account: $steps.whoAmI.outputs.account buckets: $steps.listBuckets.outputs.buckets