All URIs are relative to https://api.phrase.com/v2
| Method | HTTP request | Description |
|---|---|---|
| job_complete | POST /projects/{project_id}/jobs/{id}/complete | Complete a job |
| job_create | POST /projects/{project_id}/jobs | Create a job |
| job_delete | DELETE /projects/{project_id}/jobs/{id} | Delete a job |
| job_keys_create | POST /projects/{project_id}/jobs/{id}/keys | Add keys to job |
| job_keys_delete | DELETE /projects/{project_id}/jobs/{id}/keys | Remove keys from job |
| job_lock | POST /projects/{project_id}/jobs/{id}/lock | Lock a job |
| job_reopen | POST /projects/{project_id}/jobs/{id}/reopen | Reopen a job |
| job_show | GET /projects/{project_id}/jobs/{id} | Get a single job |
| job_start | POST /projects/{project_id}/jobs/{id}/start | Start a job |
| job_unlock | POST /projects/{project_id}/jobs/{id}/unlock | Unlock a job |
| job_update | PATCH /projects/{project_id}/jobs/{id} | Update a job |
| jobs_by_account | GET /accounts/{account_id}/jobs | List account jobs |
| jobs_list | GET /projects/{project_id}/jobs | List jobs |
JobDetails job_complete(project_id, id, job_complete_parameters, x_phrase_app_otp=x_phrase_app_otp)
Complete a job
Mark a job as completed.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
id = 'id_example' # str | ID (required)
job_complete_parameters = phrase_api.JobCompleteParameters() # JobCompleteParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Complete a job
api_response = api_instance.job_complete(project_id, id, job_complete_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobsApi->job_complete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| id | str | ID | |
| job_complete_parameters | JobCompleteParameters | ||
| 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]
JobDetails job_create(project_id, job_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
Create a job
Create a new job.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
job_create_parameters = phrase_api.JobCreateParameters() # JobCreateParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Create a job
api_response = api_instance.job_create(project_id, job_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobsApi->job_create: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| job_create_parameters | JobCreateParameters | ||
| 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]
job_delete(project_id, id, x_phrase_app_otp=x_phrase_app_otp, branch=branch)
Delete a job
Delete an existing job.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
id = 'id_example' # str | ID (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
branch = 'my-feature-branch' # str | specify the branch to use
try:
# Delete a job
api_instance.job_delete(project_id, id, x_phrase_app_otp=x_phrase_app_otp, branch=branch)
except ApiException as e:
print("Exception when calling JobsApi->job_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| id | str | ID | |
| x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
| branch | str | specify the branch to use | [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]
JobDetails job_keys_create(project_id, id, job_keys_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
Add keys to job
Add multiple keys to a existing job.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
id = 'id_example' # str | ID (required)
job_keys_create_parameters = phrase_api.JobKeysCreateParameters() # JobKeysCreateParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Add keys to job
api_response = api_instance.job_keys_create(project_id, id, job_keys_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobsApi->job_keys_create: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| id | str | ID | |
| job_keys_create_parameters | JobKeysCreateParameters | ||
| 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]
job_keys_delete(project_id, id, job_keys_delete_parameters, x_phrase_app_otp=x_phrase_app_otp)
Remove keys from job
Remove multiple keys from existing job.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
id = 'id_example' # str | ID (required)
job_keys_delete_parameters = phrase_api.JobKeysDeleteParameters() # JobKeysDeleteParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Remove keys from job
api_instance.job_keys_delete(project_id, id, job_keys_delete_parameters, x_phrase_app_otp=x_phrase_app_otp)
except ApiException as e:
print("Exception when calling JobsApi->job_keys_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| id | str | ID | |
| job_keys_delete_parameters | JobKeysDeleteParameters | ||
| 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 |
|---|---|---|
| 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]
job_lock(project_id, id, x_phrase_app_otp=x_phrase_app_otp, branch=branch)
Lock a job
If you are the job owner, you may lock a job using this API request.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
id = 'id_example' # str | ID (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
branch = 'my-feature-branch' # str | specify the branch to use
try:
# Lock a job
api_instance.job_lock(project_id, id, x_phrase_app_otp=x_phrase_app_otp, branch=branch)
except ApiException as e:
print("Exception when calling JobsApi->job_lock: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| id | str | ID | |
| x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
| branch | str | specify the branch to use | [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]
JobDetails job_reopen(project_id, id, job_reopen_parameters, x_phrase_app_otp=x_phrase_app_otp)
Reopen a job
Mark a job as uncompleted.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
id = 'id_example' # str | ID (required)
job_reopen_parameters = phrase_api.JobReopenParameters() # JobReopenParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Reopen a job
api_response = api_instance.job_reopen(project_id, id, job_reopen_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobsApi->job_reopen: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| id | str | ID | |
| job_reopen_parameters | JobReopenParameters | ||
| 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]
JobDetails job_show(project_id, id, x_phrase_app_otp=x_phrase_app_otp, branch=branch, include_annotations=include_annotations, omit_translation_keys=omit_translation_keys)
Get a single job
Get details on a single job for a given project.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
id = 'id_example' # str | ID (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
branch = 'my-feature-branch' # str | Branch to use
include_annotations = False # bool | Include job-locale annotations in the response (default to False)
omit_translation_keys = False # bool | Omit translation keys in the response to reduce payload size for bigger jobs (default to False)
try:
# Get a single job
api_response = api_instance.job_show(project_id, id, x_phrase_app_otp=x_phrase_app_otp, branch=branch, include_annotations=include_annotations, omit_translation_keys=omit_translation_keys)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobsApi->job_show: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| id | str | ID | |
| x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
| branch | str | Branch to use | [optional] |
| include_annotations | bool | Include job-locale annotations in the response | [optional] [default to False] |
| omit_translation_keys | bool | Omit translation keys in the response to reduce payload size for bigger jobs | [optional] [default to False] |
- 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]
JobDetails job_start(project_id, id, job_start_parameters, x_phrase_app_otp=x_phrase_app_otp)
Start a job
Starts an existing job in state draft.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
id = 'id_example' # str | ID (required)
job_start_parameters = phrase_api.JobStartParameters() # JobStartParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Start a job
api_response = api_instance.job_start(project_id, id, job_start_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobsApi->job_start: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| id | str | ID | |
| job_start_parameters | JobStartParameters | ||
| 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]
job_unlock(project_id, id, x_phrase_app_otp=x_phrase_app_otp, branch=branch)
Unlock a job
If you are the job owner, you may unlock a locked job using this API request.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
id = 'id_example' # str | ID (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
branch = 'my-feature-branch' # str | specify the branch to use
try:
# Unlock a job
api_instance.job_unlock(project_id, id, x_phrase_app_otp=x_phrase_app_otp, branch=branch)
except ApiException as e:
print("Exception when calling JobsApi->job_unlock: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| id | str | ID | |
| x_phrase_app_otp | str | Two-Factor-Authentication token (optional) | [optional] |
| branch | str | specify the branch to use | [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]
JobDetails job_update(project_id, id, job_update_parameters, x_phrase_app_otp=x_phrase_app_otp)
Update a job
Update an existing job.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project ID (required)
id = 'id_example' # str | ID (required)
job_update_parameters = phrase_api.JobUpdateParameters() # JobUpdateParameters | (required)
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
try:
# Update a job
api_response = api_instance.job_update(project_id, id, job_update_parameters, x_phrase_app_otp=x_phrase_app_otp)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobsApi->job_update: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project ID | |
| id | str | ID | |
| job_update_parameters | JobUpdateParameters | ||
| 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[Job] jobs_by_account(account_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page, owned_by=owned_by, assigned_to=assigned_to, state=state, updated_since=updated_since)
List account jobs
List all jobs 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.JobsApi(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
owned_by = 'abcd1234cdef1234abcd1234cdef1234' # str | filter by user owning job
assigned_to = 'abcd1234cdef1234abcd1234cdef1234' # str | filter by user assigned to job
state = 'completed' # str | filter by state of job; valid states are: `draft`, `in_progress`, `completed`
updated_since = '2013-02-21T00:00:00.000Z' # str | filter by jobs updated since given date
try:
# List account jobs
api_response = api_instance.jobs_by_account(account_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page, owned_by=owned_by, assigned_to=assigned_to, state=state, updated_since=updated_since)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobsApi->jobs_by_account: %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] |
| owned_by | str | filter by user owning job | [optional] |
| assigned_to | str | filter by user assigned to job | [optional] |
| state | str | filter by state of job; valid states are: `draft`, `in_progress`, `completed` | [optional] |
| updated_since | str | filter by jobs updated since given date | [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]
List[Job] jobs_list(project_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page, branch=branch, owned_by=owned_by, assigned_to=assigned_to, state=state, updated_since=updated_since)
List jobs
List all jobs for the given project.
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.JobsApi(api_client)
project_id = 'project_id_example' # str | Project 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
branch = 'my-feature-branch' # str | Branch to use
owned_by = 'abcd1234cdef1234abcd1234cdef1234' # str | filter by user owning job
assigned_to = 'abcd1234cdef1234abcd1234cdef1234' # str | filter by user assigned to job
state = 'completed' # str | filter by state of job; valid states are: `draft`, `in_progress`, `completed`
updated_since = '2013-02-21T00:00:00.000Z' # str | filter by jobs updated since given date
try:
# List jobs
api_response = api_instance.jobs_list(project_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page, branch=branch, owned_by=owned_by, assigned_to=assigned_to, state=state, updated_since=updated_since)
pprint(api_response)
except ApiException as e:
print("Exception when calling JobsApi->jobs_list: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Project 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] |
| branch | str | Branch to use | [optional] |
| owned_by | str | filter by user owning job | [optional] |
| assigned_to | str | filter by user assigned to job | [optional] |
| state | str | filter by state of job; valid states are: `draft`, `in_progress`, `completed` | [optional] |
| updated_since | str | filter by jobs updated since given date | [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]