MockServer Verify API

Verify requests (both MockServer & MockServer Proxy)

Operations 2

PUT /mockserver/verify verify a request has been received a specific number of times #
PUT /mockserver/verifySequence verify a sequence of request has been received in the specific order #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mockserver-verify-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mockserver-verify-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: MockServer Verify API
  version: 5.15.x
  description: MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below).
  license:
    url: https://github.com/mock-server/mockserver/blob/master/LICENSE.md
    name: Apache 2.0
servers:
- url: http://localhost:1080/
- url: https://localhost:1080/
tags:
- name: Verify
  description: Verify requests (both MockServer & MockServer Proxy)
paths:
  /mockserver/verify:
    put:
      tags:
      - Verify
      summary: verify a request has been received a specific number of times
      responses:
        '202':
          description: matching request has been received specified number of times
        '400':
          description: incorrect request format
        '406':
          description: request has not been received specified numbers of times
          content:
            text/plain:
              schema:
                type: string
                description: JUnit expected:<...> but was:<...> format
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Verification'
        description: request matcher and the number of times to match
        required: true
      operationId: putMockserverVerify
      x-operation-id-source: derived
  /mockserver/verifySequence:
    put:
      tags:
      - Verify
      summary: verify a sequence of request has been received in the specific order
      responses:
        '202':
          description: request sequence has been received in specified order
        '400':
          description: incorrect request format
        '406':
          description: request sequence has not been received in specified order
          content:
            text/plain:
              schema:
                type: string
                description: JUnit expected:<...> but was:<...> format
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerificationSequence'
        description: the sequence of requests matchers
        required: true
      operationId: putMockserverVerifySequence
      x-operation-id-source: derived
