Reference

Guide

/api/languages

List languages

GET: /api/languages

Query parameters

Parameter Example Description
limit ?limit=5 Limits the number of returned languages.
offset ?offset=10 Sets a manual offset. Use the page option together with limit for easier pagination.
page ?page=2 Starts the collection at the given page. Only works when the limit is set.
pretty ?pretty=true Pretty prints the result. Only useful for debugging.
select ?select=name,locale Defines the fields that will be returned for each language.

Language fields

The following fields are available in the language model and can be fetched with the select parameter:

  • code
  • default
  • direction
  • locale
  • name
  • url

Example response

GET: /api/languages
{
    "code": 200,
    "data": [
        {
            "code": "de",
            "default": false,
            "name": "Deutsch"
        },
        {
            "code": "en",
            "default": true,
            "name": "English"
        }
    ],
    "pagination": {
        "page": 1,
        "total": 2,
        "offset": 0,
        "limit": 100
    },
    "status": "ok",
    "type": "collection"
}