|
| 1 | +--- |
| 2 | +summary: Create/Update a job locale annotation |
| 3 | +description: Create or update an annotation for a job locale. If the annotation already exists, it will be updated; otherwise, a new annotation will be created. |
| 4 | +operationId: job_locale_annotation/update |
| 5 | +tags: |
| 6 | +- Job Annotations |
| 7 | +parameters: |
| 8 | +- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" |
| 9 | +- "$ref": "../../parameters.yaml#/project_id" |
| 10 | +- "$ref": "../../parameters.yaml#/job_id" |
| 11 | +- "$ref": "../../parameters.yaml#/job_locale_id" |
| 12 | +- name: id |
| 13 | + in: path |
| 14 | + required: true |
| 15 | + description: Name of the annotation to set or update. |
| 16 | + schema: |
| 17 | + type: string |
| 18 | +responses: |
| 19 | + '200': |
| 20 | + description: OK |
| 21 | + content: |
| 22 | + application/json: |
| 23 | + schema: |
| 24 | + "$ref": "../../schemas/job_annotation.yaml#/job_annotation" |
| 25 | + headers: |
| 26 | + X-Rate-Limit-Limit: |
| 27 | + "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" |
| 28 | + X-Rate-Limit-Remaining: |
| 29 | + "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" |
| 30 | + X-Rate-Limit-Reset: |
| 31 | + "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" |
| 32 | + '400': |
| 33 | + "$ref": "../../responses.yaml#/400" |
| 34 | + '404': |
| 35 | + "$ref": "../../responses.yaml#/404" |
| 36 | + '429': |
| 37 | + "$ref": "../../responses.yaml#/429" |
| 38 | +x-code-samples: |
| 39 | +- lang: Curl |
| 40 | + source: |- |
| 41 | + curl "https://api.phrase.com/v2/projects/:project_id/jobs/:job_id/locales/:job_locale_id/annotations/:id" \ |
| 42 | + -u USERNAME_OR_ACCESS_TOKEN \ |
| 43 | + -X PATCH \ |
| 44 | + -d '{"value":"Some value..."}' \ |
| 45 | + -H 'Content-Type: application/json' |
| 46 | +- lang: CLI v2 |
| 47 | + source: |- |
| 48 | + phrase job_locale_annotations update \ |
| 49 | + --project_id <project_id> \ |
| 50 | + --job_id <job_id> \ |
| 51 | + --job_locale_id <job_locale_id> \ |
| 52 | + --id <id> \ |
| 53 | + --data '{"value": "Some value..."}' \ |
| 54 | + --access_token <token> |
| 55 | +requestBody: |
| 56 | + required: true |
| 57 | + content: |
| 58 | + application/json: |
| 59 | + schema: |
| 60 | + type: object |
| 61 | + title: job_annotation/update/parameters |
| 62 | + properties: |
| 63 | + value: |
| 64 | + description: Annotation value |
| 65 | + type: string |
| 66 | + example: Some value... |
| 67 | + branch: |
| 68 | + description: Branch name of the job |
| 69 | + type: string |
| 70 | + example: my-feature-branch |
| 71 | +x-cli-version: '2.43' |
0 commit comments