You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3d1be33
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: api/openapi.yaml
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -15371,6 +15371,8 @@ paths:
15371
15371
description: |
15372
15372
Upload a new language file. Creates necessary resources in your project.
15373
15373
15374
+
The upload is processed asynchronously: this endpoint returns `201 Created` once the file has been accepted and enqueued, not once processing has finished. Poll `GET /projects/{project_id}/uploads/{id}` and check the `state` field — `error` means processing failed (for example, an unparseable file or a `file_format` that doesn't match the file's actual content).
15375
+
15374
15376
Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
15375
15377
operationId: upload/create
15376
15378
parameters:
@@ -15486,7 +15488,6 @@ paths:
15486
15488
-X POST \
15487
15489
-F branch=my-feature-branch \
15488
15490
-F file=@/path/to/my/file.json \
15489
-
-F file_format=json \
15490
15491
-F locale_id=abcd1234cdef1234abcd1234cdef1234 \
15491
15492
-F tags=awesome-feature,needs-proofreading \
15492
15493
-F locale_mapping[en]=2 \
@@ -15497,7 +15498,6 @@ paths:
15497
15498
--project_id <project_id> \
15498
15499
--branch my-feature-branch \
15499
15500
--file /path/to/my/file.json \
15500
-
--file_format json \
15501
15501
--locale_id abcd1234cdef1234abcd1234cdef1234 \
15502
15502
--tags awesome-feature,needs-proofreading \
15503
15503
--locale_mapping '{"en": "2"}' \
@@ -15508,7 +15508,8 @@ paths:
15508
15508
x-accepts: application/json
15509
15509
/projects/{project_id}/uploads/{id}:
15510
15510
get:
15511
-
description: View details and summary for a single upload.
15511
+
description: |
15512
+
View details and summary for a single upload. Use this endpoint to poll for the outcome of an upload created via `POST /projects/{project_id}/uploads` — check the `state` field.
Processing state of the upload: `initialized`, `processing`, `success`, or `error`. `error` means processing failed — for example the file could not be parsed, or a provided `file_format` didn't match the file's actual content. Poll this field until it leaves `initialized`/`processing` to get the final outcome.
39470
39473
type: string
39471
39474
error_message:
39472
39475
description: |
@@ -43366,7 +43369,10 @@ components:
43366
43369
format: binary
43367
43370
type: string
43368
43371
file_format:
43369
-
description: File format. Auto-detected when possible and not specified.
43372
+
description: |
43373
+
File format of the uploaded file, given as a format's `api_name`. See our [Formats API Endpoint](/en/api/strings/formats/list-formats) for the full list of supported formats.
43374
+
43375
+
Optional. When omitted, Phrase tries to auto-detect the format from the file's content. This is not always possible for JSON files, since several JSON-based formats (e.g. `json`, `simple_json`, `nested_json`) share the same structure.
Copy file name to clipboardExpand all lines: docs/Upload.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
9
9
**id** | **String** | | [optional]
10
10
**filename** | **String** | | [optional]
11
11
**format** | **String** | | [optional]
12
-
**state** | **String** | | [optional]
12
+
**state** | **String** | Processing state of the upload: `initialized`, `processing`, `success`, or `error`. `error` means processing failed — for example the file could not be parsed, or a provided `file_format` didn't match the file's actual content. Poll this field until it leaves `initialized`/`processing` to get the final outcome. | [optional]
13
13
**errorMessage** | **String** | A user-facing message explaining why the upload failed, or `null` if the upload did not fail. This message is intended for display only. Its wording may change at any time and it should not be parsed or relied upon programmatically. | [optional]
14
14
**tag** | **String** | Unique tag of the upload | [optional]
15
15
**tags** | **List<String>** | List of tags that were assigned to the uploaded keys | [optional]
Upload a new language file. Creates necessary resources in your project. Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
18
+
Upload a new language file. Creates necessary resources in your project. The upload is processed asynchronously: this endpoint returns `201 Created` once the file has been accepted and enqueued, not once processing has finished. Poll `GET /projects/{project_id}/uploads/{id}` and check the `state` field — `error` means processing failed (for example, an unparseable file or a `file_format` that doesn't match the file's actual content). Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
String projectId ="projectId_example"; // String | Project ID
47
47
File _file =newFile("/path/to/file"); // File | File to be imported
48
-
String fileFormat ="fileFormat_example"; // String | File format. Auto-detected when possible and not specified.
48
+
String fileFormat ="fileFormat_example"; // String | File format of the uploaded file, given as a format's `api_name`. See our [Formats API Endpoint](/en/api/strings/formats/list-formats) for the full list of supported formats. Optional. When omitted, Phrase tries to auto-detect the format from the file's content. This is not always possible for JSON files, since several JSON-based formats (e.g. `json`, `simple_json`, `nested_json`) share the same structure.
49
49
String localeId ="localeId_example"; // String | Locale of the file's content. Can be the name or id of the locale. Preferred is id.
**fileFormat** | **String**| File format. Auto-detected when possible and not specified. |
91
+
**fileFormat** | **String**| File format of the uploaded file, given as a format's `api_name`. See our [Formats API Endpoint](/en/api/strings/formats/list-formats) for the full list of supported formats. Optional. When omitted, Phrase tries to auto-detect the format from the file's content. This is not always possible for JSON files, since several JSON-based formats (e.g. `json`, `simple_json`, `nested_json`) share the same structure. |
92
92
**localeId** | **String**| Locale of the file's content. Can be the name or id of the locale. Preferred is id. |
**branch** | **String**| specify the branch to use | [optional]
@@ -142,7 +142,7 @@ Name | Type | Description | Notes
142
142
143
143
Get a single upload
144
144
145
-
View details and summary for a single upload.
145
+
View details and summary for a single upload. Use this endpoint to poll for the outcome of an upload created via `POST /projects/{project_id}/uploads` — check the `state` field.
Copy file name to clipboardExpand all lines: src/main/java/com/phrase/client/api/UploadsApi.java
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ public void setApiClient(ApiClient apiClient) {
59
59
* Build call for uploadCreate
60
60
* @param projectId Project ID (required)
61
61
* @param _file File to be imported (required)
62
-
* @param fileFormat File format. Auto-detected when possible and not specified. (required)
62
+
* @param fileFormat File format of the uploaded file, given as a format's `api_name`. See our [Formats API Endpoint](/en/api/strings/formats/list-formats) for the full list of supported formats. Optional. When omitted, Phrase tries to auto-detect the format from the file's content. This is not always possible for JSON files, since several JSON-based formats (e.g. `json`, `simple_json`, `nested_json`) share the same structure. (required)
63
63
* @param localeId Locale of the file's content. Can be the name or id of the locale. Preferred is id. (required)
* Upload a new language file. Creates necessary resources in your project. Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
257
+
* Upload a new language file. Creates necessary resources in your project. The upload is processed asynchronously: this endpoint returns `201 Created` once the file has been accepted and enqueued, not once processing has finished. Poll `GET /projects/{project_id}/uploads/{id}` and check the `state` field — `error` means processing failed (for example, an unparseable file or a `file_format` that doesn't match the file's actual content). Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
258
258
* @param projectId Project ID (required)
259
259
* @param _file File to be imported (required)
260
-
* @param fileFormat File format. Auto-detected when possible and not specified. (required)
260
+
* @param fileFormat File format of the uploaded file, given as a format's `api_name`. See our [Formats API Endpoint](/en/api/strings/formats/list-formats) for the full list of supported formats. Optional. When omitted, Phrase tries to auto-detect the format from the file's content. This is not always possible for JSON files, since several JSON-based formats (e.g. `json`, `simple_json`, `nested_json`) share the same structure. (required)
261
261
* @param localeId Locale of the file's content. Can be the name or id of the locale. Preferred is id. (required)
* Upload a new language file. Creates necessary resources in your project. Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
304
+
* Upload a new language file. Creates necessary resources in your project. The upload is processed asynchronously: this endpoint returns `201 Created` once the file has been accepted and enqueued, not once processing has finished. Poll `GET /projects/{project_id}/uploads/{id}` and check the `state` field — `error` means processing failed (for example, an unparseable file or a `file_format` that doesn't match the file's actual content). Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
305
305
* @param projectId Project ID (required)
306
306
* @param _file File to be imported (required)
307
-
* @param fileFormat File format. Auto-detected when possible and not specified. (required)
307
+
* @param fileFormat File format of the uploaded file, given as a format's `api_name`. See our [Formats API Endpoint](/en/api/strings/formats/list-formats) for the full list of supported formats. Optional. When omitted, Phrase tries to auto-detect the format from the file's content. This is not always possible for JSON files, since several JSON-based formats (e.g. `json`, `simple_json`, `nested_json`) share the same structure. (required)
308
308
* @param localeId Locale of the file's content. Can be the name or id of the locale. Preferred is id. (required)
* @param branch specify the branch to use (optional)
@@ -349,10 +349,10 @@ public ApiResponse<Upload> uploadCreateWithHttpInfo(String projectId, File _file
349
349
350
350
/**
351
351
* Upload a new file (asynchronously)
352
-
* Upload a new language file. Creates necessary resources in your project. Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
352
+
* Upload a new language file. Creates necessary resources in your project. The upload is processed asynchronously: this endpoint returns `201 Created` once the file has been accepted and enqueued, not once processing has finished. Poll `GET /projects/{project_id}/uploads/{id}` and check the `state` field — `error` means processing failed (for example, an unparseable file or a `file_format` that doesn't match the file's actual content). Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
353
353
* @param projectId Project ID (required)
354
354
* @param _file File to be imported (required)
355
-
* @param fileFormat File format. Auto-detected when possible and not specified. (required)
355
+
* @param fileFormat File format of the uploaded file, given as a format's `api_name`. See our [Formats API Endpoint](/en/api/strings/formats/list-formats) for the full list of supported formats. Optional. When omitted, Phrase tries to auto-detect the format from the file's content. This is not always possible for JSON files, since several JSON-based formats (e.g. `json`, `simple_json`, `nested_json`) share the same structure. (required)
356
356
* @param localeId Locale of the file's content. Can be the name or id of the locale. Preferred is id. (required)
* View details and summary for a single upload. Use this endpoint to poll for the outcome of an upload created via `POST /projects/{project_id}/uploads` — check the `state` field.
* View details and summary for a single upload. Use this endpoint to poll for the outcome of an upload created via `POST /projects/{project_id}/uploads` — check the `state` field.
@@ -528,7 +528,7 @@ public ApiResponse<Upload> uploadShowWithHttpInfo(String projectId, String id, S
528
528
529
529
/**
530
530
* Get a single upload (asynchronously)
531
-
* View details and summary for a single upload.
531
+
* View details and summary for a single upload. Use this endpoint to poll for the outcome of an upload created via `POST /projects/{project_id}/uploads` — check the `state` field.
0 commit comments