Skip to content

Latest commit

 

History

History
691 lines (551 loc) · 31.1 KB

File metadata and controls

691 lines (551 loc) · 31.1 KB

JobLocalesApi

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

Method HTTP request Description
jobLocaleComplete POST /projects/{project_id}/jobs/{job_id}/locales/{id}/complete Complete a job locale
jobLocaleCompleteReview POST /projects/{project_id}/jobs/{job_id}/locales/{id}/complete_review Review a job locale
jobLocaleDelete DELETE /projects/{project_id}/jobs/{job_id}/locales/{id} Remove a target locale from a job
jobLocaleReopen POST /projects/{project_id}/jobs/{job_id}/locales/{id}/reopen Reopen a job locale
jobLocaleShow GET /projects/{project_id}/jobs/{job_id}/locales/{id} Show single job target locale
jobLocaleUpdate PATCH /projects/{project_id}/jobs/{job_id}/locales/{id} Update a job target locale
jobLocalesCreate POST /projects/{project_id}/jobs/{job_id}/locales Add a target locale to a job
jobLocalesList GET /projects/{project_id}/jobs/{job_id}/locales List job target locales

jobLocaleComplete

JobLocale jobLocaleComplete(projectId, jobId, id, jobLocaleCompleteParameters, xPhraseAppOTP)

Complete a job locale

Mark a job locale as completed.

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.JobLocalesApi;

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");

    JobLocalesApi apiInstance = new JobLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobId = "jobId_example"; // String | Job ID
    String id = "id_example"; // String | ID
    JobLocaleCompleteParameters jobLocaleCompleteParameters = new JobLocaleCompleteParameters(); // JobLocaleCompleteParameters | 
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    try {
      JobLocale result = apiInstance.jobLocaleComplete(projectId, jobId, id, jobLocaleCompleteParameters, xPhraseAppOTP);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobLocalesApi#jobLocaleComplete");
      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
jobId String Job ID
id String ID
jobLocaleCompleteParameters JobLocaleCompleteParameters
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]

Return type

JobLocale

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 -

jobLocaleCompleteReview

JobLocale jobLocaleCompleteReview(projectId, jobId, id, jobLocaleCompleteReviewParameters, xPhraseAppOTP)

Review a job locale

Mark job locale as reviewed.

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.JobLocalesApi;

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");

    JobLocalesApi apiInstance = new JobLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobId = "jobId_example"; // String | Job ID
    String id = "id_example"; // String | ID
    JobLocaleCompleteReviewParameters jobLocaleCompleteReviewParameters = new JobLocaleCompleteReviewParameters(); // JobLocaleCompleteReviewParameters | 
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    try {
      JobLocale result = apiInstance.jobLocaleCompleteReview(projectId, jobId, id, jobLocaleCompleteReviewParameters, xPhraseAppOTP);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobLocalesApi#jobLocaleCompleteReview");
      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
jobId String Job ID
id String ID
jobLocaleCompleteReviewParameters JobLocaleCompleteReviewParameters
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]

Return type

JobLocale

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 -

jobLocaleDelete

jobLocaleDelete(projectId, jobId, id, xPhraseAppOTP, branch)

Remove a target locale from a job

Removes a target locale from a job.

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.JobLocalesApi;

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");

    JobLocalesApi apiInstance = new JobLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobId = "jobId_example"; // String | Job ID
    String id = "id_example"; // String | ID
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    String branch = "my-feature-branch"; // String | Branch to use
    try {
      apiInstance.jobLocaleDelete(projectId, jobId, id, xPhraseAppOTP, branch);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobLocalesApi#jobLocaleDelete");
      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
jobId String Job ID
id String ID
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]
branch String 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 -

jobLocaleReopen

JobLocale jobLocaleReopen(projectId, jobId, id, jobLocaleReopenParameters, xPhraseAppOTP)

Reopen a job locale

