Postman · Capability

Postman Mock Servers API — Mocks

Postman Mock Servers API — Mocks. 8 operations. Lead operation: Postman Get all mock servers. Self-contained Naftiko capability covering one Postman business surface.

Run with Naftiko PostmanMocks

What You Can Do

GET
Getallmocks — Postman Get all mock servers
/v1/mocks
POST
Createmock — Postman Create a mock server
/v1/mocks
GET
Getmock — Postman Get a mock server
/v1/mocks/{mockid}
PUT
Updatemock — Postman Update a mock server
/v1/mocks/{mockid}
DELETE
Deletemock — Postman Delete a mock server
/v1/mocks/{mockid}
GET
Getmockcalllogs — Postman Get mock server call logs
/v1/mocks/{mockid}/call-logs
POST
Publishmock — Postman Publish a mock server
/v1/mocks/{mockid}/publish
DELETE
Unpublishmock — Postman Unpublish a mock server
/v1/mocks/{mockid}/unpublish

MCP Tools

postman-get-all-mock-servers

Postman Get all mock servers

read-only idempotent
postman-create-mock-server

Postman Create a mock server

postman-get-mock-server

Postman Get a mock server

read-only idempotent
postman-update-mock-server

Postman Update a mock server

idempotent
postman-delete-mock-server

Postman Delete a mock server

idempotent
postman-get-mock-server-call

Postman Get mock server call logs

read-only idempotent
postman-publish-mock-server

Postman Publish a mock server

postman-unpublish-mock-server

Postman Unpublish a mock server

idempotent

Capability Spec

mock-servers-mocks.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Postman Mock Servers API — Mocks
  description: 'Postman Mock Servers API — Mocks. 8 operations. Lead operation: Postman Get all mock servers. Self-contained
    Naftiko capability covering one Postman business surface.'
  tags:
  - Postman
  - Mocks
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    POSTMAN_API_KEY: POSTMAN_API_KEY
capability:
  consumes:
  - type: http
    namespace: mock-servers-mocks
    baseUri: https://api.getpostman.com
    description: Postman Mock Servers API — Mocks business capability. Self-contained, no shared references.
    resources:
    - name: mocks
      path: /mocks
      operations:
      - name: getallmocks
        method: GET
        description: Postman Get all mock servers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace
          in: query
          type: string
          description: Filter by workspace ID.
      - name: createmock
        method: POST
        description: Postman Create a mock server
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace
          in: query
          type: string
          description: The workspace ID to create the mock server in.
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: mocks-mockId
      path: /mocks/{mockId}
      operations:
      - name: getmock
        method: GET
        description: Postman Get a mock server
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatemock
        method: PUT
        description: Postman Update a mock server
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletemock
        method: DELETE
        description: Postman Delete a mock server
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: mocks-mockId-call-logs
      path: /mocks/{mockId}/call-logs
      operations:
      - name: getmockcalllogs
        method: GET
        description: Postman Get mock server call logs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: limit
          in: query
          type: integer
          description: Maximum number of call logs to return.
        - name: cursor
          in: query
          type: string
          description: Pagination cursor for the next page of results.
        - name: since
          in: query
          type: string
          description: Return call logs since this timestamp (ISO 8601).
        - name: until
          in: query
          type: string
          description: Return call logs until this timestamp (ISO 8601).
        - name: include
          in: query
          type: string
          description: Include request and/or response body in the call logs.
        - name: sort
          in: query
          type: string
          description: Sort order for call logs.
        - name: direction
          in: query
          type: string
          description: Sort direction.
    - name: mocks-mockId-publish
      path: /mocks/{mockId}/publish
      operations:
      - name: publishmock
        method: POST
        description: Postman Publish a mock server
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: mocks-mockId-unpublish
      path: /mocks/{mockId}/unpublish
      operations:
      - name: unpublishmock
        method: DELETE
        description: Postman Unpublish a mock server
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: x-api-key
      value: '{{env.POSTMAN_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: mock-servers-mocks-rest
    port: 8080
    description: REST adapter for Postman Mock Servers API — Mocks. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/mocks
      name: mocks
      description: REST surface for mocks.
      operations:
      - method: GET
        name: getallmocks
        description: Postman Get all mock servers
        call: mock-servers-mocks.getallmocks
        with:
          workspace: rest.workspace
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createmock
        description: Postman Create a mock server
        call: mock-servers-mocks.createmock
        with:
          workspace: rest.workspace
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/mocks/{mockid}
      name: mocks-mockid
      description: REST surface for mocks-mockId.
      operations:
      - method: GET
        name: getmock
        description: Postman Get a mock server
        call: mock-servers-mocks.getmock
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatemock
        description: Postman Update a mock server
        call: mock-servers-mocks.updatemock
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletemock
        description: Postman Delete a mock server
        call: mock-servers-mocks.deletemock
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/mocks/{mockid}/call-logs
      name: mocks-mockid-call-logs
      description: REST surface for mocks-mockId-call-logs.
      operations:
      - method: GET
        name: getmockcalllogs
        description: Postman Get mock server call logs
        call: mock-servers-mocks.getmockcalllogs
        with:
          limit: rest.limit
          cursor: rest.cursor
          since: rest.since
          until: rest.until
          include: rest.include
          sort: rest.sort
          direction: rest.direction
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/mocks/{mockid}/publish
      name: mocks-mockid-publish
      description: REST surface for mocks-mockId-publish.
      operations:
      - method: POST
        name: publishmock
        description: Postman Publish a mock server
        call: mock-servers-mocks.publishmock
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/mocks/{mockid}/unpublish
      name: mocks-mockid-unpublish
      description: REST surface for mocks-mockId-unpublish.
      operations:
      - method: DELETE
        name: unpublishmock
        description: Postman Unpublish a mock server
        call: mock-servers-mocks.unpublishmock
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: mock-servers-mocks-mcp
    port: 9090
    transport: http
    description: MCP adapter for Postman Mock Servers API — Mocks. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: postman-get-all-mock-servers
      description: Postman Get all mock servers
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: mock-servers-mocks.getallmocks
      with:
        workspace: tools.workspace
      outputParameters:
      - type: object
        mapping: $.
    - name: postman-create-mock-server
      description: Postman Create a mock server
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: mock-servers-mocks.createmock
      with:
        workspace: tools.workspace
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: postman-get-mock-server
      description: Postman Get a mock server
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: mock-servers-mocks.getmock
      outputParameters:
      - type: object
        mapping: $.
    - name: postman-update-mock-server
      description: Postman Update a mock server
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: mock-servers-mocks.updatemock
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: postman-delete-mock-server
      description: Postman Delete a mock server
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: mock-servers-mocks.deletemock
      outputParameters:
      - type: object
        mapping: $.
    - name: postman-get-mock-server-call
      description: Postman Get mock server call logs
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: mock-servers-mocks.getmockcalllogs
      with:
        limit: tools.limit
        cursor: tools.cursor
        since: tools.since
        until: tools.until
        include: tools.include
        sort: tools.sort
        direction: tools.direction
      outputParameters:
      - type: object
        mapping: $.
    - name: postman-publish-mock-server
      description: Postman Publish a mock server
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: mock-servers-mocks.publishmock
      outputParameters:
      - type: object
        mapping: $.
    - name: postman-unpublish-mock-server
      description: Postman Unpublish a mock server
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: mock-servers-mocks.unpublishmock
      outputParameters:
      - type: object
        mapping: $.