Zuplo · Arazzo Workflow

Zuplo Find and Update an API Key Bucket

Version 1.0.0

List the account's buckets, confirm a match exists, update one, and read it back.

1 workflow 1 source API 1 provider
View Spec View on GitHub AI GatewayAPI ManagementGatewaysPlatformArazzoWorkflows

Provider

zuplo

Workflows

find-and-update-bucket
Locate a bucket, update its description and tags, and read it back.
Lists buckets, branches when at least one is present, patches the named bucket, and reads it back to verify the change.
3 steps inputs: accountName, apiKey, bucketName, description, tags outputs: bucketId, name
1
listBuckets
ApiKeyBucketsService_list
List the account's buckets to confirm the target exists.
2
updateBucket
ApiKeyBucketsService_update
Patch the named bucket's description and tags. Only the supplied fields are changed.
3
readBucket
ApiKeyBucketsService_read
Read the bucket back to confirm the description and tags were written.

Source API Descriptions

Arazzo Workflow Specification

zuplo-find-and-update-bucket-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Zuplo Find and Update an API Key Bucket
  summary: List the account's buckets, confirm a match exists, update one, and read it back.
  description: >-
    Edits the description and tags on an existing API key bucket. The workflow
    lists the account's buckets, branches on whether any buckets are present,
    patches the named bucket's description and tags, and reads it back to
    confirm the update. 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: find-and-update-bucket
  summary: Locate a bucket, update its description and tags, and read it back.
  description: >-
    Lists buckets, branches when at least one is present, patches the named
    bucket, and reads it back to verify the change.
  inputs:
    type: object
    required:
    - accountName
    - apiKey
    - bucketName
    properties:
      accountName:
        type: string
        description: The Zuplo account name (Settings > Project Information).
      apiKey:
        type: string
        description: The Zuplo Developer API key, sent as a Bearer token.
      bucketName:
        type: string
        description: The name of the bucket to update.
      description:
        type: string
        description: A new description for the bucket.
      tags:
        type: object
        description: Key/value string tags to associate with the bucket.
  steps:
  - stepId: listBuckets
    description: List the account's buckets to confirm the target exists.
    operationId: ApiKeyBucketsService_list
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: accountName
      in: path
      value: $inputs.accountName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      buckets: $response.body#/data
    onSuccess:
    - name: bucketsPresent
      type: goto
      stepId: updateBucket
      criteria:
      - context: $response.body
        condition: $.data.length > 0
        type: jsonpath
  - stepId: updateBucket
    description: >-
      Patch the named bucket's description and tags. Only the supplied fields
      are changed.
    operationId: ApiKeyBucketsService_update
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: accountName
      in: path
      value: $inputs.accountName
    - name: bucketName
      in: path
      value: $inputs.bucketName
    requestBody:
      contentType: application/json
      payload:
        description: $inputs.description
        tags: $inputs.tags
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      bucketId: $response.body#/id
  - stepId: readBucket
    description: Read the bucket back to confirm the description and tags were written.
    operationId: ApiKeyBucketsService_read
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: accountName
      in: path
      value: $inputs.accountName
    - name: bucketName
      in: path
      value: $inputs.bucketName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      bucketId: $response.body#/id
      name: $response.body#/name
  outputs:
    bucketId: $steps.readBucket.outputs.bucketId
    name: $steps.readBucket.outputs.name