List Translations

List all Translations that exist in Directus.

Query Parameters

fields
array

Control what fields are being returned in the object.

limit
integer

A limit on the number of objects that are returned.

offset
integer

How many items to skip when fetching data.

meta
string

What metadata to return in the response.

sort
array

How to sort the returned items. sort is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (-) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ? to sort randomly.

filter

Select items in collection by given conditions.

search
string

Filter by items that contain the given search query in one of their fields.

page
integer

Cursor for use in pagination. Often used in combination with limit.

Response

Successful request

data
array
meta
object
GET /translations
Response Example
{
  "data": [
    {
      "id": "sc4346aa4-81a8-4885-b3a8-f647e4f6f769",
      "key": "Test",
      "language": "en-US",
      "string": "Test"
    }
  ],
  "meta": {}
}

Create Multiple Translations

Create multiple new translations.

Query Parameters

fields
array

Control what fields are being returned in the object.

limit
integer

A limit on the number of objects that are returned.

meta
string

What metadata to return in the response.

offset
integer

How many items to skip when fetching data.

sort
array

How to sort the returned items. sort is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (-) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ? to sort randomly.

filter

Select items in collection by given conditions.

search
string

Filter by items that contain the given search query in one of their fields.

Request Body

data
array

Response

Successful request

data
array
meta
object
POST /translations
Response Example
{
  "data": [
    {
      "id": "sc4346aa4-81a8-4885-b3a8-f647e4f6f769",
      "key": "Test",
      "language": "en-US",
      "string": "Test"
    }
  ],
  "meta": {}
}

Delete Multiple Translations

Delete multiple existing translations.

Request Body

An array of translation primary keys.

[array]
array
DELETE /translations

Update Multiple Translations

Update multiple Translations at the same time.

Query Parameters

fields
array

Control what fields are being returned in the object.

limit
integer

A limit on the number of objects that are returned.

meta
string

What metadata to return in the response.

offset
integer

How many items to skip when fetching data.

sort
array

How to sort the returned items. sort is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (-) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ? to sort randomly.

filter

Select items in collection by given conditions.

search
string

Filter by items that contain the given search query in one of their fields.

Request Body

data
object
keys
array

Response

Successful request

data
array
meta
object
PATCH /translations
Response Example
{
  "data": [
    {
      "id": "sc4346aa4-81a8-4885-b3a8-f647e4f6f769",
      "key": "Test",
      "language": "en-US",
      "string": "Test"
    }
  ],
  "meta": {}
}

Create a Translation

Create a new translation.

Query Parameters

fields
array

Control what fields are being returned in the object.

meta
string

What metadata to return in the response.

Request Body

[object]
object

Response

Successful request

data
object
POST /translations‎
Response Example
{
  "data": {
    "id": "sc4346aa4-81a8-4885-b3a8-f647e4f6f769",
    "key": "Test",
    "language": "en-US",
    "string": "Test"
  }
}

Retrieve a Translation

List an existing translation by primary key.

Query Parameters

id
string

Unique identifier of the Translation.

fields
array

Control what fields are being returned in the object.

meta
string

What metadata to return in the response.

Response

Successful request

data
object
GET /translations/{id}
Response Example
{
  "data": {
    "id": "sc4346aa4-81a8-4885-b3a8-f647e4f6f769",
    "key": "Test",
    "language": "en-US",
    "string": "Test"
  }
}

Delete a Translation

Delete an existing translation.

Query Parameters

id
string

Unique identifier of the Translation.

DELETE /translations/{id}

Update a Translation

Update an existing translation.

Query Parameters

id
string

Unique identifier of the Translation.

fields
array

Control what fields are being returned in the object.

meta
string

What metadata to return in the response.

Request Body

[object]
object

Response

Successful request

data
object
PATCH /translations/{id}
Response Example
{
  "data": {
    "id": "sc4346aa4-81a8-4885-b3a8-f647e4f6f769",
    "key": "Test",
    "language": "en-US",
    "string": "Test"
  }
}