List users

GET {{url}}/users/001-234-345-456

List users

These requests are meant to mock how call to list a single or multiple users would behave.

Please review the example matching features that are being leveraged.

Commonly used example matching techniques are done by:

  • Filter by HTTP method
  • Filter by headers
    • x-mock-response-code
      • The API call's response code, e.g. 200 OK, 201 Created, etc.
    • x-mock-response-id
      • The UID of the example
    • x-mock-response-name
      • The name of the example
  • Filter by URL
  • Filter by parameter keys and values

Custom Header and Request body matching

Another optional way to filter examples responses is using customer Header and Request body matching. These settings can be optionally configured under your [Mock Server's configuration page]

HEADERS

KeyDatatypeRequiredDescription
x-mock-response-namestring
x-mock-response-namestring
x-mock-response-namestring
x-mock-response-namestring
x-mock-response-codestring
x-mock-response-codestring
x-mock-response-codestring
x-mock-response-codestring
x-mock-response-idstringList all users (success). Note that this id will be different if you have forked the original collection.
x-mock-response-idstringList all users (unauthorized). Note that this id will be different if you have forked the original collection.
x-mock-response-idstringList all users (forbidden). Note that this id will be different if you have forked the original collection.
x-mock-response-idstringList all users (server error). Note that this id will be different if you have forked the original collection.

RESPONSES

status: OK

{"users":[{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"},{"firstName":"{{$randomFirstName}}","lastName":"{{$randomLastName}}","userId":"{{$randomInt}}","userActive":"{{$randomBoolean}}"}]}