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

     1  ---
     2  summary: Update an authorization
     3  description: Update an existing authorization.
     4  operationId: authorization/update
     5  tags:
     6  - Authorizations
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/id"
    10  responses:
    11    '200':
    12      description: OK
    13      content:
    14        application/json:
    15          schema:
    16            "$ref": "../../schemas/authorization.yaml#/authorization"
    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/authorizations/:id" \
    34        -u USERNAME \
    35        -X PATCH \
    36        -d '{"note":"My Deploy Script","scopes":["read","write"],"expires_at":"2015-03-30T09:52:53Z"}' \
    37        -H 'Content-Type: application/json'
    38  - lang: CLI v2
    39    source: |-
    40      phrase authorizations update \
    41      --id <id> \
    42      --data '{"note": "My Deploy Script", "scopes": "read,write", "expires_at": "2015-03-30T09:52:53Z"}'
    43  requestBody:
    44    required: true
    45    content:
    46      application/json:
    47        schema:
    48          type: object
    49          title: authorization/update/parameters
    50          properties:
    51            note:
    52              description: A note to help you remember what the access is used for.
    53              type: string
    54              example: My Deploy Script
    55            scopes:
    56              description: A list of scopes that the access can be used for.
    57              type: array
    58              items:
    59                type: string
    60              example:
    61              - read
    62              - write
    63            expires_at:
    64              description: Expiration date for the authorization token. Null means no expiration date (default).
    65              type: string
    66              format: date-time
    67              example: '2015-03-30T09:52:53Z'
    68  x-cli-version: '2.5'