Google Cloud Batch Tasks API

View tasks within a job

OpenAPI Specification

google-cloud-batch-tasks-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Cloud Batch Jobs Tasks API
  description: Manages batch processing workloads on Google Cloud, including job creation, scheduling, task execution, and resource provisioning.
  version: 1.0.0
  contact:
    name: Google Cloud
    url: https://cloud.google.com/batch
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://batch.googleapis.com/v1
  description: Google Cloud Batch API v1
security:
- oauth2:
  - https://www.googleapis.com/auth/cloud-platform
tags:
- name: Tasks
  description: View tasks within a job
paths:
  /projects/{project}/locations/{location}/jobs/{jobId}/taskGroups/{taskGroupId}/tasks:
    get:
      operationId: listTasks
      summary: Google Cloud Batch List Tasks
      description: List Tasks associated with a job.
      tags:
      - Tasks
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: location
        in: path
        required: true
        schema:
          type: string
      - name: jobId
        in: path
        required: true
        schema:
          type: string
      - name: taskGroupId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  tasks:
                    type: array
                    items:
                      $ref: '#/components/schemas/Task'
                  nextPageToken:
                    type: string
  /projects/{project}/locations/{location}/jobs/{jobId}/taskGroups/{taskGroupId}/tasks/{taskId}:
    get:
      operationId: getTask
      summary: Google Cloud Batch Get Task
      description: Return a single Task.
      tags:
      - Tasks
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: location
        in: path
        required: true
        schema:
          type: string
      - name: jobId
        in: path
        required: true
        schema:
          type: string
      - name: taskGroupId
        in: path
        required: true
        schema:
          type: string
      - name: taskId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
components:
  schemas:
    Task:
      type: object
      properties:
        name:
          type: string
        status:
          type: object
          properties:
            state:
              type: string
              enum:
              - STATE_UNSPECIFIED
              - PENDING
              - ASSIGNED
              - RUNNING
              - FAILED
              - SUCCEEDED
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/cloud-platform: Full access to Google Cloud Platform