---
title: "verify a sequence of request has been received in the specific order"
method: PUT
path: "/mockserver/verifySequence"
tags: ["verify"]
---

# verify a sequence of request has been received in the specific order

`PUT /mockserver/verifySequence`

## Request

- Base URL: `http://localhost:1080`
- URL: `http://localhost:1080/mockserver/verifySequence`
- Auth: none declared

## Request body

- union: verification sequence
  - object
    - `expectationIds` ExpectationId[], required
      - `id` string, required
    - `httpRequests` RequestDefinition[]
      - union: request definition
        - HttpRequest: request properties matcher
          - `secure` boolean
          - `keepAlive` boolean
          - `method` union: string value that can be support nottable, optional or a json schema
            - string
            - object
              - …
          - `path` union: string value that can be support nottable, optional or a json schema
            - string
            - object
              - …
          - `pathParameters` union
            - object[]
              - …
            - object
              - …
          - `queryStringParameters` union
            - object[]
              - …
            - object
              - …
          - `body` union: request body matcher
            - object: binary body matcher
              - …
            - object: json body matcher
              - …
            - object: json matching fields body matcher
            - object: json schema body matcher
              - …
            - object: JSON path body matcher
              - …
            - object: parameter body matcher
              - …
            - object: regex body matcher
              - …
            - object: string body matcher
              - …
            - string: substring body matcher
            - object: xml body matcher
              - …
            - object: xml schema body matcher
              - …
            - object: xpath body matcher
              - …
            - object: all-of body matcher — matches only when every one of its component body matchers matches the same request body
              - …
            - object: binary body matcher
              - …
            - object: json body matcher
              - …
            - object: json schema body matcher
              - …
            - object: JSON path body matcher
              - …
            - object: parameter body matcher
              - …
            - object: multipart form-data body matcher
              - …
            - object: regex body matcher
              - …
            - object: string body matcher
              - …
            - object: xml body matcher
              - …
            - object: xml schema body matcher
              - …
            - object: xpath body matcher
              - …
            - object: JSON-RPC body matcher
              - …
            - object: GraphQL body matcher
              - …
          - `headers` union
            - object[]
              - …
            - object
              - …
          - `cookies` union
            - object[]
              - …
            - object
          - `socketAddress` SocketAddress: remote address to send request to, only used for request overrides
            - `host` string
            - `port` integer
            - `scheme` 'HTTP' | 'HTTPS'
          - `protocol` 'HTTP_1_1' | 'HTTP_2' | 'HTTP_3': protocol matcher
          - `jwt` Jwt: JSON Web Token (JWT) request matcher — decodes the token carried in a request header (no signature verification) and matches its claims
            - `header` string: name of the request header carrying the JWT (default 'authorization')
            - `scheme` string: authentication scheme prefix stripped from the header value before decoding (default 'Bearer')
            - `claims` object: claim-value criteria; each value may be an exact string, regex or '!'-negated form
            - `issuer` union: string value that can be support nottable, optional or a json schema
              - …
            - `audience` union: string value that can be support nottable, optional or a json schema
              - …
            - `algorithm` union: string value that can be support nottable, optional or a json schema
              - …
          - `not` boolean
          - `respondBeforeBody` boolean: If true, MockServer responds to a matching request before consuming its body and may close the connection. Required: the matcher must not specify a body matcher, and the action must be RESPONSE or ERROR.
        - OpenAPIDefinition: open api or swagger request matcher
          - `specUrlOrPayload` string
          - `operationId` string
          - `not` boolean
          - `contextPathPrefix` string
        - ConditionalRequestDefinition: conditional (if-then-else) request matcher: if the 'if' guard matches the request then the 'then' branch is required, otherwise the 'else' branch is required (when 'else' is omitted the expectation matches whenever the guard is false)
          - `not` boolean
          - `if` RequestDefinition, required (recursive)
          - `then` RequestDefinition (recursive)
          - `else` RequestDefinition (recursive)
    - `httpResponses` HttpResponse[]
      - `delay` Delay: response delay
        - `timeUnit` 'DAYS' | 'HOURS' | 'MINUTES' | 'SECONDS' | 'MILLISECONDS' | 'MICROSECONDS' | 'NANOSECONDS'
        - `value` integer
        - `template` string: opt-in template rendered against the request whose output is parsed as a millisecond delay (e.g. respond more slowly for larger payloads); falls back to value/timeUnit on a non-numeric or blank result
        - `templateType` 'VELOCITY' | 'MUSTACHE': template engine used to evaluate the delay template; only VELOCITY and MUSTACHE are supported
        - `distribution` object: distribution for variable delays: UNIFORM requires min and max, LOG_NORMAL requires median and p99, GAUSSIAN requires mean and stdDev
          - `type` 'UNIFORM' | 'LOG_NORMAL' | 'GAUSSIAN', required
          - `min` integer
          - `max` integer
          - `median` integer
          - `p99` integer
          - `mean` integer
          - `stdDev` integer
      - `body` union: response body
        - object: binary response body
          - `not` boolean
          - `type` 'BINARY'
          - `base64Bytes` string
          - `contentType` string
          - `optional` boolean
        - object: json response body
          - `not` boolean
          - `type` 'JSON'
          - `json` string
          - `contentType` string
          - `optional` boolean
        - object: json response body
        - object: string response body
          - `not` boolean
          - `type` 'STRING'
          - `string` string
          - `contentType` string
          - `optional` boolean
        - string: string response body
        - object: xml response body
          - `not` boolean
          - `type` 'XML'
          - `xml` string
          - `contentType` string
          - `optional` boolean
        - object: file response body — served from a file, optionally rendered as a template against the request
          - `not` boolean
          - `type` 'FILE'
          - `filePath` string
          - `templateType` 'VELOCITY' | 'MUSTACHE'
          - `contentType` string
          - `optional` boolean
      - `cookies` union
        - object[]
          - `name` string
          - `value` string
        - object
      - `connectionOptions` ConnectionOptions: connection options
        - `suppressContentLengthHeader` boolean
        - `contentLengthHeaderOverride` integer
        - `suppressConnectionHeader` boolean
        - `chunkSize` integer
        - `keepAliveOverride` boolean
        - `closeSocket` boolean
        - `closeSocketDelay` Delay: response delay
          - `timeUnit` 'DAYS' | 'HOURS' | 'MINUTES' | 'SECONDS' | 'MILLISECONDS' | 'MICROSECONDS' | 'NANOSECONDS'
          - `value` integer
          - `template` string: opt-in template rendered against the request whose output is parsed as a millisecond delay (e.g. respond more slowly for larger payloads); falls back to value/timeUnit on a non-numeric or blank result
          - `templateType` 'VELOCITY' | 'MUSTACHE': template engine used to evaluate the delay template; only VELOCITY and MUSTACHE are supported
          - `distribution` object: distribution for variable delays: UNIFORM requires min and max, LOG_NORMAL requires median and p99, GAUSSIAN requires mean and stdDev
            - `type` 'UNIFORM' | 'LOG_NORMAL' | 'GAUSSIAN', required
            - `min` integer
            - `max` integer
            - `median` integer
            - `p99` integer
            - `mean` integer
            - `stdDev` integer
      - `headers` union
        - object[]
          - `name` string
          - `values` string[]
        - object
          - `keyMatchStyle` 'MATCHING_KEY' | 'SUB_SET'
      - `trailers` union
        - object[]
          - `name` string
          - `values` string[]
        - object
          - `keyMatchStyle` 'MATCHING_KEY' | 'SUB_SET'
      - `statusCode` integer
      - `reasonPhrase` string
      - `recoverAfter` RecoverAfter: fail the first failTimes matches then serve the configured response (deterministic retry/backoff recovery primitive)
        - `failTimes` integer: number of leading matches that serve the failure response before the configured response is served; null or <= 0 makes this inert
        - `failResponse` HttpResponse (recursive)
        - `idempotencyHeader` string: optional request header whose value keys an independent failure window per (expectation, header-value); when absent on a request the per-expectation match count is used
      - `statusCodeRange` string
    - `maximumNumberOfRequestToReturnInVerificationFailure` integer
    - `timeout` integer: optional server-side eventual-verification timeout in milliseconds; when set and the sequence does not pass on the first evaluation the server waits (asynchronously) and re-evaluates until it passes or the timeout elapses (capped at 60000ms); null/absent/0 means single-shot
  - object
    - `expectationIds` ExpectationId[]
      - `id` string, required
    - `httpRequests` RequestDefinition[], required
      - union: request definition
        - HttpRequest: request properties matcher
          - `secure` boolean
          - `keepAlive` boolean
          - `method` union: string value that can be support nottable, optional or a json schema
            - string
            - object
              - …
          - `path` union: string value that can be support nottable, optional or a json schema
            - string
            - object
              - …
          - `pathParameters` union
            - object[]
              - …
            - object
              - …
          - `queryStringParameters` union
            - object[]
              - …
            - object
              - …
          - `body` union: request body matcher
            - object: binary body matcher
              - …
            - object: json body matcher
              - …
            - object: json matching fields body matcher
            - object: json schema body matcher
              - …
            - object: JSON path body matcher
              - …
            - object: parameter body matcher
              - …
            - object: regex body matcher
              - …
            - object: string body matcher
              - …
            - string: substring body matcher
            - object: xml body matcher
              - …
            - object: xml schema body matcher
              - …
            - object: xpath body matcher
              - …
            - object: all-of body matcher — matches only when every one of its component body matchers matches the same request body
              - …
            - object: binary body matcher
              - …
            - object: json body matcher
              - …
            - object: json schema body matcher
              - …
            - object: JSON path body matcher
              - …
            - object: parameter body matcher
              - …
            - object: multipart form-data body matcher
              - …
            - object: regex body matcher
              - …
            - object: string body matcher
              - …
            - object: xml body matcher
              - …
            - object: xml schema body matcher
              - …
            - object: xpath body matcher
              - …
            - object: JSON-RPC body matcher
              - …
            - object: GraphQL body matcher
              - …
          - `headers` union
            - object[]
              - …
            - object
              - …
          - `cookies` union
            - object[]
              - …
            - object
          - `socketAddress` SocketAddress: remote address to send request to, only used for request overrides
            - `host` string
            - `port` integer
            - `scheme` 'HTTP' | 'HTTPS'
          - `protocol` 'HTTP_1_1' | 'HTTP_2' | 'HTTP_3': protocol matcher
          - `jwt` Jwt: JSON Web Token (JWT) request matcher — decodes the token carried in a request header (no signature verification) and matches its claims
            - `header` string: name of the request header carrying the JWT (default 'authorization')
            - `scheme` string: authentication scheme prefix stripped from the header value before decoding (default 'Bearer')
            - `claims` object: claim-value criteria; each value may be an exact string, regex or '!'-negated form
            - `issuer` union: string value that can be support nottable, optional or a json schema
              - …
            - `audience` union: string value that can be support nottable, optional or a json schema
              - …
            - `algorithm` union: string value that can be support nottable, optional or a json schema
              - …
          - `not` boolean
          - `respondBeforeBody` boolean: If true, MockServer responds to a matching request before consuming its body and may close the connection. Required: the matcher must not specify a body matcher, and the action must be RESPONSE or ERROR.
        - OpenAPIDefinition: open api or swagger request matcher
          - `specUrlOrPayload` string
          - `operationId` string
          - `not` boolean
          - `contextPathPrefix` string
        - ConditionalRequestDefinition: conditional (if-then-else) request matcher: if the 'if' guard matches the request then the 'then' branch is required, otherwise the 'else' branch is required (when 'else' is omitted the expectation matches whenever the guard is false)
          - `not` boolean
          - `if` RequestDefinition, required (recursive)
          - `then` RequestDefinition (recursive)
          - `else` RequestDefinition (recursive)
    - `httpResponses` HttpResponse[]
      - `delay` Delay: response delay
        - `timeUnit` 'DAYS' | 'HOURS' | 'MINUTES' | 'SECONDS' | 'MILLISECONDS' | 'MICROSECONDS' | 'NANOSECONDS'
        - `value` integer
        - `template` string: opt-in template rendered against the request whose output is parsed as a millisecond delay (e.g. respond more slowly for larger payloads); falls back to value/timeUnit on a non-numeric or blank result
        - `templateType` 'VELOCITY' | 'MUSTACHE': template engine used to evaluate the delay template; only VELOCITY and MUSTACHE are supported
        - `distribution` object: distribution for variable delays: UNIFORM requires min and max, LOG_NORMAL requires median and p99, GAUSSIAN requires mean and stdDev
          - `type` 'UNIFORM' | 'LOG_NORMAL' | 'GAUSSIAN', required
          - `min` integer
          - `max` integer
          - `median` integer
          - `p99` integer
          - `mean` integer
          - `stdDev` integer
      - `body` union: response body
        - object: binary response body
          - `not` boolean
          - `type` 'BINARY'
          - `base64Bytes` string
          - `contentType` string
          - `optional` boolean
        - object: json response body
          - `not` boolean
          - `type` 'JSON'
          - `json` string
          - `contentType` string
          - `optional` boolean
        - object: json response body
        - object: string response body
          - `not` boolean
          - `type` 'STRING'
          - `string` string
          - `contentType` string
          - `optional` boolean
        - string: string response body
        - object: xml response body
          - `not` boolean
          - `type` 'XML'
          - `xml` string
          - `contentType` string
          - `optional` boolean
        - object: file response body — served from a file, optionally rendered as a template against the request
          - `not` boolean
          - `type` 'FILE'
          - `filePath` string
          - `templateType` 'VELOCITY' | 'MUSTACHE'
          - `contentType` string
          - `optional` boolean
      - `cookies` union
        - object[]
          - `name` string
          - `value` string
        - object
      - `connectionOptions` ConnectionOptions: connection options
        - `suppressContentLengthHeader` boolean
        - `contentLengthHeaderOverride` integer
        - `suppressConnectionHeader` boolean
        - `chunkSize` integer
        - `keepAliveOverride` boolean
        - `closeSocket` boolean
        - `closeSocketDelay` Delay: response delay
          - `timeUnit` 'DAYS' | 'HOURS' | 'MINUTES' | 'SECONDS' | 'MILLISECONDS' | 'MICROSECONDS' | 'NANOSECONDS'
          - `value` integer
          - `template` string: opt-in template rendered against the request whose output is parsed as a millisecond delay (e.g. respond more slowly for larger payloads); falls back to value/timeUnit on a non-numeric or blank result
          - `templateType` 'VELOCITY' | 'MUSTACHE': template engine used to evaluate the delay template; only VELOCITY and MUSTACHE are supported
          - `distribution` object: distribution for variable delays: UNIFORM requires min and max, LOG_NORMAL requires median and p99, GAUSSIAN requires mean and stdDev
            - `type` 'UNIFORM' | 'LOG_NORMAL' | 'GAUSSIAN', required
            - `min` integer
            - `max` integer
            - `median` integer
            - `p99` integer
            - `mean` integer
            - `stdDev` integer
      - `headers` union
        - object[]
          - `name` string
          - `values` string[]
        - object
          - `keyMatchStyle` 'MATCHING_KEY' | 'SUB_SET'
      - `trailers` union
        - object[]
          - `name` string
          - `values` string[]
        - object
          - `keyMatchStyle` 'MATCHING_KEY' | 'SUB_SET'
      - `statusCode` integer
      - `reasonPhrase` string
      - `recoverAfter` RecoverAfter: fail the first failTimes matches then serve the configured response (deterministic retry/backoff recovery primitive)
        - `failTimes` integer: number of leading matches that serve the failure response before the configured response is served; null or <= 0 makes this inert
        - `failResponse` HttpResponse (recursive)
        - `idempotencyHeader` string: optional request header whose value keys an independent failure window per (expectation, header-value); when absent on a request the per-expectation match count is used
      - `statusCodeRange` string
    - `maximumNumberOfRequestToReturnInVerificationFailure` integer
    - `timeout` integer: optional server-side eventual-verification timeout in milliseconds; when set and the sequence does not pass on the first evaluation the server waits (asynchronously) and re-evaluates until it passes or the timeout elapses (capped at 60000ms); null/absent/0 means single-shot

## Response `202`

request sequence has been received in specified order

## Other responses

- `400`: incorrect request format
- `406`: request sequence has not been received in specified order

---

[API](https://skmtc.dev/mock-server/apis/mockserver-api.md) · [All operations](https://skmtc.dev/mock-server/apis/mockserver-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mock-server/apis/mockserver-api/revisions/9239b693996e?raw)
