APIHub
Back to Explore

Batch API

It provides methods to create and list batch jobs, manage their long-running operations (including get, list, cancel, and delete), report agent state, and retrieve tasks and supported locations for the service.

Analytics
OAuth
HTTPS
CORS: Unknown
Description enriched
Visit official documentation

Latency

280ms p95

Uptime

100.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
GET

/v1/{name}/operations

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.

  • name (path, required) — The name of the operation's parent resource.
  • filter (query) — The standard list filter.
  • pageSize (query, limit) — The standard list page size.
  • pageToken (query) — The standard list page token.
DELETE

/v1/{name}

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.

  • name (path, required) — The name of the operation resource to be deleted.
  • reason (query) — Optional. Reason for this deletion.
  • requestId (query) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
GET

/v1/{name}

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

  • name (path, required) — The name of the operation resource.
GET

/v1/{name}/locations

Lists information about the supported locations for this service.

  • name (path, required) — The resource that owns the locations collection, if applicable.
  • filter (query) — A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
  • pageSize (query, limit) — The maximum number of results to return. If not set, the service selects a default.
  • pageToken (query) — A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
POST

/v1/{name}:cancel

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.

  • name (path, required) — The name of the operation resource to be cancelled.
GET

/v1/{parent}/jobs

List all Jobs for a project within a region.

  • parent (path, required) — Parent path.
  • filter (query) — List filter.
  • pageSize (query, limit) — Page size.
  • pageToken (query) — Page token.
POST

/v1/{parent}/jobs

Create a Job.

  • parent (path, required) — Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}"
  • jobId (query) — ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set. The job.name field in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}".
  • requestId (query) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
POST

/v1/{parent}/state:report

Report agent's state, e.g. agent status and tasks information

  • parent (path, required) — Required. Format: projects/{project}/locations/{location} {project} should be a project number.
GET

/v1/{parent}/tasks

List Tasks associated with a job.

  • parent (path, required) — Required. Name of a TaskGroup from which Tasks are being requested. Pattern: "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"
  • filter (query) — Task filter, null filter matches all Tasks. Filter string should be of the format State=TaskStatus.State e.g. State=RUNNING
  • pageSize (query, limit) — Page size.
  • pageToken (query) — Page token.

9 endpoints auto-detected

Authentication

This API requires authentication: OAuth.

curl -X GET \
  "https://batch.googleapis.com/v1/{name}/operations"

batch.googleapis.com · HTTPS only