WireMock Stub Mappings API

Operations on stub mappings

Business capability
Software Quality Engineering BC-4200.50

Operations 11

GET /__admin/mappings Get All Stub Mappings #
POST /__admin/mappings Create a New Stub Mapping #
DELETE /__admin/mappings Delete All Stub Mappings #
POST /__admin/mappings/reset Reset Stub Mappings #
POST /__admin/mappings/save Persist Stub Mappings #
POST /__admin/mappings/import Import Stub Mappings #
GET /__admin/mappings/{stubMappingId} Get Stub Mapping by ID #
PUT /__admin/mappings/{stubMappingId} Update a Stub Mapping #
DELETE /__admin/mappings/{stubMappingId} Delete a Stub Mapping #
POST /__admin/mappings/find-by-metadata Create admin mappings find by metadata #
POST /__admin/mappings/remove-by-metadata Delete Stub Mappings Matching Metadata #

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/wiremock-stub-mappings-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

wiremock-stub-mappings-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WireMock Admin Stub Mappings API
  description: The WireMock Admin REST API provides programmatic control over a running WireMock server instance. It supports creating, updating, and deleting stub mappings; querying the request journal; recording and replaying real API traffic; managing stateful scenarios; and performing system operations such as reset and shutdown. Available under the /__admin/ path prefix on any running WireMock instance.
  version: 2.35.0
  contact:
    name: WireMock Community
    url: https://wiremock.org/
servers:
- url: http://localhost:8080
  description: Local WireMock server instance
tags:
- name: Stub Mappings
  description: Operations on stub mappings
  externalDocs:
    description: User documentation
    url: http://wiremock.org/docs/stubbing/
paths:
  /__admin/mappings:
    get:
      summary: Get All Stub Mappings
      tags:
      - Stub Mappings
      parameters:
      - description: The maximum number of results to return
        in: query
        name: limit
        required: false
        example: 10
        schema:
          type: integer
      - description: The start index of the results to return
        in: query
        name: offset
        required: false
        example: 0
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: schemas/stub-mappings.yaml
              example:
                $ref: examples/stub-mappings.yaml
          description: All stub mappings
      operationId: getAdminMappings
      x-operation-id-source: derived
    post:
      summary: Create a New Stub Mapping
      tags:
      - Stub Mappings
      requestBody:
        $ref: '#/components/requestBodies/stubMapping'
      responses:
        '201':
          $ref: '#/components/responses/stubMapping'
      operationId: postAdminMappings
      x-operation-id-source: derived
    delete:
      summary: Delete All Stub Mappings
      tags:
      - Stub Mappings
      responses:
        '200':
          description: Successfully deleted
      operationId: deleteAdminMappings
      x-operation-id-source: derived
  /__admin/mappings/reset:
    post:
      summary: Reset Stub Mappings
      description: Restores stub mappings to the defaults defined back in the backing store
      tags:
      - Stub Mappings
      responses:
        '200':
          description: Successfully reset
      operationId: postAdminMappingsReset
      x-operation-id-source: derived
  /__admin/mappings/save:
    post:
      summary: Persist Stub Mappings
      description: Save all persistent stub mappings to the backing store
      tags:
      - Stub Mappings
      responses:
        '200':
          description: Successfully saved
      operationId: postAdminMappingsSave
      x-operation-id-source: derived
  /__admin/mappings/import:
    post:
      summary: Import Stub Mappings
      description: Import given stub mappings to the backing store
      tags:
      - Stub Mappings
      responses:
        '200':
          description: Successfully imported
      operationId: postAdminMappingsImport
      x-operation-id-source: derived
  /__admin/mappings/{stubMappingId}:
    parameters:
    - description: The UUID of stub mapping
      in: path
      name: stubMappingId
      required: true
      example: 730d3e32-d098-4169-a20c-554c3bedce58
      schema:
        type: string
    get:
      summary: Get Stub Mapping by ID
      tags:
      - Stub Mappings
      responses:
        '404':
          description: Stub mapping not found
        '200':
          $ref: '#/components/responses/stubMapping'
      operationId: getAdminMappingsByStubMappingId
      x-operation-id-source: derived
    put:
      summary: Update a Stub Mapping
      tags:
      - Stub Mappings
      requestBody:
        $ref: '#/components/requestBodies/stubMapping'
      responses:
        '404':
          description: Stub mapping not found
        '200':
          $ref: '#/components/responses/stubMapping'
      operationId: putAdminMappingsByStubMappingId
      x-operation-id-source: derived
    delete:
      summary: Delete a Stub Mapping
      tags:
      - Stub Mappings
      responses:
        '404':
          description: Stub mapping not found
        '200':
          description: OK
      operationId: deleteAdminMappingsByStubMappingId
      x-operation-id-source: derived
  /__admin/mappings/find-by-metadata:
    post:
      description: Find stubs by matching on their metadata
      tags:
      - Stub Mappings
      requestBody:
        content:
          application/json:
            schema:
              $ref: schemas/content-pattern.yaml
            example:
              $ref: examples/by-metadata-request.yaml
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: schemas/stub-mappings.yaml
              example:
                $ref: examples/stub-mappings.yaml
          description: Matched stub mappings
      summary: Create admin mappings find by metadata
      x-summary-source: derived
      operationId: postAdminMappingsFindByMetadata
      x-operation-id-source: derived
  /__admin/mappings/remove-by-metadata:
    post:
      summary: Delete Stub Mappings Matching Metadata
      tags:
      - Stub Mappings
      requestBody:
        content:
          application/json:
            schema:
              $ref: schemas/content-pattern.yaml
            example:
              $ref: examples/by-metadata-request.yaml
      responses:
        '200':
          description: The stub mappings were successfully removed
      operationId: postAdminMappingsRemoveByMetadata
      x-operation-id-source: derived
components:
  requestBodies:
    stubMapping:
      content:
        application/json:
          schema:
            $ref: schemas/stub-mapping.yaml
          example:
            $ref: examples/stub-mapping-no-id.yaml
  responses:
    stubMapping:
      description: The stub mapping
      content:
        application/json:
          schema:
            $ref: schemas/stub-mapping.yaml
          example:
            $ref: examples/stub-mapping-with-id.yaml
externalDocs:
  description: WireMock User Documentation
  url: https://wiremock.org/docs/