Zuplo · Arazzo Workflow

Zuplo Add a Manager to a Consumer

Version 1.0.0

Create a consumer, add a manager to it, then list the consumer's managers.

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

Provider

zuplo

Workflows

add-consumer-manager
Create a consumer and attach a manager, then list its managers.
Registers a consumer, adds a manager by email and sub, and lists the consumer's managers to verify the attachment.
3 steps inputs: accountName, apiKey, bucketName, consumerName, managerEmail, managerSub outputs: managerId, managers
1
createConsumer
ApiKeyConsumersService_create
Create the consumer that the manager will be attached to.
2
addManager
ApiKeyConsumerManagers_create
Add a manager to the consumer using the supplied email and sub.
3
listManagers
ApiKeyConsumerManagers_list
List the consumer's managers to confirm the manager was added.

Source API Descriptions

Arazzo Workflow Specification

zuplo-add-consumer-manager-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Zuplo Add a Manager to a Consumer
  summary: Create a consumer, add a manager to it, then list the consumer's managers.
  description: >-
    Managers are users who can administer a consumer's API keys in the developer
    portal. This workflow creates a consumer, adds a manager by email and
    identity-provider subject, and then lists the consumer's managers to confirm
    the manager was attached. 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: add-consumer-manager
  summary: Create a consumer and attach a manager, then list its managers.
  description: >-
    Registers a consumer, adds a manager by email and sub, and lists the
    consumer's managers to verify the attachment.
  inputs:
    type: object
    required:
    - accountName
    - apiKey
    - bucketName
    - consumerName
    - managerEmail
    - managerSub
    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 the consumer belongs to.
      consumerName:
        type: string
        description: A friendly name for the consumer, matching ^[a-z0-9-]{1,128}$.
      managerEmail:
        type: string
        description: The email address of the manager to add.
      managerSub:
        type: string
        description: The manager's subject identifier in the identity provider.
  steps:
  - stepId: createConsumer
    description: Create the consumer that the manager will be attached to.
    operationId: ApiKeyConsumersService_create
    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:
        name: $inputs.consumerName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      consumerName: $response.body#/name
  - stepId: addManager
    description: Add a manager to the consumer using the supplied email and sub.
    operationId: ApiKeyConsumerManagers_create
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: accountName
      in: path
      value: $inputs.accountName
    - name: bucketName
      in: path
      value: $inputs.bucketName
    - name: consumerName
      in: path
      value: $steps.createConsumer.outputs.consumerName
    requestBody:
      contentType: application/json
      payload:
        email: $inputs.managerEmail
        sub: $inputs.managerSub
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      managerId: $response.body#/id
  - stepId: listManagers
    description: List the consumer's managers to confirm the manager was added.
    operationId: ApiKeyConsumerManagers_list
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: accountName
      in: path
      value: $inputs.accountName
    - name: bucketName
      in: path
      value: $inputs.bucketName
    - name: consumerName
      in: path
      value: $steps.createConsumer.outputs.consumerName
    - name: limit
      in: query
      value: 1000
    - name: offset
      in: query
      value: 0
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      managers: $response.body#/data
  outputs:
    managerId: $steps.addManager.outputs.managerId
    managers: $steps.listManagers.outputs.managers