Bitbucket Sync

GET /v2/bitbucket_syncs

List all Bitbucket repositories for which synchronisation with PhraseApp is activated.

Parameters

Name Type Description
account_id
optional
string Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.

Example Request

curl "https://api.phraseapp.com/api/v2/bitbucket_syncs?account_id=abcd1234" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp bitbucket_syncs list \
--account-id abcd1234

Response

Status: 200
[ { "id": "aad1ar91-0331-4181-b90p-4crdnv0bd812", "repository_name": "some-repository", "last_export_to_bitbucket_at": "2015-01-28T09:52:53Z", "last_import_from_bitbucket_at": "2015-01-28T09:52:53Z", "valid_phraseapp_yaml": true, "phraseapp_projects": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ] }, { "id": "aad1ar91-0331-4181-b90p-4crdnv0bd812", "repository_name": "some-repository", "last_export_to_bitbucket_at": "2015-01-28T09:52:53Z", "last_import_from_bitbucket_at": "2015-01-28T09:52:53Z", "valid_phraseapp_yaml": true, "phraseapp_projects": [ { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ] } ]

POST /v2/bitbucket_syncs/:id/export

Export translations from PhraseApp to Bitbucket according to the .phraseapp.yml file within the Bitbucket Repository.

Parameters

Name Type Description
account_id
optional
string Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.

Example Request

curl "https://api.phraseapp.com/api/v2/bitbucket_syncs/:id/export" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -d '{"account_id":"abcd1234"}' \
  -H 'Content-Type: application/json'
phraseapp bitbucket_sync export <id> \
--account-id abcd1234

Response

Status: 200
{ "status_path": "https://bitbucket.sync.phraseapp.com/export_to_bitbucket_status" }

POST /v2/bitbucket_syncs/:id/import

Import translations from Bitbucket to PhraseApp according to the .phraseapp.yml file within the Bitbucket repository.

Parameters

Name Type Description
account_id
optional
string Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.

Example Request

curl "https://api.phraseapp.com/api/v2/bitbucket_syncs/:id/import" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -d '{"account_id":"abcd1234"}' \
  -H 'Content-Type: application/json'
phraseapp bitbucket_sync import <id> \
--account-id abcd1234

Response

Status: 200