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

     1  ---
     2  summary: Create a job
     3  description: Create a new job.
     4  operationId: job/create
     5  tags:
     6  - Jobs
     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/job_details.yaml#/job_details"
    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/jobs" \
    34        -u USERNAME_OR_ACCESS_TOKEN \
    35        -X POST \
    36        -d '{"branch":"my-feature-branch","name":"de","briefing":"de-DE","due_date":"2017-08-15","ticket_url":"https://example.atlassian.net/browse/FOO","tags":["myUploadTag"],"translation_key_ids":["abcd1234cdef1234abcd1234cdef1234"]}' \
    37        -H 'Content-Type: application/json'
    38  - lang: CLI v2
    39    source: |-
    40      phrase jobs create \
    41      --project_id <project_id> \
    42      --data '{"branch":"my-feature-branch", "name":"de", "briefing":"de-DE", "due_date":"2017-08-15", "ticket_url":"https://example.atlassian.net/browse/FOO", "tags": ["myUploadTag"], "translation_key_ids": ["abcd1234cdef1234abcd1234cdef1234"]}' \
    43      --access_token <token>
    44  requestBody:
    45    required: true
    46    content:
    47      application/json:
    48        schema:
    49          type: object
    50          title: job/create/parameters
    51          required:
    52            - name
    53          properties:
    54            branch:
    55              description: specify the branch to use
    56              type: string
    57              example: my-feature-branch
    58            name:
    59              description: Job name
    60              type: string
    61              example: de
    62            source_locale_id:
    63              description: The API id of the source language
    64              type: string
    65              example: abcd1234cdef1234abcd1234cdef1234
    66            briefing:
    67              description: Briefing for the translators
    68              type: string
    69              example: de-DE
    70            due_date:
    71              description: Date the job should be finished
    72              type: string
    73              format: date-time
    74              example: '2017-08-15'
    75              nullable: true
    76            ticket_url:
    77              description: URL to a ticket for this job (e.g. Jira, Trello)
    78              type: string
    79              example: https://example.atlassian.net/browse/FOO
    80            tags:
    81              description: tags of keys that should be included within the job
    82              type: array
    83              items:
    84                type: string
    85              example:
    86              - myUploadTag
    87            translation_key_ids:
    88              description: ids of keys that should be included within the job
    89              type: array
    90              items:
    91                type: string
    92              example:
    93              - abcd1234cdef1234abcd1234cdef1234
    94            job_template_id:
    95              description: id of a job template you would like to model the created job after. Any manually added parameters will take preference over template attributes.
    96              type: string
    97              example: abcd1234cdef1234abcd1234cdef1234
    98  x-cli-version: '2.5'