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

     1  ---
     2  summary: Import from GitLab to Phrase
     3  description: 'Import translations from GitLab to Phrase Strings according to the .phraseapp.yml file within the GitLab repository. <br><br><i>Note: Import is done asynchronously and may take several seconds depending on the project size.</i>'
     4  operationId: gitlab_sync/import
     5  tags:
     6  - GitLab Sync
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/gitlab_sync_id"
    10  responses:
    11    '200':
    12      description: OK
    13      content:
    14        application/json:
    15          schema:
    16            type: array
    17            items:
    18              "$ref": "../../schemas/upload.yaml#/upload"
    19      headers:
    20        X-Rate-Limit-Limit:
    21          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    22        X-Rate-Limit-Remaining:
    23          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    24        X-Rate-Limit-Reset:
    25          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    26        Link:
    27          "$ref": "../../headers.yaml#/Link"
    28        Pagination:
    29          "$ref": "../../headers.yaml#/Pagination"
    30    '400':
    31      "$ref": "../../responses.yaml#/400"
    32    '404':
    33      "$ref": "../../responses.yaml#/404"
    34    '429':
    35      "$ref": "../../responses.yaml#/429"
    36  x-code-samples:
    37  - lang: Curl
    38    source: |-
    39      curl "https://api.phrase.com/v2/gitlab_syncs/:gitlab_sync_id/import" \
    40        -u USERNAME_OR_ACCESS_TOKEN \
    41        -X POST \
    42        -d '{"account_id":"abcd1234"}' \
    43        -H 'Content-Type: application/json'
    44  - lang: CLI v2
    45    source: |-
    46      phrase git_lab_sync import \
    47      --gitlab_sync_id <gitlab_sync_id> \
    48      --data '{"account_id":"abcd1234"}' \
    49      --access_token <token>
    50  requestBody:
    51    required: true
    52    content:
    53      application/json:
    54        schema:
    55          type: object
    56          title: gitlab_sync/import/parameters
    57          properties:
    58            account_id:
    59              description: Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
    60              type: string
    61              example: abcd1234
    62  x-cli-version: '2.5'