All URIs are relative to https://api.phrase.com/v2
| Method | HTTP request | Description |
|---|---|---|
| uploadBatchesCreate | POST /projects/{project_id}/upload_batches | Create upload batch |
UploadBatch uploadBatchesCreate(projectId, uploadBatchesCreateParameters, xPhraseAppOTP)
Create upload batch
Groups multiple file uploads into a single batch. Optionally, launches the deletion of unmentioned translation keys after all uploads in the batch are completed.
// 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.UploadBatchesApi;
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");
UploadBatchesApi apiInstance = new UploadBatchesApi(defaultClient);
String projectId = "projectId_example"; // String | Project ID
UploadBatchesCreateParameters uploadBatchesCreateParameters = new UploadBatchesCreateParameters(); // UploadBatchesCreateParameters |
String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
try {
UploadBatch result = apiInstance.uploadBatchesCreate(projectId, uploadBatchesCreateParameters, xPhraseAppOTP);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UploadBatchesApi#uploadBatchesCreate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | String | Project ID | |
| uploadBatchesCreateParameters | UploadBatchesCreateParameters | ||
| xPhraseAppOTP | String | 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 - |