Glossaries

Note: Glossary API is still in beta and might be subject to change. Glossaries are available in the Business plan and above.

GET /v2/accounts/:account_id/glossaries

List all glossaries the current user has access to.

This endpoint is paginated.

Example Request

curl "https://api.phraseapp.com/api/v2/accounts/:account_id/glossaries" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp glossaries list <account_id>

Response

Status: 200
[ { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My glossary", "projects": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ], "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My glossary", "projects": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ], "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ]

GET /v2/accounts/:account_id/glossaries/:id

Get details on a single glossary.

Example Request

curl "https://api.phraseapp.com/api/v2/accounts/:account_id/glossaries/:id" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp glossary show <account_id> <id>

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My glossary", "projects": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ], "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

POST /v2/accounts/:account_id/glossaries

Create a new glossary.

Parameters

Name Type Description
name string Name of the glossary
project_ids
optional
string List of project ids the glossary should be assigned to.

Example Request

curl "https://api.phraseapp.com/api/v2/accounts/:account_id/glossaries" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -d '{"name":"My glossary","project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235"}' \
  -H 'Content-Type: application/json'
phraseapp glossary create <account_id> \
--name "My glossary" \
--project-ids abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235

Response

Status: 201
{ "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My glossary", "projects": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ], "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

PATCH /v2/accounts/:account_id/glossaries/:id

Update an existing glossary.

Parameters

Name Type Description
name string Name of the glossary
project_ids
optional
string List of project ids the glossary should be assigned to.

Example Request

curl "https://api.phraseapp.com/api/v2/accounts/:account_id/glossaries/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X PATCH \
  -d '{"name":"My glossary","project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235"}' \
  -H 'Content-Type: application/json'
phraseapp glossary update <account_id> <id> \
--name "My glossary" \
--project-ids abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My glossary", "projects": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ], "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

DELETE /v2/accounts/:account_id/glossaries/:id

Delete an existing glossary.

Example Request

curl "https://api.phraseapp.com/api/v2/accounts/:account_id/glossaries/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X DELETE
phraseapp glossary delete <account_id> <id>

Response

Status: 204