All URIs are relative to https://api.phrase.com/v2
| Method | HTTP request | Description |
|---|---|---|
| glossaries_list | GET /accounts/{account_id}/glossaries | List term bases |
| glossary_create | POST /accounts/{account_id}/glossaries | Create a term base |
| glossary_delete | DELETE /accounts/{account_id}/glossaries/{id} | Delete a term base |
| glossary_show | GET /accounts/{account_id}/glossaries/{id} | Get a single term base |
| glossary_update | PATCH /accounts/{account_id}/glossaries/{id} | Update a term base |
List[Glossary] glossaries_list(account_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page)
List term bases
List all term bases (previously: glossaries) the current user has access to.
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.GlossariesApi(api_client)
account_id = 'account_id_example' # str | Account 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 term bases
api_response = api_instance.glossaries_list(account_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 GlossariesApi->glossaries_list: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | str | Account 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]
Glossary glossary_create(account_id, glossary_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
Create a term base
Create a new term base (previously: glossary).
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.GlossariesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
glossary_create_parameters = phrase_api.GlossaryCreateParameters() # GlossaryCreateParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Create a term base
api_response = api_instance.glossary_create(account_id, glossary_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling GlossariesApi->glossary_create: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | str | Account ID | |
| glossary_create_parameters | GlossaryCreateParameters | ||
| 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]
glossary_delete(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
Delete a term base
Delete an existing term base (previously: glossary).
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.GlossariesApi(api_client)
account_id = 'account_id_example' # str | Account 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 term base
api_instance.glossary_delete(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
except ApiException as e:
print("Exception when calling GlossariesApi->glossary_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | str | Account 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]
Glossary glossary_show(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
Get a single term base
Get details on a single term base (previously: glossary).
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.GlossariesApi(api_client)
account_id = 'account_id_example' # str | Account 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 term base
api_response = api_instance.glossary_show(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling GlossariesApi->glossary_show: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | str | Account 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]
Glossary glossary_update(account_id, id, glossary_update_parameters, x_phrase_app_otp=x_phrase_app_otp)
Update a term base
Update an existing term base (previously: glossary).
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.GlossariesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
id = 'id_example' # str | ID (required)
glossary_update_parameters = phrase_api.GlossaryUpdateParameters() # GlossaryUpdateParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Update a term base
api_response = api_instance.glossary_update(account_id, id, glossary_update_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling GlossariesApi->glossary_update: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | str | Account ID | |
| id | str | ID | |
| glossary_update_parameters | GlossaryUpdateParameters | ||
| 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]