ApifyClient.API.Runs.RequestQueue.Requests.Batch (apify_client v1.0.0)

Copy Markdown View Source

Provides API endpoints related to api/runs/request queue/requests/batch

Summary

Functions

Batch add requests to the default request queue of an Actor run

Batch delete requests from the default request queue of an Actor run

Functions

create(run_id, body, opts \\ [])

@spec create(
  run_id :: String.t(),
  body :: [map() | ApifyClient.Schemas.RequestWithoutId.t()],
  opts :: keyword()
) ::
  {:ok, ApifyClient.Schemas.BatchAddResult.t()}
  | {:error, ApifyClient.Error.t()}

Batch add requests to the default request queue of an Actor run

Adds requests to the default request queue of the Actor run in batch.

This endpoint is a shortcut for getting the run's defaultRequestQueueId and then using the Batch add requests to request queue endpoint.

Options

  • client_key: A unique identifier of the client accessing the request queue. It must be a string between 1 and 32 characters long. This identifier is used to determine whether the queue was accessed by multiple clients. If clientKey is not provided, the system considers this API call to come from a new client. For details, see the hadMultipleClients field returned by the Get request queue head endpoint.

  • forefront: Determines if request should be added to the head of the queue or to the end. Default value is false (end of queue).

Request Body

Content Types: application/json

delete(run_id, body, opts \\ [])

Batch delete requests from the default request queue of an Actor run

Batch-deletes requests from the default request queue of the Actor run.

This endpoint is a shortcut for getting the run's defaultRequestQueueId and then using the Batch delete requests from request queue endpoint.

Options

  • client_key: A unique identifier of the client accessing the request queue. It must be a string between 1 and 32 characters long. This identifier is used to determine whether the queue was accessed by multiple clients. If clientKey is not provided, the system considers this API call to come from a new client. For details, see the hadMultipleClients field returned by the Get request queue head endpoint.

Request Body

Content Types: application/json