All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
release_triggers_create | POST /accounts/{account_id}/distributions/{distribution_id}/release_triggers | Create a release trigger |
release_triggers_destroy | DELETE /accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id} | Delete a single release trigger |
release_triggers_list | GET /accounts/{account_id}/distributions/{distribution_id}/release_triggers | List release triggers |
release_triggers_show | GET /accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id} | Get a single release trigger |
release_triggers_update | PATCH /accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id} | Update a release trigger |
ReleaseTrigger release_triggers_create(account_id, distribution_id, release_create_parameters1, x_phrase_app_otp=x_phrase_app_otp)
Create a release trigger
Create a new recurring release. New releases will be published automatically, based on the cron schedule provided. Currently, only one release trigger can exist per 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.ReleaseTriggersApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
distribution_id = 'distribution_id_example' # str | Distribution ID (required)
release_create_parameters1 = phrase_api.ReleaseCreateParameters1() # ReleaseCreateParameters1 | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Create a release trigger
api_response = api_instance.release_triggers_create(account_id, distribution_id, release_create_parameters1, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReleaseTriggersApi->release_triggers_create: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | str | Account ID | |
distribution_id | str | Distribution ID | |
release_create_parameters1 | ReleaseCreateParameters1 | ||
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_triggers_destroy(account_id, distribution_id, id, x_phrase_app_otp=x_phrase_app_otp)
Delete a single release trigger
Delete a single release trigger.
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.ReleaseTriggersApi(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 single release trigger
api_instance.release_triggers_destroy(account_id, distribution_id, id, x_phrase_app_otp=x_phrase_app_otp)
except ApiException as e:
print("Exception when calling ReleaseTriggersApi->release_triggers_destroy: %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]
List[ReleaseTrigger] release_triggers_list(account_id, distribution_id, x_phrase_app_otp=x_phrase_app_otp)
List release triggers
List all release triggers for the given distribution.
Note: Currently only one release trigger can exist per 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.ReleaseTriggersApi(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)
try:
# List release triggers
api_response = api_instance.release_triggers_list(account_id, distribution_id, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReleaseTriggersApi->release_triggers_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] |
- 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]
ReleaseTrigger release_triggers_show(account_id, distribution_id, id, x_phrase_app_otp=x_phrase_app_otp)
Get a single release trigger
Get details of a single release trigger.
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.ReleaseTriggersApi(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 trigger
api_response = api_instance.release_triggers_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 ReleaseTriggersApi->release_triggers_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]
ReleaseTrigger release_triggers_update(account_id, distribution_id, id, release_update_parameters1, x_phrase_app_otp=x_phrase_app_otp)
Update a release trigger
Update a recurring 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.ReleaseTriggersApi(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_parameters1 = phrase_api.ReleaseUpdateParameters1() # ReleaseUpdateParameters1 | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Update a release trigger
api_response = api_instance.release_triggers_update(account_id, distribution_id, id, release_update_parameters1, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReleaseTriggersApi->release_triggers_update: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | str | Account ID | |
distribution_id | str | Distribution ID | |
id | str | ID | |
release_update_parameters1 | ReleaseUpdateParameters1 | ||
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]