Skip to content

Latest commit

 

History

History
432 lines (343 loc) · 20.7 KB

File metadata and controls

432 lines (343 loc) · 20.7 KB

JobTemplateLocalesApi

All URIs are relative to https://api.phrase.com/v2

Method HTTP request Description
jobTemplateLocaleDelete DELETE /projects/{project_id}/job_templates/{job_template_id}/locales/{job_template_locale_id} Delete a job template locale
jobTemplateLocaleShow GET /projects/{project_id}/job_templates/{job_template_id}/locales/{job_template_locale_id} Get a single job template locale
jobTemplateLocaleUpdate PATCH /projects/{project_id}/job_templates/{job_template_id}/locales/{job_template_locale_id} Update a job template locale
jobTemplateLocalesCreate POST /projects/{project_id}/job_templates/{job_template_id}/locales Create a job template locale
jobTemplateLocalesList GET /projects/{project_id}/job_templates/{job_template_id}/locales List job template locales

jobTemplateLocaleDelete

jobTemplateLocaleDelete(projectId, jobTemplateId, jobTemplateLocaleId, xPhraseAppOTP, branch)

Delete a job template locale

Delete an existing job template locale.

Example

// Import classes:
import com.phrase.client.ApiClient;
import com.phrase.client.ApiException;
import com.phrase.client.Configuration;
import com.phrase.client.auth.*;
import com.phrase.client.models.*;
import com.phrase.client.api.JobTemplateLocalesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.phrase.com/v2");
    
    // Configure HTTP basic authorization: Basic
    HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
    Basic.setUsername("YOUR USERNAME");
    Basic.setPassword("YOUR PASSWORD");

    // Configure API key authorization: Token
    ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
    Token.setApiKey("YOUR API KEY");
    Token.setApiKeyPrefix("token");

    JobTemplateLocalesApi apiInstance = new JobTemplateLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobTemplateId = "jobTemplateId_example"; // String | Job Template ID
    String jobTemplateLocaleId = "jobTemplateLocaleId_example"; // String | Job Template Locale ID
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    String branch = "my-feature-branch"; // String | specify the branch to use
    try {
      apiInstance.jobTemplateLocaleDelete(projectId, jobTemplateId, jobTemplateLocaleId, xPhraseAppOTP, branch);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobTemplateLocalesApi#jobTemplateLocaleDelete");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectId String Project ID
jobTemplateId String Job Template ID
jobTemplateLocaleId String Job Template Locale ID
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]
branch String specify the branch to use [optional]

Return type

null (empty response body)

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

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 -

jobTemplateLocaleShow

JobTemplateLocales jobTemplateLocaleShow(projectId, jobTemplateId, jobTemplateLocaleId, xPhraseAppOTP, branch)

Get a single job template locale

Get a single job template locale for a given job template.

Example

// Import classes:
import com.phrase.client.ApiClient;
import com.phrase.client.ApiException;
import com.phrase.client.Configuration;
import com.phrase.client.auth.*;
import com.phrase.client.models.*;
import com.phrase.client.api.JobTemplateLocalesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.phrase.com/v2");
    
    // Configure HTTP basic authorization: Basic
    HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
    Basic.setUsername("YOUR USERNAME");
    Basic.setPassword("YOUR PASSWORD");

    // Configure API key authorization: Token
    ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
    Token.setApiKey("YOUR API KEY");
    Token.setApiKeyPrefix("token");

    JobTemplateLocalesApi apiInstance = new JobTemplateLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobTemplateId = "jobTemplateId_example"; // String | Job Template ID
    String jobTemplateLocaleId = "jobTemplateLocaleId_example"; // String | Job Template Locale ID
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    String branch = "my-feature-branch"; // String | specify the branch to use
    try {
      JobTemplateLocales result = apiInstance.jobTemplateLocaleShow(projectId, jobTemplateId, jobTemplateLocaleId, xPhraseAppOTP, branch);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobTemplateLocalesApi#jobTemplateLocaleShow");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectId String Project ID
jobTemplateId String Job Template ID
jobTemplateLocaleId String Job Template Locale ID
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]
branch String specify the branch to use [optional]

Return type

JobTemplateLocales

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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 -

jobTemplateLocaleUpdate

JobTemplateLocales jobTemplateLocaleUpdate(projectId, jobTemplateId, jobTemplateLocaleId, jobTemplateLocaleUpdateParameters, xPhraseAppOTP)

Update a job template locale

Update an existing job template locale.

Example

