CMS Tool API schema
Public API version 1.4.60.
Languages
Every language the system knows, with whether it is the website's primary language (the language its content is written in) and whether it is enabled as an alternative language the website is translated into.
Endpoint URL
https://api.cms-tool.net/api/languages
/api/languages
Read every language with whether it is the website's primary language or an enabled alternative language, and change them.
GET
List the languages, or retrieve one by appending its code to the path. Needs the languages:read scope.
Query parameters
| Name | Type | Example | Notes |
|---|---|---|---|
language | text | fr | Language code, as the languages endpoint lists them, for example fr. |
enabled | boolean | true | Filter results by whether the language is one of the website's alternative languages. Accepts true or 1. |
primary | boolean | true | Filter results to the website's primary language. Accepts true or 1. |
keywords | text | example | Filter results by keywords. |
offset | int | 123 | Skip this many matching records before returning results. |
pageSize | int | 123 | Limit the number of records returned; accepted values are 1 through 999, with 200 used otherwise. |
POST
Make a language the primary language (primary true), or add or remove it as an alternative language (enabled true or false). Removing a language keeps its translations. Needs the languages:write scope and the configuration permission.
Request content type: application/json
Request body fields
| Name | Type | Example | Notes |
|---|---|---|---|
language | text | fr | Language code, as the languages endpoint lists them, for example fr. Required for a translation, and it must be one of the website's alternative languages. |
primary | boolean | true | True makes this the primary language: the language the website's content is written in. Accepts true or 1. |
enabled | boolean | true | True adds the language as an alternative language the website is translated into; false removes it and keeps its translations. Accepts true or 1. |
Data definitions
| Field | Type | Description | Format | Example |
|---|---|---|---|---|
language | text | Language code, for example en or fr. | ||
id | text | The language code. The same as language. | ||
enabled | bool | True when the language is an alternative language the website is translated into. Visitors can choose it, and translations are kept for it. | ||
languagename | text | Name of the language in English. | ||
primary | bool | True for the website's primary language: the language its content is written in. A website has one. |
Usage instructions and examples
Sample object
{"id": "fr", "language": "fr", "languagename": "French", "primary": false, "enabled": true}Machine-readable documentation
This documentation is also available as JSON or Markdown at the same URL. Request JSON with Accept: application/json or Markdown with Accept: text/markdown.