API: Translation

Translation list

JWT Authorisation

POST /api/v3/translation

We use POST as GET limitations could create issues with bigger sets of filters.

Request parameter:

No Request parameter

API: _ Default behavior #List defaults

Filtering parameters:

ParameterTypeINExampleDescription
domainarrayQUERYdomain[]=admin&domain[]=policyFiltering by translation domain (first part in keyword) = value, by default all domains are returned
languagearrayQUERYlanguage[]=admin&language[]=policyFiltering by translation language (last part in keyword) = value, by default all languages are returned
keyarrayQUERY

key[]=writer.template.text&key[]...

or

key[writer.template.text]=template&...

Filtering by translation key = value (with no language part), by default all keys are returned

When seting key as translation key value of this key will be used as a new key in example key writer.writertemplate.text will be replaced by template eg: template.de, template.en ..

Response data:

Metadata: object.

ParameterTypeDescription
countintNumber of all results marching criteria 
statusintResponse status (same as in http code)

Data:  object.data[array]

ParameterOut TypeIn TypeDefault InDescription
Return key:translation pairs.

/wiki/spaces/BROK/pages/693181 #Authentication defaults 

Request
curl -X POST https://public.brokerstar.biz/api/v3/translation --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'


Response (Success)
200 OK    {
    "status": 200,
    "count": 28264,
    "data": {
        "admin.activity.title.index.de": "Aktivitäten",
        "admin.activity.title.index.en": "Activities",
        "admin.activity.title.index.fr": "Activités",
        "admin.activity.title.index.it": "Attività",
        "admin.admin.action.api_users.de": "Schnittstellen Benutzer verwalten",
        "admin.admin.action.api_users.en": "Manage API accounts",
		[.....]
	 }
     "status": 200
}
Request
curl -X POST https://public.brokerstar.biz/api/v3/translation 
--form 'language[]="de"' \
--form 'language[]="en"' \
--form 'key[]="Admin.activity.title.index"' \
--form 'key[Admin.admin.cache]="cache"'
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Response (Success)
200 OK    
{
    "status": 200,
    "count": 4,
    "data": {
        "Admin.activity.title.index.de": "Aktivitäten",
        "Admin.activity.title.index.en": "Activities",
        "cache.de": "Cache",
        "cache.en": "Cache"
    }
}

Or one of