All URIs are relative to https://api.phrase.com/v2
| Method | HTTP request | Description |
|---|---|---|
| space_create | POST /accounts/{account_id}/spaces | Create a Space |
| space_delete | DELETE /accounts/{account_id}/spaces/{id} | Delete Space |
| space_show | GET /accounts/{account_id}/spaces/{id} | Get Space |
| space_update | PATCH /accounts/{account_id}/spaces/{id} | Update Space |
| spaces_list | GET /accounts/{account_id}/spaces | List Spaces |
| spaces_projects_create | POST /accounts/{account_id}/spaces/{space_id}/projects | Add Project to Space |
| spaces_projects_delete | DELETE /accounts/{account_id}/spaces/{space_id}/projects/{id} | Remove Project from Space |
| spaces_projects_list | GET /accounts/{account_id}/spaces/{space_id}/projects | List Projects in Space |
Space space_create(account_id, space_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
Create a Space
Create a new Space.
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.SpacesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
space_create_parameters = phrase_api.SpaceCreateParameters() # SpaceCreateParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Create a Space
api_response = api_instance.space_create(account_id, space_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling SpacesApi->space_create: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | str | Account ID | |
| space_create_parameters | SpaceCreateParameters | ||
| 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. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 404 | Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 429 | Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. | * 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]
space_delete(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
Delete Space
Delete the specified Space.
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.SpacesApi(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 Space
api_instance.space_delete(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
except ApiException as e:
print("Exception when calling SpacesApi->space_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. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 404 | Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 429 | Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. | * 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]
Space space_show(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
Get Space
Show the specified Space.
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.SpacesApi(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 Space
api_response = api_instance.space_show(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling SpacesApi->space_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. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 404 | Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 429 | Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. | * 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]
Space space_update(account_id, id, space_update_parameters, x_phrase_app_otp=x_phrase_app_otp)
Update Space
Update the specified Space.
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.SpacesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
id = 'id_example' # str | ID (required)
space_update_parameters = phrase_api.SpaceUpdateParameters() # SpaceUpdateParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Update Space
api_response = api_instance.space_update(account_id, id, space_update_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling SpacesApi->space_update: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | str | Account ID | |
| id | str | ID | |
| space_update_parameters | SpaceUpdateParameters | ||
| 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. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 404 | Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 429 | Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. | * 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[Space] spaces_list(account_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page)
List Spaces
List all Spaces for the given account.
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.SpacesApi(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 Spaces
api_response = api_instance.spaces_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 SpacesApi->spaces_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. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 404 | Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 429 | Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. | * 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]
spaces_projects_create(account_id, space_id, spaces_projects_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
Add Project to Space
Adds an existing project to the space.
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.SpacesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
space_id = 'space_id_example' # str | Space ID (required)
spaces_projects_create_parameters = phrase_api.SpacesProjectsCreateParameters() # SpacesProjectsCreateParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Add Project to Space
api_instance.spaces_projects_create(account_id, space_id, spaces_projects_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
except ApiException as e:
print("Exception when calling SpacesApi->spaces_projects_create: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | str | Account ID | |
| space_id | str | Space ID | |
| spaces_projects_create_parameters | SpacesProjectsCreateParameters | ||
| x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 201 | Created | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 400 | Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 404 | Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 429 | Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. | * 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]
spaces_projects_delete(account_id, space_id, id, x_phrase_app_otp=x_phrase_app_otp)
Remove Project from Space
Removes a specified project from the specified space.
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.SpacesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
space_id = 'space_id_example' # str | Space ID (required)
id = 'id_example' # str | ID (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Remove Project from Space
api_instance.spaces_projects_delete(account_id, space_id, id, x_phrase_app_otp=x_phrase_app_otp)
except ApiException as e:
print("Exception when calling SpacesApi->spaces_projects_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | str | Account ID | |
| space_id | str | Space 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. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 404 | Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 429 | Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. | * 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[Project] spaces_projects_list(account_id, space_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page)
List Projects in Space
List all projects for the specified Space.
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.SpacesApi(api_client)
account_id = 'account_id_example' # str | Account ID (required)
space_id = 'space_id_example' # str | Space 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 Projects in Space
api_response = api_instance.spaces_projects_list(account_id, space_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 SpacesApi->spaces_projects_list: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | str | Account ID | |
| space_id | str | Space 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. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 404 | Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. | * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 429 | Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. | * 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]