JobLocales

Jobs are currently in private beta. Contact us to try it out. This API Endpoint may change in the future.

GET /v2/projects/:project_id/jobs/:job_id/locales

List all JobLocales for a given job.

This endpoint is paginated.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/jobs/:job_id/locales" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp job_locales list <project_id> <job_id>

Response

Status: 200
[ { "id": "626ea67628690c73ac86ac81eec2d185", "job": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Job 1", "state": "completed" }, "users": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" } ], "locale": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "English", "code": "en-GB" } }, { "id": "626ea67628690c73ac86ac81eec2d185", "job": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Job 1", "state": "completed" }, "users": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" } ], "locale": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "English", "code": "en-GB" } } ]

GET /v2/projects/:project_id/jobs/:job_id/locale/:id

Get a single JobLocale for a given job.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/jobs/:job_id/locale/:id" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp job_locale show <project_id> <job_id> <id>

Response

Status: 200
{ "id": "626ea67628690c73ac86ac81eec2d185", "job": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Job 1", "state": "completed" }, "users": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" } ], "locale": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "English", "code": "en-GB" } }

POST /v2/projects/:project_id/jobs/:job_id/locales

Create a new JobLocale.

Parameters

Name Type Description
locale_id string locale id
user_ids
optional
array of strings Array of ids assigned to the JobLocale

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/jobs/:job_id/locales" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -d '{"locale_id":"abcd1234cdef1234abcd1234cdef1234","user_ids":["abcd1234cdef1234abcd1234cdef1234"]}' \
  -H 'Content-Type: application/json'
phraseapp job_locales create <project_id> <job_id> \
--locale-id abcd1234cdef1234abcd1234cdef1234 \
--user-ids "abcd1234cdef1234abcd1234cdef1234"

Response

Status: 201
{ "id": "626ea67628690c73ac86ac81eec2d185", "job": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Job 1", "state": "completed" }, "users": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" } ], "locale": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "English", "code": "en-GB" } }

PATCH /v2/projects/:project_id/jobs/:job_id/locales/:id

Update an existing job.

Parameters

Name Type Description
locale_id string locale id
user_ids
optional
array of strings Array of ids assigned to the JobLocale

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/jobs/:job_id/locales/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X PATCH \
  -d '{"locale_id":"abcd1234cdef1234abcd1234cdef1234","user_ids":["abcd1234cdef1234abcd1234cdef1234"]}' \
  -H 'Content-Type: application/json'
phraseapp job_locale update <project_id> <job_id> <id> \
--locale-id abcd1234cdef1234abcd1234cdef1234 \
--user-ids "abcd1234cdef1234abcd1234cdef1234"

Response

Status: 200
{ "id": "626ea67628690c73ac86ac81eec2d185", "job": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Job 1", "state": "completed" }, "users": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" } ], "locale": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "English", "code": "en-GB" } }

DELETE /v2/projects/:project_id/jobs/:job_id/locale/:id

Delete an existing JobLocale.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/jobs/:job_id/locale/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X DELETE
phraseapp job_locale delete <project_id> <job_id> <id>

Response

Status: 204

POST /v2/projects/:project_id/jobs/:id/complete

Mark a JobLocale as completed.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/jobs/:id/complete" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST
phraseapp job_locale complete <project_id> <id>

Response

Status: 200
{ "id": "626ea67628690c73ac86ac81eec2d185", "job": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Job 1", "state": "completed" }, "users": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" } ], "locale": { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "English", "code": "en-GB" } }