Postman · Arazzo Workflow

Postman Publish a Mock and Add a Custom Response

Version 1.0.0

Publish an existing mock server, add a custom server response, and verify it.

1 workflow 1 source API 1 provider
View Spec View on GitHub AI Agent BuilderAI AgentsAPI CatalogAPI ClientAPI DesignAPI DevelopmentAPI DocumentationAPI GovernanceAPI LifecycleAPI MonitoringAPI NetworkAPI PlatformAPI TestingAudit LogsAutomationCI/CDCollaborationCollectionsComplianceDiscoveryEnvironmentsFlowsGraphQLgRPCHTTPInsightsMCPMCP GeneratorMock ServersMockingMonitorsNewmanOpenAPIPlatformPrivate API NetworkPublic API NetworkSecret ScanningSpec HubSpecificationsSSOTestingVaultWebSocketWorkflowsWorkspacesArazzoWorkflows

Provider

postman

Workflows

publish-mock-and-add-response
Publish a mock server and attach a custom server response.
Publishes a mock server, creates a custom server response on it, and lists the server responses to confirm the addition.
3 steps inputs: mockId, responseBody, responseName, statusCode outputs: mockId, serverResponseId
1
publishMock
publishMock
Publish the mock server so it is publicly accessible without authentication.
2
createServerResponse
createServerResponse
Create a custom server response on the mock server.
3
listServerResponses
getMockServerResponses
List the mock server's custom responses to confirm the new response is present.

Source API Descriptions

Arazzo Workflow Specification

postman-publish-mock-and-add-response-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Postman Publish a Mock and Add a Custom Response
  summary: Publish an existing mock server, add a custom server response, and verify it.
  description: >-
    Once a mock server exists you often want to make it publicly accessible and
    layer custom responses on top of the collection examples. This workflow
    publishes a mock server, creates a custom server response on it, and lists
    the mock's server responses to confirm the new response is present. Each
    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: mockServersApi
  url: ../openapi/postman-mock-servers-api-openapi.yml
  type: openapi
workflows:
- workflowId: publish-mock-and-add-response
  summary: Publish a mock server and attach a custom server response.
  description: >-
    Publishes a mock server, creates a custom server response on it, and lists
    the server responses to confirm the addition.
  inputs:
    type: object
    required:
    - mockId
    - responseName
    - statusCode
    properties:
      mockId:
        type: string
        description: The mock server's unique ID or UID.
      responseName:
        type: string
        description: The name of the custom server response.
      statusCode:
        type: integer
        description: The HTTP status code the custom response should return.
      responseBody:
        type: string
        description: The body content of the custom response.
  steps:
  - stepId: publishMock
    description: >-
      Publish the mock server so it is publicly accessible without
      authentication.
    operationId: publishMock
    parameters:
    - name: mockId
      in: path
      value: $inputs.mockId
    successCriteria:
    - condition: $statusCode == 200
  - stepId: createServerResponse
    description: >-
      Create a custom server response on the mock server.
    operationId: createServerResponse
    parameters:
    - name: mockId
      in: path
      value: $inputs.mockId
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.responseName
        statusCode: $inputs.statusCode
        body: $inputs.responseBody
        language: json
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      serverResponseId: $response.body#/id
  - stepId: listServerResponses
    description: >-
      List the mock server's custom responses to confirm the new response is
      present.
    operationId: getMockServerResponses
    parameters:
    - name: mockId
      in: path
      value: $inputs.mockId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstResponseId: $response.body#/0/id
  outputs:
    mockId: $inputs.mockId
    serverResponseId: $steps.createServerResponse.outputs.serverResponseId