components:
  schemas:
    VerificationSequence:
      description: verification sequence
      type: object
      additionalProperties: false
      properties:
        expectationIds:
          type: array
          additionalProperties: false
          items:
            $ref: '#/components/schemas/ExpectationId'
        httpRequests:
          type: array
          items:
            $ref: '#/components/schemas/RequestDefinition'
        maximumNumberOfRequestToReturnInVerificationFailure:
          type: integer
      oneOf:
      - required:
        - expectationIds
      - required:
        - httpRequests
    Protocol:
      description: protocol matcher
      enum:
      - HTTP_1_1
      - HTTP_2
    RequestDefinition:
      description: request definition
      oneOf:
      - $ref: '#/components/schemas/HttpRequest'
      - $ref: '#/components/schemas/OpenAPIDefinition'
    KeyToValue:
      oneOf:
      - type: array
        additionalProperties: false
        items:
          type: object
          properties:
            name:
              type: string
            value:
              type: string
      - type: object
        additionalProperties: true
    ExpectationId:
      description: pointer to existing expectation
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
      required:
      - id
    StringOrJsonSchema:
      description: string value that can be support nottable, optional or a json schema
      oneOf:
      - type: string
      - type: object
        additionalProperties: false
        properties:
          not:
            type: boolean
          optional:
            type: boolean
          value:
            type: string
          schema:
            $ref: http://json-schema.org/draft-04/schema
          parameterStyle:
            type: string
            enum:
            - SIMPLE
            - SIMPLE_EXPLODED
            - LABEL
            - LABEL_EXPLODED
            - MATRIX
            - MATRIX_EXPLODED
            - FORM_EXPLODED
            - FORM
            - SPACE_DELIMITED_EXPLODED
            - SPACE_DELIMITED
            - PIPE_DELIMITED_EXPLODED
            - PIPE_DELIMITED
            - DEEP_OBJECT
    Verification:
      description: verification
      type: object
      additionalProperties: false
      properties:
        expectationId:
          $ref: '#/components/schemas/ExpectationId'
        httpRequest:
          $ref: '#/components/schemas/RequestDefinition'
        times:
          $ref: '#/components/schemas/VerificationTimes'
        maximumNumberOfRequestToReturnInVerificationFailure:
          type: integer
      oneOf:
      - required:
        - expectationId
      - required:
        - httpRequest
    Body:
      description: request body matcher
      anyOf:
      - type: object
        description: binary body matcher
        additionalProperties: false
        properties:
          not:
            type: boolean
          type:
            enum:
            - BINARY
          base64Bytes:
            type: string
          contentType:
            type: string
      - type: object
        description: json body matcher
        additionalProperties: false
        properties:
          not:
            type: boolean
          type:
            enum:
            - JSON
          json:
            type: string
          contentType:
            type: string
          matchType:
            enum:
            - STRICT
            - ONLY_MATCHING_FIELDS
      - type: object
        description: json matching fields body matcher
        additionalProperties: true
      - type: object
        description: json schema body matcher
        additionalProperties: false
        properties:
          not:
            type: boolean
          type:
            enum:
            - JSON_SCHEMA
          jsonSchema:
            $ref: http://json-schema.org/draft-04/schema
      - type: object
        description: JSON path body matcher
        additionalProperties: false
        properties:
          not:
            type: boolean
          type:
            enum:
            - JSON_PATH
          jsonPath:
            type: string
      - type: object
        description: parameter body matcher
        additionalProperties: false
        properties:
          not:
            type: boolean
          type:
            enum:
            - PARAMETERS
          parameters:
            $ref: '#/components/schemas/KeyToMultiValue'
      - type: object
        description: regex body matcher
        additionalProperties: false
        properties:
          not:
            type: boolean
          type:
            enum:
            - REGEX
          regex:
            type: string
      - type: object
        description: string body matcher
        additionalProperties: false
        properties:
          not:
            type: boolean
          type:
            enum:
            - STRING
          string:
            type: string
          contentType:
            type: string
          subString:
            type: boolean
      - type: string
        description: substring body matcher
      - type: object
        description: xml body matcher
        additionalProperties: false
        properties:
          not:
            type: boolean
          type:
            enum:
            - XML
          xml:
            type: string
          contentType:
            type: string
      - type: object
        description: xml schema body matcher
        additionalProperties: false
        properties:
          not:
            type: boolean
          type:
            enum:
            - XML_SCHEMA
          xmlSchema:
            type: string
      - type: object
        description: xpath body matcher
        additionalProperties: false
        properties:
          not:
            type: boolean
          type:
            enum:
            - XPATH
          xpath:
            type: string
    KeyToMultiValue:
      oneOf:
      - type: array
        additionalProperties: false
        items:
          type: object
          additionalProperties: false
          properties:
            name:
              type: string
            values:
              type: array
              additionalProperties: false
              items:
                type: string
      - type: object
        additionalProperties: true
        properties:
          keyMatchStyle:
            type: string
            enum:
            - MATCHING_KEY
            - SUB_SET
            default: SUB_SET
    SocketAddress:
      description: remote address to send request to, only used for request overrides
      type: object
      additionalProperties: false
      properties:
        host:
          type: string
        port:
          type: integer
        scheme:
          enum:
          - HTTP
          - HTTPS
    VerificationTimes:
      description: number of request to verify
      type: object
      additionalProperties: false
      properties:
        atLeast:
          type: integer
        atMost:
          type: integer
    OpenAPIDefinition:
      description: open api or swagger request matcher
      type: object
      additionalProperties: false
      properties:
        specUrlOrPayload:
          type: string
        operationId:
          type: string
    HttpRequest:
      description: request properties matcher
      type: object
      additionalProperties: false
      properties:
        secure:
          type: boolean
        keepAlive:
          type: boolean
        method:
          $ref: '#/components/schemas/StringOrJsonSchema'
        path:
          $ref: '#/components/schemas/StringOrJsonSchema'
        pathParameters:
          $ref: '#/components/schemas/KeyToMultiValue'
        queryStringParameters:
          $ref: '#/components/schemas/KeyToMultiValue'
        body:
          $ref: '#/components/schemas/Body'
        headers:
          $ref: '#/components/schemas/KeyToMultiValue'
        cookies:
          $ref: '#/components/schemas/KeyToValue'
        socketAddress:
          $ref: '#/components/schemas/SocketAddress'
        protocol:
          $ref: '#/components/schemas/Protocol'