TMPAPI

Getting Started Annotations Placeholders API URL Request Response Service Spec

Annotations

@key(fieldName)
Sets the primary field for an object inside the array, for URL routing.
@repeat(number)
Sets how many repeat the elements that the array contains.

Data source

[
  "@key(id)", "@repeat(5)",
  {"id": "%index%", "name": "Element %index%"}
]

Result

[
  {"id": 0, "name": "Element 0"},
  {"id": 1, "name": "Element 1"},
  {"id": 2, "name": "Element 2"},
  {"id": 3, "name": "Element 3"},
  {"id": 4, "name": "Element 4"}
]

%index% is one of the placeholders.

@key annotation in an array is used in URL routing. e.g. https://api.tmpapi.dev/rest/data-name/users/1.