Skip to main content
GET
/
mock
/
{mockApiId}
Get mock API data
curl --request GET \
  --url https://mock.mocklyapi.com/mock/{mockApiId}
[
  {
    "id": 1,
    "username": "alice_admin",
    "email": "alice@example.com",
    "status": "active",
    "role": "admin",
    "age": 32,
    "createdAt": "2024-01-15",
    "profile": {
      "firstName": "Alice",
      "lastName": "Johnson",
      "address": {
        "city": "New York",
        "country": "USA",
        "zipCode": "10001"
      }
    }
  },
  {
    "id": 2,
    "username": "bob_user",
    "email": "bob@example.com",
    "status": "active",
    "role": "user",
    "age": 28,
    "createdAt": "2024-02-20",
    "profile": {
      "firstName": "Bob",
      "lastName": "Smith",
      "address": {
        "city": "London",
        "country": "UK",
        "zipCode": "SW1A 1AA"
      }
    }
  }
]

Headers

mocklyapiauthtoken
string

Authentication token required for private endpoints. Can also be provided via query parameter.

Path Parameters

mockApiId
string<uuid>
required

Unique identifier for the mock API

Query Parameters

auth_token
string

Authentication token required for private endpoints. Can also be provided via header.

filters
string

URL-encoded filter conditions to apply on the mock data. Supports operators: $eq, $eqi, $ne, $nei. Multiple conditions are combined with AND logic.

order_by
string

Field name to sort results by. Supports nested paths using dot notation (e.g., 'profile.firstName').

order_direction
enum<string>
default:asc

Sort direction for the order_by field

Available options:
asc,
desc
limit
number

Maximum number of results to return. Must be 0 or greater.

Required range: x >= 0

Response

Successful response with mock data