# Get list of request queues


```
GET 
https://api.apify.com/v2/request-queues
```


Lists all of a user's request queues. The response is a JSON array of objects, where each object contains basic information about one queue.

By default, the objects are sorted by the `createdAt` field in ascending order, therefore you can use pagination to incrementally fetch all queues while new ones are still being created. To sort them in descending order, use `desc=1` parameter. The endpoint supports pagination using `limit` and `offset` parameters and it will not return more than 1000 array elements.

## Request

### Query Parameters

* **offset** double

  Number of items that should be skipped at the start. The default value is `0`.

  **Example:** `0`

  **limit** double

  Maximum number of items to return. The default value as well as the maximum is `1000`.

  **Example:** `1000`

  **desc** boolean

  If `true` or `1` then the objects are sorted by the `createdAt` field in descending order. By default, they are sorted in ascending order.

  **Example:** `true`

  **unnamed** boolean

  If `true` or `1` then all the storages are returned. By default, only named storages are returned.

  **Example:** `true`

  **ownership** StorageOwnership

  **Possible values:** \[`ownedByMe`, `sharedWithMe`]

  Filter by ownership. If this parameter is omitted, all accessible request queues are returned.
  * `ownedByMe`: Return only request queues owned by the user.
  * `sharedWithMe`: Return only request queues shared with the user by other users.
  **Example:** `ownedByMe`

<!-- -->

### Status 200

**Response Headers**




```
{
  "data": {
    "total": 1,
    "offset": 0,
    "limit": 1000,
    "desc": false,
    "count": 1,
    "items": [
      {
        "id": "WkzbQMuFYuamGv3YF",
        "name": "some-name",
        "userId": "wRsJZtadYvn4mBZmm",
        "username": "janedoe",
        "createdAt": "2019-12-12T07:34:14.202Z",
        "modifiedAt": "2019-12-13T08:36:13.202Z",
        "accessedAt": "2019-12-14T08:36:13.202Z",
        "expireAt": "2019-06-02T17:15:06.751Z",
        "totalRequestCount": 870,
        "handledRequestCount": 100,
        "pendingRequestCount": 670,
        "actId": "string",
        "actRunId": "string",
        "hadMultipleClients": true
      }
    ]
  }
}
```


**Schema**

* **data** object required

  A paginated list of request queues.

  * **total** integer required

    The total number of items available across all pages.

    **Possible values:** `>= 0`

    **Example:** `1`

  * **offset** integer required

    The starting position for this page of results.

    **Possible values:** `>= 0`

    **Example:** `0`

  * **limit** integer required

    The maximum number of items returned per page.

    **Possible values:** `>= 1`

    **Example:** `1000`

  * **desc** boolean required

    Whether the results are sorted in descending order.

    **Example:** `false`

  * **count** integer required

    The number of items returned in this response.

    **Possible values:** `>= 0`

    **Example:** `1`

  * **items** object\[] required

    The array of request queues.

    * **id** QueueId (string) required

      A unique identifier assigned to the request queue.

      **Example:** `WkzbQMuFYuamGv3YF`

    * **name** string required

      The name of the request queue.

      **Example:** `some-name`

    * **userId** QueueUserId (string) required

      The ID of the user who owns the request queue.

      **Example:** `wRsJZtadYvn4mBZmm`

    * **username** string required

      The username of the user who owns the request queue.

      **Example:** `janedoe`

    * **createdAt** string\<date-time> required

      The timestamp when the request queue was created.

      **Example:** `2019-12-12T07:34:14.202Z`

    * **modifiedAt** string\<date-time> required

      The timestamp when the request queue was last modified. Modifications include adding, updating, or removing requests, as well as locking or unlocking requests in the request queue.

      **Example:** `2019-12-13T08:36:13.202Z`

    * **accessedAt** string\<date-time> required

      The timestamp when the request queue was last accessed.

      **Example:** `2019-12-14T08:36:13.202Z`

    * **expireAt** string\<date-time>

      The timestamp when the request queue will expire and be deleted.

      **Example:** `2019-06-02T17:15:06.751Z`

    * **totalRequestCount** TotalRequestCount (integer) required

      The total number of requests in the request queue.

      **Possible values:** `>= 0`

      **Example:** `870`

    * **handledRequestCount** HandledRequestCount (integer) required

      The number of requests that have been handled.

      **Possible values:** `>= 0`

      **Example:** `100`

    * **pendingRequestCount** PendingRequestCount (integer) required

      The number of requests that are pending and have not been handled yet.

      **Possible values:** `>= 0`

      **Example:** `670`

    * **actId** string | null nullable

      The ID of the Actor that created this request queue.

    * **actRunId** string | null nullable

      The ID of the Actor run that created this request queue.

    * **hadMultipleClients** HadMultipleClients (boolean) required

      Whether the request queue has been accessed by multiple different clients.

      **Example:** `true`

### Status 400

Bad request - invalid input parameters or request body.


```
{
  "error": {
    "type": "invalid-input",
    "message": "Invalid input: The request body contains invalid data."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 401

Unauthorized - authentication required or invalid token.


```
{
  "error": {
    "type": "token-not-valid",
    "message": "Authentication token is not valid."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 403

Forbidden - insufficient permissions to perform this action.


```
{
  "error": {
    "type": "permission-denied",
    "message": "You do not have permission to perform this action."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 405

Method not allowed.


```
{
  "error": {
    "type": "method-not-allowed",
    "message": "This API end-point can only be accessed using the following HTTP methods: OPTIONS,GET"
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 429

Too many requests - rate limit exceeded.


```
{
  "error": {
    "type": "rate-limit-exceeded",
    "message": "You have exceeded the rate limit. Please try again later."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`
