ApifyClient.API.Tasks.Runs.Last.RequestQueue.Requests (apify_client v1.0.0)

Copy Markdown View Source

Provides API endpoints related to api/tasks/runs/last/request queue/requests

Summary

Functions

Add request to the default request queue of an Actor task's last run

Delete request from the default request queue of an Actor task's last run

Get request from the default request queue of an Actor task's last run

List requests in the default request queue of an Actor task's last run

Unlock requests in the default request queue of an Actor task's last run

Update request in the default request queue of an Actor task's last run

Functions

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

@spec create(
  actor_task_id :: String.t(),
  body :: map() | ApifyClient.Schemas.RequestWithoutId.t(),
  opts :: keyword()
) ::
  {:ok, ApifyClient.Schemas.RequestRegistration.t()}
  | {:error, ApifyClient.Error.t()}

Add request to the default request queue of an Actor task's last run

Adds a request to the default request queue of the last Actor task run.

This endpoint is a shortcut for getting the last task run's defaultRequestQueueId and then using the Add request to request queue endpoint.

Options

  • status: Filter for the run status.

  • origin: Filter for the run origin, i.e. the means by which the run was started.

  • 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(actor_task_id, request_id, opts \\ [])

@spec delete(actor_task_id :: String.t(), request_id :: String.t(), opts :: keyword()) ::
  :ok | {:error, ApifyClient.Error.t()}

Delete request from the default request queue of an Actor task's last run

Deletes a request from the default request queue of the last Actor task run.

This endpoint is a shortcut for getting the last task run's defaultRequestQueueId and then using the Delete request from request queue endpoint.

Options

  • status: Filter for the run status.
  • origin: Filter for the run origin, i.e. the means by which the run was started.
  • 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.

get(actor_task_id, request_id, opts \\ [])

@spec get(actor_task_id :: String.t(), request_id :: String.t(), opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.RequestResource.t()}
  | {:error, ApifyClient.Error.t()}

Get request from the default request queue of an Actor task's last run

Returns a request from the default request queue of the last Actor task run.

This endpoint is a shortcut for getting the last task run's defaultRequestQueueId and then using the Get request from request queue endpoint.

Options

  • status: Filter for the run status.
  • origin: Filter for the run origin, i.e. the means by which the run was started.

list(actor_task_id, opts \\ [])

@spec list(actor_task_id :: String.t(), opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.ListOfRequests.t()}
  | {:error, ApifyClient.Error.t()}

List requests in the default request queue of an Actor task's last run

Returns a list of requests from the default request queue of the last Actor task run.

This endpoint is a shortcut for getting the last task run's defaultRequestQueueId and then using the List requests in request queue endpoint.

Options

  • status: Filter for the run status.

  • origin: Filter for the run origin, i.e. the means by which the run was started.

  • 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.

  • exclusive_start_id: All requests up to this one (including) are skipped from the result. (Deprecated, use cursor instead.)

  • limit: Number of keys to be returned. Maximum value is 10000.

  • cursor: A cursor string for pagination, returned in the previous response as nextCursor. Use this to retrieve the next page of requests.

  • filter: Filter requests by their state. Possible values are locked and pending. You can combine multiple values separated by commas, which will mean the union of these filters – requests matching any of the specified states will be returned. (Not compatible with deprecated exclusiveStartId parameter.)

unlock(actor_task_id, opts \\ [])

@spec unlock(actor_task_id :: String.t(), opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.UnlockRequestsResult.t()}
  | {:error, ApifyClient.Error.t()}

Unlock requests in the default request queue of an Actor task's last run

Unlocks requests in the default request queue of the last Actor task run that are currently locked by the client.

This endpoint is a shortcut for getting the last task run's defaultRequestQueueId and then using the Unlock requests in request queue endpoint.

Options

  • status: Filter for the run status.
  • origin: Filter for the run origin, i.e. the means by which the run was started.
  • 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.

update(actor_task_id, request_id, body, opts \\ [])

@spec update(
  actor_task_id :: String.t(),
  request_id :: String.t(),
  body :: map() | ApifyClient.Schemas.RequestWithoutId.t(),
  opts :: keyword()
) ::
  {:ok, ApifyClient.Schemas.RequestRegistration.t()}
  | {:error, ApifyClient.Error.t()}

Update request in the default request queue of an Actor task's last run

Updates a request in the default request queue of the last Actor task run.

This endpoint is a shortcut for getting the last task run's defaultRequestQueueId and then using the Update request in request queue endpoint.

Options

  • status: Filter for the run status.

  • origin: Filter for the run origin, i.e. the means by which the run was started.

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

  • 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