Rules for blacklisting keys

GET /v2/projects/:project_id/blacklisted_keys

List all rules for blacklisting keys for the given project.

This endpoint is paginated.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/blacklisted_keys" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp blacklisted_keys list <project_id>

Response

Status: 200
[ { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "date.formats.*", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "date.formats.*", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ]

GET /v2/projects/:project_id/blacklisted_keys/:id

Get details on a single rule for blacklisting keys for a given project.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/blacklisted_keys/:id" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp blacklisted_key show <project_id> <id>

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1234", "name": "date.formats.*", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

POST /v2/projects/:project_id/blacklisted_keys

Create a new rule for blacklisting keys.

Parameters

Name Type Description
name string Blacklisted key name

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/blacklisted_keys" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -d '{"name":"date.formats.*"}' \
  -H 'Content-Type: application/json'
phraseapp blacklisted_key create <project_id> \
--name 'date.formats.*'

Response

Status: 201
{ "id": "abcd1234cdef1234abcd1234cdef1234", "name": "date.formats.*", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

PATCH /v2/projects/:project_id/blacklisted_keys/:id

Update an existing rule for blacklisting keys.

Parameters

Name Type Description
name string Blacklisted key name

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/blacklisted_keys/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X PATCH \
  -d '{"name":"date.formats.*"}' \
  -H 'Content-Type: application/json'
phraseapp blacklisted_key update <project_id> <id> \
--name 'date.formats.*'

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1234", "name": "date.formats.*", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

DELETE /v2/projects/:project_id/blacklisted_keys/:id

Delete an existing rule for blacklisting keys.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/blacklisted_keys/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X DELETE
phraseapp blacklisted_key delete <project_id> <id>

Response

Status: 204