|
147 | 147 | { |
148 | 148 | "name": "Organization Job Templates" |
149 | 149 | }, |
| 150 | + { |
| 151 | + "name": "Pre Translations" |
| 152 | + }, |
150 | 153 | { |
151 | 154 | "name": "Projects" |
152 | 155 | }, |
|
2886 | 2889 | "updated_at": "2015-01-28T09:52:53Z" |
2887 | 2890 | } |
2888 | 2891 | }, |
| 2892 | + "pre_translation": { |
| 2893 | + "type": "object", |
| 2894 | + "properties": { |
| 2895 | + "id": { |
| 2896 | + "type": "string", |
| 2897 | + "example": "abcd1234cdef1234abcd1234cdef1234" |
| 2898 | + }, |
| 2899 | + "status": { |
| 2900 | + "type": "string", |
| 2901 | + "enum": [ |
| 2902 | + "pending", |
| 2903 | + "running", |
| 2904 | + "success", |
| 2905 | + "error" |
| 2906 | + ], |
| 2907 | + "description": "Current execution state of the pre-translation job. Jobs start as `pending` while queued, transition to `running` while executing, and settle to `success` or `error`.\n" |
| 2908 | + }, |
| 2909 | + "translatable_type": { |
| 2910 | + "type": "string", |
| 2911 | + "enum": [ |
| 2912 | + "locale", |
| 2913 | + "job", |
| 2914 | + "translation_key", |
| 2915 | + "upload" |
| 2916 | + ], |
| 2917 | + "description": "Resource type that was pre-translated." |
| 2918 | + }, |
| 2919 | + "translatable_id": { |
| 2920 | + "type": "string", |
| 2921 | + "description": "ID of the targeted resource (locale ID, job ID, key ID, or upload ID).", |
| 2922 | + "example": "abcd1234cdef1234abcd1234cdef1234" |
| 2923 | + }, |
| 2924 | + "error": { |
| 2925 | + "type": "string", |
| 2926 | + "nullable": true, |
| 2927 | + "description": "Error message. `null` unless the job's status is `error`." |
| 2928 | + }, |
| 2929 | + "created_at": { |
| 2930 | + "type": "string", |
| 2931 | + "format": "date-time" |
| 2932 | + }, |
| 2933 | + "updated_at": { |
| 2934 | + "type": "string", |
| 2935 | + "format": "date-time" |
| 2936 | + } |
| 2937 | + } |
| 2938 | + }, |
2889 | 2939 | "translation_version": { |
2890 | 2940 | "type": "object", |
2891 | 2941 | "title": "translation_version", |
@@ -16224,6 +16274,239 @@ |
16224 | 16274 | "x-cli-version": "2.5" |
16225 | 16275 | } |
16226 | 16276 | }, |
| 16277 | + "/projects/{project_id}/pre_translations": { |
| 16278 | + "get": { |
| 16279 | + "summary": "List pre-translation jobs", |
| 16280 | + "description": "Returns all pre-translation jobs scoped to a project, ordered by\ncreation date descending.\n", |
| 16281 | + "operationId": "pre_translations/list", |
| 16282 | + "tags": [ |
| 16283 | + "Pre Translations" |
| 16284 | + ], |
| 16285 | + "parameters": [ |
| 16286 | + { |
| 16287 | + "$ref": "#/components/parameters/X-PhraseApp-OTP" |
| 16288 | + }, |
| 16289 | + { |
| 16290 | + "$ref": "#/components/parameters/If-Modified-Since" |
| 16291 | + }, |
| 16292 | + { |
| 16293 | + "$ref": "#/components/parameters/If-None-Match" |
| 16294 | + }, |
| 16295 | + { |
| 16296 | + "$ref": "#/components/parameters/project_id" |
| 16297 | + }, |
| 16298 | + { |
| 16299 | + "$ref": "#/components/parameters/page" |
| 16300 | + }, |
| 16301 | + { |
| 16302 | + "$ref": "#/components/parameters/per_page" |
| 16303 | + } |
| 16304 | + ], |
| 16305 | + "responses": { |
| 16306 | + "200": { |
| 16307 | + "description": "OK", |
| 16308 | + "content": { |
| 16309 | + "application/json": { |
| 16310 | + "schema": { |
| 16311 | + "type": "array", |
| 16312 | + "items": { |
| 16313 | + "$ref": "#/components/schemas/pre_translation" |
| 16314 | + } |
| 16315 | + } |
| 16316 | + } |
| 16317 | + }, |
| 16318 | + "headers": { |
| 16319 | + "X-Rate-Limit-Limit": { |
| 16320 | + "$ref": "#/components/headers/X-Rate-Limit-Limit" |
| 16321 | + }, |
| 16322 | + "X-Rate-Limit-Remaining": { |
| 16323 | + "$ref": "#/components/headers/X-Rate-Limit-Remaining" |
| 16324 | + }, |
| 16325 | + "X-Rate-Limit-Reset": { |
| 16326 | + "$ref": "#/components/headers/X-Rate-Limit-Reset" |
| 16327 | + }, |
| 16328 | + "Link": { |
| 16329 | + "$ref": "#/components/headers/Link" |
| 16330 | + }, |
| 16331 | + "Pagination": { |
| 16332 | + "$ref": "#/components/headers/Pagination" |
| 16333 | + } |
| 16334 | + } |
| 16335 | + }, |
| 16336 | + "400": { |
| 16337 | + "$ref": "#/components/responses/400" |
| 16338 | + }, |
| 16339 | + "401": { |
| 16340 | + "$ref": "#/components/responses/401" |
| 16341 | + }, |
| 16342 | + "403": { |
| 16343 | + "$ref": "#/components/responses/403", |
| 16344 | + "description": "Forbidden. Returned when the access token lacks the `read` scope, when the requesting user is not allowed to list pre-translation jobs in this project, or when the account does not have the `autopilot` plan feature." |
| 16345 | + }, |
| 16346 | + "404": { |
| 16347 | + "$ref": "#/components/responses/404" |
| 16348 | + }, |
| 16349 | + "429": { |
| 16350 | + "$ref": "#/components/responses/429" |
| 16351 | + } |
| 16352 | + } |
| 16353 | + }, |
| 16354 | + "post": { |
| 16355 | + "summary": "Create a pre-translation job", |
| 16356 | + "description": "Triggers a pre-translation job for a resource within a project, addressed\nby `translatable_type` (`locale`, `job`, `translation_key`, or `upload`)\nand `translatable_id` (its ID).\n\nEnqueues machine translation using the project's configured MT engine.\n", |
| 16357 | + "operationId": "pre_translation/create", |
| 16358 | + "tags": [ |
| 16359 | + "Pre Translations" |
| 16360 | + ], |
| 16361 | + "parameters": [ |
| 16362 | + { |
| 16363 | + "$ref": "#/components/parameters/X-PhraseApp-OTP" |
| 16364 | + }, |
| 16365 | + { |
| 16366 | + "$ref": "#/components/parameters/project_id" |
| 16367 | + } |
| 16368 | + ], |
| 16369 | + "requestBody": { |
| 16370 | + "required": true, |
| 16371 | + "content": { |
| 16372 | + "application/json": { |
| 16373 | + "schema": { |
| 16374 | + "type": "object", |
| 16375 | + "title": "pre_translation/create/parameters", |
| 16376 | + "properties": { |
| 16377 | + "translatable_type": { |
| 16378 | + "type": "string", |
| 16379 | + "enum": [ |
| 16380 | + "locale", |
| 16381 | + "job", |
| 16382 | + "translation_key", |
| 16383 | + "upload" |
| 16384 | + ], |
| 16385 | + "description": "Resource type to pre-translate." |
| 16386 | + }, |
| 16387 | + "translatable_id": { |
| 16388 | + "type": "string", |
| 16389 | + "description": "ID of the targeted resource: locale ID for `locale`, job ID for `job`, key ID for `translation_key`, upload ID for `upload`.\n" |
| 16390 | + } |
| 16391 | + }, |
| 16392 | + "example": { |
| 16393 | + "translatable_type": "locale", |
| 16394 | + "translatable_id": "abcd1234cdef1234abcd1234cdef1234" |
| 16395 | + } |
| 16396 | + } |
| 16397 | + } |
| 16398 | + } |
| 16399 | + }, |
| 16400 | + "responses": { |
| 16401 | + "202": { |
| 16402 | + "description": "Accepted", |
| 16403 | + "content": { |
| 16404 | + "application/json": { |
| 16405 | + "schema": { |
| 16406 | + "$ref": "#/components/schemas/pre_translation" |
| 16407 | + } |
| 16408 | + } |
| 16409 | + }, |
| 16410 | + "headers": { |
| 16411 | + "X-Rate-Limit-Limit": { |
| 16412 | + "$ref": "#/components/headers/X-Rate-Limit-Limit" |
| 16413 | + }, |
| 16414 | + "X-Rate-Limit-Remaining": { |
| 16415 | + "$ref": "#/components/headers/X-Rate-Limit-Remaining" |
| 16416 | + }, |
| 16417 | + "X-Rate-Limit-Reset": { |
| 16418 | + "$ref": "#/components/headers/X-Rate-Limit-Reset" |
| 16419 | + } |
| 16420 | + } |
| 16421 | + }, |
| 16422 | + "400": { |
| 16423 | + "$ref": "#/components/responses/400" |
| 16424 | + }, |
| 16425 | + "401": { |
| 16426 | + "$ref": "#/components/responses/401" |
| 16427 | + }, |
| 16428 | + "403": { |
| 16429 | + "$ref": "#/components/responses/403", |
| 16430 | + "description": "Forbidden. Returned when the access token lacks the `write` scope, when the requesting user is not allowed to create pre-translation jobs in this project, when the project is protected, or when the account does not have the `autopilot` plan feature." |
| 16431 | + }, |
| 16432 | + "404": { |
| 16433 | + "$ref": "#/components/responses/404" |
| 16434 | + }, |
| 16435 | + "422": { |
| 16436 | + "$ref": "#/components/responses/422" |
| 16437 | + }, |
| 16438 | + "429": { |
| 16439 | + "$ref": "#/components/responses/429" |
| 16440 | + } |
| 16441 | + } |
| 16442 | + } |
| 16443 | + }, |
| 16444 | + "/projects/{project_id}/pre_translations/{id}": { |
| 16445 | + "get": { |
| 16446 | + "summary": "Get a single pre-translation job", |
| 16447 | + "description": "Returns a single pre-translation job identified by its ID.\n", |
| 16448 | + "operationId": "pre_translation/show", |
| 16449 | + "tags": [ |
| 16450 | + "Pre Translations" |
| 16451 | + ], |
| 16452 | + "parameters": [ |
| 16453 | + { |
| 16454 | + "$ref": "#/components/parameters/X-PhraseApp-OTP" |
| 16455 | + }, |
| 16456 | + { |
| 16457 | + "$ref": "#/components/parameters/If-Modified-Since" |
| 16458 | + }, |
| 16459 | + { |
| 16460 | + "$ref": "#/components/parameters/If-None-Match" |
| 16461 | + }, |
| 16462 | + { |
| 16463 | + "$ref": "#/components/parameters/project_id" |
| 16464 | + }, |
| 16465 | + { |
| 16466 | + "$ref": "#/components/parameters/id" |
| 16467 | + } |
| 16468 | + ], |
| 16469 | + "responses": { |
| 16470 | + "200": { |
| 16471 | + "description": "OK", |
| 16472 | + "content": { |
| 16473 | + "application/json": { |
| 16474 | + "schema": { |
| 16475 | + "$ref": "#/components/schemas/pre_translation" |
| 16476 | + } |
| 16477 | + } |
| 16478 | + }, |
| 16479 | + "headers": { |
| 16480 | + "X-Rate-Limit-Limit": { |
| 16481 | + "$ref": "#/components/headers/X-Rate-Limit-Limit" |
| 16482 | + }, |
| 16483 | + "X-Rate-Limit-Remaining": { |
| 16484 | + "$ref": "#/components/headers/X-Rate-Limit-Remaining" |
| 16485 | + }, |
| 16486 | + "X-Rate-Limit-Reset": { |
| 16487 | + "$ref": "#/components/headers/X-Rate-Limit-Reset" |
| 16488 | + } |
| 16489 | + } |
| 16490 | + }, |
| 16491 | + "400": { |
| 16492 | + "$ref": "#/components/responses/400" |
| 16493 | + }, |
| 16494 | + "401": { |
| 16495 | + "$ref": "#/components/responses/401" |
| 16496 | + }, |
| 16497 | + "403": { |
| 16498 | + "$ref": "#/components/responses/403", |
| 16499 | + "description": "Forbidden. Returned when the access token lacks the `read` scope, when the requesting user is not allowed to read pre-translation jobs in this project, or when the account does not have the `autopilot` plan feature." |
| 16500 | + }, |
| 16501 | + "404": { |
| 16502 | + "$ref": "#/components/responses/404" |
| 16503 | + }, |
| 16504 | + "429": { |
| 16505 | + "$ref": "#/components/responses/429" |
| 16506 | + } |
| 16507 | + } |
| 16508 | + } |
| 16509 | + }, |
16227 | 16510 | "/projects/{project_id}/uploads": { |
16228 | 16511 | "post": { |
16229 | 16512 | "summary": "Upload a new file", |
|
0 commit comments