API: Translation
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:
Parameter | Type | IN | Example | Description |
---|---|---|---|---|
domain | array | QUERY | domain[]=admin&domain[]=policy | Filtering by translation domain (first part in keyword) = value, by default all domains are returned |
language | array | QUERY | language[]=admin&language[]=policy | Filtering by translation language (last part in keyword) = value, by default all languages are returned |
key | array | QUERY | 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.
Parameter | Type | Description |
---|---|---|
count | int | Number of all results marching criteria |
status | int | Response status (same as in http code) |
Data: object.data[array]
Parameter | Out Type | In Type | Default In | Description |
---|---|---|---|---|
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
- /wiki/spaces/BROK/pages/693181 #Authentication defaults