All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
jobComplete | POST /projects/{project_id}/jobs/{id}/complete | Complete a job |
jobCreate | POST /projects/{project_id}/jobs | Create a job |
jobDelete | DELETE /projects/{project_id}/jobs/{id} | Delete a job |
jobKeysCreate | POST /projects/{project_id}/jobs/{id}/keys | Add keys to job |
jobKeysDelete | DELETE /projects/{project_id}/jobs/{id}/keys | Remove keys from job |
jobLock | POST /projects/{project_id}/jobs/{id}/lock | Lock a job |
jobReopen | POST /projects/{project_id}/jobs/{id}/reopen | Reopen a job |
jobShow | GET /projects/{project_id}/jobs/{id} | Get a single job |
jobStart | POST /projects/{project_id}/jobs/{id}/start | Start a job |
jobUnlock | POST /projects/{project_id}/jobs/{id}/unlock | Unlock a job |
jobUpdate | PATCH /projects/{project_id}/jobs/{id} | Update a job |
jobsByAccount | GET /accounts/{account_id}/jobs | List account jobs |
jobsList | GET /projects/{project_id}/jobs | List jobs |
\Phrase\Model\JobDetails jobComplete($project_id, $id, $job_complete_parameters, $x_phrase_app_otp)
Complete a job
Mark a job as completed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$job_complete_parameters = new \Phrase\Model\JobCompleteParameters(); // \Phrase\Model\JobCompleteParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->jobComplete($project_id, $id, $job_complete_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobComplete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
job_complete_parameters | \Phrase\Model\JobCompleteParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\JobDetails jobCreate($project_id, $job_create_parameters, $x_phrase_app_otp)
Create a job
Create a new job.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$job_create_parameters = new \Phrase\Model\JobCreateParameters(); // \Phrase\Model\JobCreateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->jobCreate($project_id, $job_create_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobCreate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
job_create_parameters | \Phrase\Model\JobCreateParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
jobDelete($project_id, $id, $x_phrase_app_otp, $branch)
Delete a job
Delete an existing job.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
try {
$apiInstance->jobDelete($project_id, $id, $x_phrase_app_otp, $branch);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
branch | string | specify the branch to use | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\JobDetails jobKeysCreate($project_id, $id, $job_keys_create_parameters, $x_phrase_app_otp)
Add keys to job
Add multiple keys to a existing job.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$job_keys_create_parameters = new \Phrase\Model\JobKeysCreateParameters(); // \Phrase\Model\JobKeysCreateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->jobKeysCreate($project_id, $id, $job_keys_create_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobKeysCreate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
job_keys_create_parameters | \Phrase\Model\JobKeysCreateParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
jobKeysDelete($project_id, $id, $x_phrase_app_otp, $branch, $translation_key_ids)
Remove keys from job
Remove multiple keys from existing job.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
$translation_key_ids = ["abcd1234cdef1234abcd1234cdef1234"]; // string[] | ids of keys that should be removed from the job
try {
$apiInstance->jobKeysDelete($project_id, $id, $x_phrase_app_otp, $branch, $translation_key_ids);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobKeysDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
branch | string | specify the branch to use | [optional] |
translation_key_ids | string[] | ids of keys that should be removed from the job | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
jobLock($project_id, $id, $x_phrase_app_otp, $branch)
Lock a job
If you are the job owner, you may lock a job using this API request.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
try {
$apiInstance->jobLock($project_id, $id, $x_phrase_app_otp, $branch);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobLock: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
branch | string | specify the branch to use | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\JobDetails jobReopen($project_id, $id, $job_reopen_parameters, $x_phrase_app_otp)
Reopen a job
Mark a job as uncompleted.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$job_reopen_parameters = new \Phrase\Model\JobReopenParameters(); // \Phrase\Model\JobReopenParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->jobReopen($project_id, $id, $job_reopen_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobReopen: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
job_reopen_parameters | \Phrase\Model\JobReopenParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\JobDetails jobShow($project_id, $id, $x_phrase_app_otp, $branch)
Get a single job
Get details on a single job for a given project.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
try {
$result = $apiInstance->jobShow($project_id, $id, $x_phrase_app_otp, $branch);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobShow: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
branch | string | specify the branch to use | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\JobDetails jobStart($project_id, $id, $job_start_parameters, $x_phrase_app_otp)
Start a job
Starts an existing job in state draft.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$job_start_parameters = new \Phrase\Model\JobStartParameters(); // \Phrase\Model\JobStartParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->jobStart($project_id, $id, $job_start_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobStart: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
job_start_parameters | \Phrase\Model\JobStartParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
jobUnlock($project_id, $id, $x_phrase_app_otp, $branch)
Unlock a job
If you are the job owner, you may unlock a locked job using this API request.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
try {
$apiInstance->jobUnlock($project_id, $id, $x_phrase_app_otp, $branch);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobUnlock: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
branch | string | specify the branch to use | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\JobDetails jobUpdate($project_id, $id, $job_update_parameters, $x_phrase_app_otp)
Update a job
Update an existing job.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$job_update_parameters = new \Phrase\Model\JobUpdateParameters(); // \Phrase\Model\JobUpdateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->jobUpdate($project_id, $id, $job_update_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobUpdate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
job_update_parameters | \Phrase\Model\JobUpdateParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\Job[] jobsByAccount($account_id, $x_phrase_app_otp, $page, $per_page, $owned_by, $assigned_to, $state)
List account jobs
List all jobs for the given account.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$account_id = 'account_id_example'; // string | Account ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | 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; // string | filter by user owning job
$assigned_to = abcd1234cdef1234abcd1234cdef1234; // string | filter by user assigned to job
$state = completed; // string | filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>
try {
$result = $apiInstance->jobsByAccount($account_id, $x_phrase_app_otp, $page, $per_page, $owned_by, $assigned_to, $state);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobsByAccount: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
account_id | string | Account ID | |
x_phrase_app_otp | string | 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 | string | filter by user owning job | [optional] |
assigned_to | string | filter by user assigned to job | [optional] |
state | string | filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code> | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\Job[] jobsList($project_id, $x_phrase_app_otp, $page, $per_page, $branch, $owned_by, $assigned_to, $state)
List jobs
List all jobs for the given project.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\JobsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 'project_id_example'; // string | Project ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | 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; // string | specify the branch to use
$owned_by = abcd1234cdef1234abcd1234cdef1234; // string | filter by user owning job
$assigned_to = abcd1234cdef1234abcd1234cdef1234; // string | filter by user assigned to job
$state = completed; // string | filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>
try {
$result = $apiInstance->jobsList($project_id, $x_phrase_app_otp, $page, $per_page, $branch, $owned_by, $assigned_to, $state);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->jobsList: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
x_phrase_app_otp | string | 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 | string | specify the branch to use | [optional] |
owned_by | string | filter by user owning job | [optional] |
assigned_to | string | filter by user assigned to job | [optional] |
state | string | filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code> | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]