Mark a job locale as uncompleted.

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.JobLocalesApi;

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");

    JobLocalesApi apiInstance = new JobLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobId = "jobId_example"; // String | Job ID
    String id = "id_example"; // String | ID
    JobLocaleReopenParameters jobLocaleReopenParameters = new JobLocaleReopenParameters(); // JobLocaleReopenParameters | 
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    try {
      JobLocale result = apiInstance.jobLocaleReopen(projectId, jobId, id, jobLocaleReopenParameters, xPhraseAppOTP);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobLocalesApi#jobLocaleReopen");
      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
jobId String Job ID
id String ID
jobLocaleReopenParameters JobLocaleReopenParameters
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]

Return type

JobLocale

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 -

jobLocaleShow

JobLocale jobLocaleShow(projectId, jobId, id, xPhraseAppOTP, branch, includeAnnotations)

Show single job target locale

Get a single target locale for a given job.

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.JobLocalesApi;

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");

    JobLocalesApi apiInstance = new JobLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobId = "jobId_example"; // String | Job ID
    String id = "id_example"; // String | ID
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    String branch = "my-feature-branch"; // String | Branch to use
    Boolean includeAnnotations = false; // Boolean | Include job-locale annotations in the response
    try {
      JobLocale result = apiInstance.jobLocaleShow(projectId, jobId, id, xPhraseAppOTP, branch, includeAnnotations);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobLocalesApi#jobLocaleShow");
      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
jobId String Job ID
id String ID
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]
branch String Branch to use [optional]
includeAnnotations Boolean Include job-locale annotations in the response [optional] [default to false]

Return type

JobLocale

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 -

jobLocaleUpdate

JobLocale jobLocaleUpdate(projectId, jobId, id, jobLocaleUpdateParameters, xPhraseAppOTP)

Update a job target locale

Update an existing job target 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.JobLocalesApi;

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");

    JobLocalesApi apiInstance = new JobLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobId = "jobId_example"; // String | Job ID
    String id = "id_example"; // String | ID
    JobLocaleUpdateParameters jobLocaleUpdateParameters = new JobLocaleUpdateParameters(); // JobLocaleUpdateParameters | 
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    try {
      JobLocale result = apiInstance.jobLocaleUpdate(projectId, jobId, id, jobLocaleUpdateParameters, xPhraseAppOTP);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobLocalesApi#jobLocaleUpdate");
      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
jobId String Job ID
id String ID
jobLocaleUpdateParameters JobLocaleUpdateParameters
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]

Return type

JobLocale

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 -

jobLocalesCreate

JobLocale jobLocalesCreate(projectId, jobId, jobLocalesCreateParameters, xPhraseAppOTP)

Add a target locale to a job

Adds a target locale to a job.

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.JobLocalesApi;

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");

    JobLocalesApi apiInstance = new JobLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobId = "jobId_example"; // String | Job ID
    JobLocalesCreateParameters jobLocalesCreateParameters = new JobLocalesCreateParameters(); // JobLocalesCreateParameters | 
    String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
    try {
      JobLocale result = apiInstance.jobLocalesCreate(projectId, jobId, jobLocalesCreateParameters, xPhraseAppOTP);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobLocalesApi#jobLocalesCreate");
      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
jobId String Job ID
jobLocalesCreateParameters JobLocalesCreateParameters
xPhraseAppOTP String Two-Factor-Authentication token (optional) [optional]

Return type

JobLocale

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 -

jobLocalesList

List<JobLocale> jobLocalesList(projectId, jobId, xPhraseAppOTP, page, perPage, branch, includeAnnotations)

List job target locales

List all target locales for a given job.

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.JobLocalesApi;

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");

    JobLocalesApi apiInstance = new JobLocalesApi(defaultClient);
    String projectId = "projectId_example"; // String | Project ID
    String jobId = "jobId_example"; // String | Job 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 | Branch to use
    Boolean includeAnnotations = false; // Boolean | Include job-locale annotations in the response
    try {
      List<JobLocale> result = apiInstance.jobLocalesList(projectId, jobId, xPhraseAppOTP, page, perPage, branch, includeAnnotations);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobLocalesApi#jobLocalesList");
      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
jobId String Job 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 Branch to use [optional]
includeAnnotations Boolean Include job-locale annotations in the response [optional] [default to false]

Return type

List<JobLocale>

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 -