TMPAPI

Getting Started Annotations Placeholders API URL Request Response Service Spec

API URL

https://api.tmpapi.dev/interface[/data-name] is an API endpoint/base URL.

Available interfaces:

For example:

An API endpoint selects the element in a JSON structure and accepts a query for retrieval.

Data source

{
  "users": [
    "@key(id)", "@repeat(2)",
    {"id": "%index%", "name": "User %index%", "type": "admin"},
    {"id": "%index%", "name": "User %index%", "type": "stuff"}
  ]
}

Endpoint

https://api.tmpapi.dev/interface/data-name/users

Result

[
  {"id": 0, "name": "User 0", "type": "admin"},
  {"id": 1, "name": "User 1", "type": "stuff"},
  {"id": 2, "name": "User 2", "type": "admin"},
  {"id": 3, "name": "User 3", "type": "stuff"}
]

Endpoint

https://api.tmpapi.dev/interface/data-name/users/2

Result

{"id": 2, "name": "User 2", "type": "admin"}

Endpoint

https://api.tmpapi.dev/interface/data-name/users/2/type

Result

"admin"

Check how to query APIs, also response JSON format.