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

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