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

     1  ---
     2  summary: Update a property
     3  description: Update an existing custom metadata property.
     4  operationId: custom_metadata_property/update
     5  tags:
     6  - Custom Metadata
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/account_id"
    10  - "$ref": "../../parameters.yaml#/id"
    11  requestBody:
    12    required: true
    13    content:
    14      application/json:
    15        schema:
    16          type: object
    17          title: custom_metadata_properties/update/parameters
    18          properties:
    19            name:
    20              description: name of the property
    21              example: Fruit
    22              type: string
    23            project_ids:
    24              description: ids of projects that the property belongs to
    25              type: array
    26              example:
    27              - abcd1234cdef1234abcd1234cdef1234
    28              - abcd1234cdef1234abcd1234cdef4321
    29              items:
    30                type: string
    31            description:
    32              description: description of property
    33              example: A healthy snack for all ages
    34              type: string
    35            value_options:
    36              description: value options of property (only applies to single or multi select properties)
    37              example:
    38              - Apple
    39              - Banana
    40              - Coconut
    41              type: array
    42              items:
    43                type: string
    44  
    45  responses:
    46    '200':
    47      description: OK
    48      content:
    49        application/json:
    50          schema:
    51            "$ref": "../../schemas/custom_metadata_property.yaml#/custom_metadata_property"
    52      headers:
    53        X-Rate-Limit-Limit:
    54          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    55        X-Rate-Limit-Remaining:
    56          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    57        X-Rate-Limit-Reset:
    58          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    59    '400':
    60      "$ref": "../../responses.yaml#/400"
    61    '404':
    62      "$ref": "../../responses.yaml#/404"
    63    '429':
    64      "$ref": "../../responses.yaml#/429"
    65  x-code-samples:
    66  - lang: Curl
    67    source: |-
    68      curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/properties/:id" \
    69        -u USERNAME_OR_ACCESS_TOKEN \
    70        -X PATCH \
    71        -d '{"name":"Fruit","description":"A healthy snack for all ages","project_ids":["1","2","3"],"value_options":["apple","banana","coconut"]}' \
    72        -H 'Content-Type: application/json'
    73  - lang: CLI v2
    74    source: |-
    75      phrase custom_metadata_properties update \
    76      --account_id <account_id> \
    77      --id <id> \
    78      --data '{"name":"Fruit","description":"A healthy snack for all ages","project_ids":["1","2","3"],"value_options":["apple","banana","coconut"]}' \
    79      --access_token <token>
    80  x-cli-version: '2.9'