github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/paths/screenshots/update.yaml (about)

     1  ---
     2  summary: Update a screenshot
     3  description: Update an existing screenshot.
     4  operationId: screenshot/update
     5  tags:
     6  - Screenshots
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/project_id"
    10  - "$ref": "../../parameters.yaml#/id"
    11  responses:
    12    '200':
    13      description: OK
    14      content:
    15        application/json:
    16          schema:
    17            "$ref": "../../schemas/screenshot.yaml#/screenshot"
    18      headers:
    19        X-Rate-Limit-Limit:
    20          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    21        X-Rate-Limit-Remaining:
    22          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    23        X-Rate-Limit-Reset:
    24          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    25    '400':
    26      "$ref": "../../responses.yaml#/400"
    27    '404':
    28      "$ref": "../../responses.yaml#/404"
    29    '429':
    30      "$ref": "../../responses.yaml#/429"
    31  x-code-samples:
    32  - lang: Curl
    33    source: |-
    34      curl "https://api.phrase.com/v2/projects/:project_id/screenshots/:id" \
    35        -u USERNAME_OR_ACCESS_TOKEN \
    36        -X PATCH \
    37        -F branch=my-feature-branch \
    38        -F name=A%20screenshot%20name \
    39        -F description=A%20screenshot%20description \
    40        -F filename=@/path/to/my/screenshot.png
    41  - lang: CLI v2
    42    source: |-
    43      phrase screenshots update \
    44      --project_id <project_id> \
    45      --id <id> \
    46      --data '{"branch":"my-feature-branch", "name": "A screenshot name", "description": "A screenshot description", "filename":"/path/to/my/screenshot.png"}' \
    47      --access_token <token>
    48  requestBody:
    49    required: true
    50    content:
    51      application/json:
    52        schema:
    53          type: object
    54          title: screenshot/update/parameters
    55          properties:
    56            branch:
    57              description: specify the branch to use
    58              type: string
    59              example: my-feature-branch
    60            name:
    61              description: Name of the screenshot
    62              type: string
    63              example: A screenshot name
    64            description:
    65              description: Description of the screenshot
    66              type: string
    67              example: A screenshot description
    68            filename:
    69              description: Screenshot file
    70              type: string
    71              format: binary
    72              example: "/path/to/my/screenshot.png"
    73  x-cli-version: '2.5'