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

     1  ---
     2  summary: Update a distribution
     3  description: Update an existing distribution.
     4  operationId: distribution/update
     5  tags:
     6  - Distributions
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/account_id"
    10  - "$ref": "../../parameters.yaml#/id"
    11  responses:
    12    '200':
    13      description: OK
    14      content:
    15        application/json:
    16          schema:
    17            "$ref": "../../schemas/distribution.yaml#/distribution"
    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/accounts/:account_id/distributions/:id" \
    35        -u USERNAME_OR_ACCESS_TOKEN \
    36        -X PATCH \
    37        -d '{"name":"My Android Distribution","project_id":"abcd1234abcd1234abcd1234","platforms":["android","ios"],"locale_ids":["fff565db236400772368235db2c6117e,abcd1234cdef1234abcd1234cdef1234"],"format_options":"{xml:{enclose_in_cdata:'1'}}","fallback_to_non_regional_locale":true,"fallback_to_default_locale":true,"use_last_reviewed_version":true}' \
    38        -H 'Content-Type: application/json'
    39  - lang: CLI v2
    40    source: |-
    41      phrase distributions update \
    42      --account_id <account_id> \
    43      --id <id> \
    44      --data '{"name": "My Android Distribution", "project_id":"abcd1234abcd1234abcd1234", "platforms": "android,ios", "locale_ids": "fff565db236400772368235db2c6117e,abcd1234cdef1234abcd1234cdef1234", "format_options": "{xml:{enclose_in_cdata:'1'}}", "fallback_to_non_regional_locale":true, "fallback_to_default_locale":true, "use_last_reviewed_version":true}' \
    45      --access_token <token>
    46  requestBody:
    47    required: true
    48    content:
    49      application/json:
    50        schema:
    51          type: object
    52          title: distribution/update/parameters
    53          properties:
    54            name:
    55              description: Name of the distribution
    56              type: string
    57              example: My Android Distribution
    58            project_id:
    59              description: Project id the distribution should be assigned to.
    60              type: string
    61              example: abcd1234abcd1234abcd1234
    62            platforms:
    63              description: List of platforms the distribution should support.
    64              type: array
    65              items:
    66                type: string
    67              example:
    68              - android
    69              - ios
    70            locale_ids:
    71              description: List of locale ids that will be part of distribution releases
    72              type: array
    73              items:
    74                type: string
    75              example:
    76              - abcd1234cdef1234abcd1234cdef1234
    77              - fff565db236400772368235db2c6117e
    78            format_options:
    79              description: Additional formatting and render options. Only <code>enclose_in_cdata</code> is available for platform <code>android</code>.
    80              type: object
    81              additionalProperties:
    82                type: string
    83              example: "{xml:{enclose_in_cdata:'1'}}"
    84            fallback_locales_enabled:
    85              description: Use fallback locale if there is no translation in the current locale.
    86              type: boolean
    87              example: true
    88            fallback_to_non_regional_locale:
    89              description: Indicates whether to fallback to non regional locale when locale can not be found
    90              type: boolean
    91              example: true
    92            fallback_to_default_locale:
    93              description: Indicates whether to fallback to projects default locale when locale can not be found
    94              type: boolean
    95              example: true
    96            use_last_reviewed_version:
    97              description: Use last reviewed instead of latest translation in a project
    98              type: boolean
    99              example: true
   100  x-cli-version: '2.5'