All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
jobTemplateCreate | POST /projects/{project_id}/job_templates | Create a job template |
jobTemplateDelete | DELETE /projects/{project_id}/job_templates/{id} | Delete a job template |
jobTemplateUpdate | PATCH /projects/{project_id}/job_templates/{id} | Update a job template |
jobTemplatesList | GET /projects/{project_id}/job_templates | List job templates |
jobTemplatesShow | GET /projects/{project_id}/job_templates/{id} | Get a single job template |
\Phrase\Model\JobTemplateDetails jobTemplateCreate($project_id, $job_template_create_parameters, $x_phrase_app_otp)
Create a job template
Create a new job template.
<?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\JobTemplatesApi(
// 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_template_create_parameters = new \Phrase\Model\JobTemplateCreateParameters(); // \Phrase\Model\JobTemplateCreateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->jobTemplateCreate($project_id, $job_template_create_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobTemplatesApi->jobTemplateCreate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
job_template_create_parameters | \Phrase\Model\JobTemplateCreateParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
\Phrase\Model\JobTemplateDetails
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
jobTemplateDelete($project_id, $id, $x_phrase_app_otp, $branch)
Delete a job template
Delete an existing job template.
<?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\JobTemplatesApi(
// 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->jobTemplateDelete($project_id, $id, $x_phrase_app_otp, $branch);
} catch (Exception $e) {
echo 'Exception when calling JobTemplatesApi->jobTemplateDelete: ', $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\JobTemplateDetails jobTemplateUpdate($project_id, $id, $job_template_update_parameters, $x_phrase_app_otp)
Update a job template
Update an existing job template.
<?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\JobTemplatesApi(
// 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_template_update_parameters = new \Phrase\Model\JobTemplateUpdateParameters(); // \Phrase\Model\JobTemplateUpdateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->jobTemplateUpdate($project_id, $id, $job_template_update_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobTemplatesApi->jobTemplateUpdate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
job_template_update_parameters | \Phrase\Model\JobTemplateUpdateParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
\Phrase\Model\JobTemplateDetails
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\JobTemplate[] jobTemplatesList($project_id, $x_phrase_app_otp, $page, $per_page, $branch)
List job templates
List all job templates 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\JobTemplatesApi(
// 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
try {
$result = $apiInstance->jobTemplatesList($project_id, $x_phrase_app_otp, $page, $per_page, $branch);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobTemplatesApi->jobTemplatesList: ', $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] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\JobTemplateDetails jobTemplatesShow($project_id, $id, $x_phrase_app_otp, $branch)
Get a single job template
Get details on a single job template 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\JobTemplatesApi(
// 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->jobTemplatesShow($project_id, $id, $x_phrase_app_otp, $branch);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling JobTemplatesApi->jobTemplatesShow: ', $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] |
\Phrase\Model\JobTemplateDetails
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]