All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
release_create | POST /accounts/{account_id}/distributions/{distribution_id}/releases | Create a release |
release_delete | DELETE /accounts/{account_id}/distributions/{distribution_id}/releases/{id} | Delete a release |
release_publish | POST /accounts/{account_id}/distributions/{distribution_id}/releases/{id}/publish | Publish a release |
release_show | GET /accounts/{account_id}/distributions/{distribution_id}/releases/{id} | Get a single release |
release_update | PATCH /accounts/{account_id}/distributions/{distribution_id}/releases/{id} | Update a release |
releases_list | GET /accounts/{account_id}/distributions/{distribution_id}/releases | List releases |
Release release_create(account_id, distribution_id, release_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
Create a release
Create a new release.
from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint
configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'
# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = phrase_api.ReleasesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
distribution_id = 'distribution_id_example' # str | Distribution ID (required)
release_create_parameters = phrase_api.ReleaseCreateParameters() # ReleaseCreateParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Create a release
api_response = api_instance.release_create(account_id, distribution_id, release_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReleasesApi->release_create: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | str | Account ID | |
distribution_id | str | Distribution ID | |
release_create_parameters | ReleaseCreateParameters | ||
x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
400 | Bad request | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
404 | Not Found | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
429 | Rate Limiting | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
release_delete(account_id, distribution_id, id, x_phrase_app_otp=x_phrase_app_otp)
Delete a release
Delete an existing release.
from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint
configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'
# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = phrase_api.ReleasesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
distribution_id = 'distribution_id_example' # str | Distribution ID (required)
id = 'id_example' # str | ID (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Delete a release
api_instance.release_delete(account_id, distribution_id, id, x_phrase_app_otp=x_phrase_app_otp)
except ApiException as e:
print("Exception when calling ReleasesApi->release_delete: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | str | Account ID | |
distribution_id | str | Distribution ID | |
id | str | ID | |
x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | The resource was deleted successfully. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
400 | Bad request | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
404 | Not Found | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
429 | Rate Limiting | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Release release_publish(account_id, distribution_id, id, x_phrase_app_otp=x_phrase_app_otp)
Publish a release
Publish a release for production.
from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint
configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'
# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = phrase_api.ReleasesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
distribution_id = 'distribution_id_example' # str | Distribution ID (required)
id = 'id_example' # str | ID (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Publish a release
api_response = api_instance.release_publish(account_id, distribution_id, id, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReleasesApi->release_publish: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | str | Account ID | |
distribution_id | str | Distribution ID | |
id | str | ID | |
x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
400 | Bad request | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
404 | Not Found | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
429 | Rate Limiting | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Release release_show(account_id, distribution_id, id, x_phrase_app_otp=x_phrase_app_otp)
Get a single release
Get details on a single release.
from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint
configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'
# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = phrase_api.ReleasesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
distribution_id = 'distribution_id_example' # str | Distribution ID (required)
id = 'id_example' # str | ID (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Get a single release
api_response = api_instance.release_show(account_id, distribution_id, id, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReleasesApi->release_show: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | str | Account ID | |
distribution_id | str | Distribution ID | |
id | str | ID | |
x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
400 | Bad request | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
404 | Not Found | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
429 | Rate Limiting | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Release release_update(account_id, distribution_id, id, release_update_parameters, x_phrase_app_otp=x_phrase_app_otp)
Update a release
Update an existing release.
from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint
configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'
# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = phrase_api.ReleasesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
distribution_id = 'distribution_id_example' # str | Distribution ID (required)
id = 'id_example' # str | ID (required)
release_update_parameters = phrase_api.ReleaseUpdateParameters() # ReleaseUpdateParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Update a release
api_response = api_instance.release_update(account_id, distribution_id, id, release_update_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReleasesApi->release_update: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | str | Account ID | |
distribution_id | str | Distribution ID | |
id | str | ID | |
release_update_parameters | ReleaseUpdateParameters | ||
x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
400 | Bad request | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
404 | Not Found | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
429 | Rate Limiting | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[ReleasePreview] releases_list(account_id, distribution_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page)
List releases
List all releases for the given distribution.
from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint
configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'
# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = phrase_api.ReleasesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
distribution_id = 'distribution_id_example' # str | Distribution ID (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
page = 1 # int | Page number
per_page = 25 # int | Limit on the number of objects to be returned, between 1 and 100. 25 by default
try:
# List releases
api_response = api_instance.releases_list(account_id, distribution_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReleasesApi->releases_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | str | Account ID | |
distribution_id | str | Distribution ID | |
x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
page | int | Page number | [optional] |
per_page | int | Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - * Link - * Pagination - |
400 | Bad request | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
404 | Not Found | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
429 | Rate Limiting | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]