// Import classes:
import com.phrase.client.ApiClient;
import com.phrase.client.ApiException;
import com.phrase.client.Configuration;
import com.phrase.client.auth.*;
import com.phrase.client.models.*;
import com.phrase.client.api.JobTemplateLocalesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.phrase.com/v2");
    
    // Configure HTTP basic authorization: Basic
    HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
    Basic.setUsername("YOUR USERNAME");
    Basic.setPassword("YOUR PASSWORD");

    // Configure API key authorization: Token
    ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
    Token.setApiKey("YOUR API KEY");
    Token.setApiKeyPrefix("token");

    JobTemplateLocalesApi apiInstance = new JobTemplateLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobTemplateId = "jobTemplateId_example"; // String | Job Template ID
    String jobTemplateLocaleId = "jobTemplateLocaleId_example"; // String | Job Template Locale ID
    JobTemplateLocaleUpdateParameters jobTemplateLocaleUpdateParameters = new JobTemplateLocaleUpdateParameters(); // JobTemplateLocaleUpdateParameters | 
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    try {
      JobTemplateLocales result = apiInstance.jobTemplateLocaleUpdate(projectId, jobTemplateId, jobTemplateLocaleId, jobTemplateLocaleUpdateParameters, xPhraseAppOTP);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobTemplateLocalesApi#jobTemplateLocaleUpdate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectId String Project ID
jobTemplateId String Job Template ID
jobTemplateLocaleId String Job Template Locale ID
jobTemplateLocaleUpdateParameters JobTemplateLocaleUpdateParameters
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]

Return type

JobTemplateLocales

Authorization

Basic, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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 -

jobTemplateLocalesCreate

JobTemplateLocales jobTemplateLocalesCreate(projectId, jobTemplateId, jobTemplateLocalesCreateParameters, xPhraseAppOTP)

Create a job template locale

Create a new job template locale.

Example

// Import classes:
import com.phrase.client.ApiClient;
import com.phrase.client.ApiException;
import com.phrase.client.Configuration;
import com.phrase.client.auth.*;
import com.phrase.client.models.*;
import com.phrase.client.api.JobTemplateLocalesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.phrase.com/v2");
    
    // Configure HTTP basic authorization: Basic
    HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
    Basic.setUsername("YOUR USERNAME");
    Basic.setPassword("YOUR PASSWORD");

    // Configure API key authorization: Token
    ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
    Token.setApiKey("YOUR API KEY");
    Token.setApiKeyPrefix("token");

    JobTemplateLocalesApi apiInstance = new JobTemplateLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobTemplateId = "jobTemplateId_example"; // String | Job Template ID
    JobTemplateLocalesCreateParameters jobTemplateLocalesCreateParameters = new JobTemplateLocalesCreateParameters(); // JobTemplateLocalesCreateParameters | 
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    try {
      JobTemplateLocales result = apiInstance.jobTemplateLocalesCreate(projectId, jobTemplateId, jobTemplateLocalesCreateParameters, xPhraseAppOTP);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobTemplateLocalesApi#jobTemplateLocalesCreate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectId String Project ID
jobTemplateId String Job Template ID
jobTemplateLocalesCreateParameters JobTemplateLocalesCreateParameters
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]

Return type

JobTemplateLocales

Authorization

Basic, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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 -

jobTemplateLocalesList

List<JobTemplateLocales> jobTemplateLocalesList(projectId, jobTemplateId, xPhraseAppOTP, page, perPage, branch)

List job template locales

List all job template locales for a given job template.

Example

// Import classes:
import com.phrase.client.ApiClient;
import com.phrase.client.ApiException;
import com.phrase.client.Configuration;
import com.phrase.client.auth.*;
import com.phrase.client.models.*;
import com.phrase.client.api.JobTemplateLocalesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.phrase.com/v2");
    
    // Configure HTTP basic authorization: Basic
    HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
    Basic.setUsername("YOUR USERNAME");
    Basic.setPassword("YOUR PASSWORD");

    // Configure API key authorization: Token
    ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
    Token.setApiKey("YOUR API KEY");
    Token.setApiKeyPrefix("token");

    JobTemplateLocalesApi apiInstance = new JobTemplateLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobTemplateId = "jobTemplateId_example"; // String | Job Template ID
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    Integer page = 1; // Integer | Page number
    Integer perPage = 25; // Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
    String branch = "my-feature-branch"; // String | specify the branch to use
    try {
      List<JobTemplateLocales> result = apiInstance.jobTemplateLocalesList(projectId, jobTemplateId, xPhraseAppOTP, page, perPage, branch);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobTemplateLocalesApi#jobTemplateLocalesList");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectId String Project ID
jobTemplateId String Job Template ID
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]
page Integer Page number [optional]
perPage Integer 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]

Return type

List<JobTemplateLocales>

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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 -