> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchski-attract.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List captured query parameters

> One row per query parameter of every matching page view, newest first: e.g.

```php Laravel wrap theme={"dark"}
use Fetchski\AttractCmsLaravel\Facades\Attract;

$requestLogParamPage = Attract::requestLog()->listRequestLogParams();
```

```json 200 wrap theme={"dark"}
{
  "params": [
    {
      "requestId": "clx8m2k4p0000a1b2c3d4e5f6",
      "createdAt": "2026-10-24T09:30:00.000Z",
      "key": "Example key",
      "value": "Example value",
      "group": "Example group",
      "path": "Example path",
      "url": "https://acme.example/example",
      "visitorId": "clx8m2k4p0000a1b2c3d4e5f6",
      "country": "Example country",
      "referrer": "Example referrer"
    }
  ],
  "total": 1,
  "page": 1,
  "perPage": 20,
  "totalPages": 1
}
```

## In your app

A controller answers a route on your app: it calls `listRequestLogParams()` and returns the answer.

**1. Add the controller**

```php app/Http/Controllers/ListRequestLogParamsController.php theme={"dark"}
<?php

declare(strict_types=1);

namespace App\Http\Controllers;

use Fetchski\AttractCmsLaravel\Data\RequestLogParamPage;
use Fetchski\AttractCmsLaravel\Facades\Attract;

final class ListRequestLogParamsController
{
    public function __invoke(): RequestLogParamPage
    {
        return Attract::requestLog()->listRequestLogParams();
    }
}
```

**2. Add the route**

```php routes/web.php theme={"dark"}
use App\Http\Controllers\ListRequestLogParamsController;
use Illuminate\Support\Facades\Route;

Route::get('/request-log/params', ListRequestLogParamsController::class);
```

**3. Call it**

```bash Terminal theme={"dark"}
curl http://localhost:8000/request-log/params
```

With `php artisan serve` running, it prints its answer as JSON.

> [!TIP]
>
> To keep the call in an Action instead, this writes `app/Actions/Attract/ListRequestLogParams.php` (an invokable Action that calls `listRequestLogParams()`) and its test under `tests/Feature/Actions/Attract/` (Pest when your app has it):
>
> ```bash Terminal theme={"dark"}
> php artisan make:attract-action requestLog.listRequestLogParams
> ```

## Call it from the terminal

```bash Terminal theme={"dark"}
php artisan attract:call requestLog.listRequestLogParams
```

It calls `listRequestLogParams()` on your default site and prints its answer as JSON. See [Call any method from the terminal](https://docs.fetchski-attract.com/call-command.md) for every argument type.

`?key=gclid&from=2026-07-01` lists every Google click ID with its visitor.

The same filters as the page-view list; `key` and `group` apply to each parameter.

> [accordion] Optional parameters
>
> Named arguments, e.g. `listRequestLogParams(from: …)`; leave out the optional ones.
>
> **from** `\\DateTimeInterface|string|null`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Captured at or after this ISO 8601 date or date-time. Format: an ISO 8601 date and time.
>
> **to** `\\DateTimeInterface|string|null`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Captured at or before this ISO 8601 date or date-time. Format: an ISO 8601 date and time.
>
> **pathPrefix** `?string`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Only paths starting with this, e.g. `/blog`.
>
> **visitorId** `?string`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Only this visitor (the `fetchski_vid` UUID).
>
> **country** `?string`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Only this two-letter country code, e.g. `US`. Matches `^[A-Za-z]{2}$`.
>
> **status** `?int`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Only this HTTP status, e.g. `404`. At least 100.
>
> **notFound** `?bool`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Only page views that did (`true`) or did not (`false`) find a page.
>
> **group** `?string`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Only rows with a parameter in this group, e.g. `ads` or `utm`.
>
> **key** `?string`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Only rows with this query parameter (case-insensitive), e.g. `gclid`.
>
> **paramKey** `?string`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. The same as `key` (`paramKey` wins when both are sent).
>
> **page** `?int`
>
> **Optional.** Leave it out and the site uses `1`. Page number, from 1 (a page past the end answers the last page).
>
> **perPage** `?int`
>
> **Optional.** Leave it out and the site uses `25`. Rows per page. 1 to 100.

> [accordion] Returns
>
> A `RequestLogParamPage` (`Fetchski\AttractCmsLaravel\Data\RequestLogParamPage`). A page of query parameters. Read its properties (`$requestLogParamPage->params`): each says whether the site always sends it.
>
> **params** `Collection\<int, RequestLogParamRow\>`
>
> **Always sent.** A list of `RequestLogParamRow`.
>
> **RequestLogParamRow (Fetchski\AttractCmsLaravel\Data\RequestLogParamRow)**
>
> One query parameter of one captured page view.
>
> **requestId** `string`
>
> **Always sent.** The page view’s `_id`.
>
> **createdAt** `CarbonImmutable`
>
> **Always sent.** Format: an ISO 8601 date and time.
>
> **key** `string`
>
> **Always sent.**
>
> **value** `string`
>
> **Always sent.**
>
> **group** `?string`
>
> **Always sent, can be `null`.** The group a classification rule put it in.
>
> **path** `string`
>
> **Always sent.**
>
> **url** `string`
>
> **Always sent.**
>
> **visitorId** `?string`
>
> **Always sent, can be `null`.** Set only with Analytics or Marketing consent.
>
> **country** `?string`
>
> **Always sent, can be `null`.** Two-letter country code.
>
> **referrer** `?string`
>
> **Always sent, can be `null`.** Origin + path with consent, origin only without.
>
> **total** `int`
>
> **Always sent.** Every match, across all pages.
>
> **page** `int`
>
> **Always sent.**
>
> **perPage** `int`
>
> **Always sent.**
>
> **totalPages** `int`
>
> **Always sent.** At least 1.

> [accordion] Errors
>
> Nothing to catch: the SDK retries what is safe, and Laravel logs and renders the rest (see [Errors and testing](https://docs.fetchski-attract.com/laravel/errors.md)).
>
> **AuthenticationFailed** `401`
>
> The API key is missing, malformed, unknown, disabled, expired or archived, or a request its signing mode requires to be signed is not.
>
> **Retried first:** No. **Read:** `siteMessage()`, `errorName()`, `data()`.
>
> **Forbidden** `403`
>
> The API key lacks the scope this route needs (the message names it) or is used from outside its allowlist; or, on a route that answers 403 to everyone it refuses, the caller may not use it.
>
> **Retried first:** No. **Read:** `siteMessage()`, `errorName()`, `data()`.
>
> **NotFound** `404`
>
> Nothing matches the identifier, or the caller may not use this route at all (it is not advertised).
>
> **Retried first:** No. **Read:** `siteMessage()`, `errorName()`, `data()`.
>
> **RateLimited** `429`
>
> The key used up its per-minute limit. Still, after the client’s own waits and retries.
>
> **Retried first:** Yes: the client waits `Retry-After` (1 s when absent; over 60 s it gives up at once) and retries, up to `retries` times (2 by default). **Read:** `retryAfter()` (seconds, or null), `siteMessage()`.
>
> **SiteError** `5xx`
>
> The site failed (or something in front of it did). Its logs say why.
>
> **Retried first:** A 502, 503 or 504: yes, after 0.5 s then 1 s. A 500: no. **Read:** `siteMessage()`, `errorName()`, `data()`.
>
> **SiteUnreachable** `no answer`
>
> No answer: DNS, a refused connection, TLS, or the timeout (15 s per attempt by default).
>
> **Retried first:** Yes, after 0.5 s then 1 s. **Read:** `reason()`, `neverConnected()`.
>
> **RequestNotSent** `not sent`
>
> The client refused to send it (e.g. a path segment of `..`); the site never saw it.
>
> **Retried first:** No. **Read:** `reason()` (what to change).
>
> **SiteRequestFailed** `any other`
>
> Any other status, or a success whose JSON doesn’t match this SDK version’s types (update the SDK).
>
> **Retried first:** No. **Read:** `reason()`, `status()`.
>
> **UnknownSite** `setup`
>
> `Attract::site('acme')` named a slug that isn’t under `sites` in `config/fetchski-attract.php`.
>
> **Retried first:** No: nothing was sent. **Read:** `getMessage()`, `$e->slug`.
>
> **SiteConfigurationError** `setup`
>
> The site’s config entry is wrong: no `url`, a malformed `api_key`, a key filed under another slug, or no default site.
>
> **Retried first:** No: nothing was sent. **Read:** `getMessage()` (what to fix).

## Behavior

* **Access:** an API key with `request-log:params:read`, or `ads:all`, or `admin:all`, or a signed-in user holding the `request-log:view` permission. Other callers get 404.
* **Rate limit:** the key’s own reads-per-minute limit, set when the key is created (default 600); over it, 429 with `Retry-After`. The client waits and retries for you; you see `RateLimited` only if that runs out.
* **Retries:** a read is safe to repeat: the client retries it on no answer, a 502/503/504 and a 429.
* **Timeout:** 15 s per attempt by default; raise `timeout` in `config/fetchski-attract.php` for longer.
* **Paging:** one page per call. To walk them all, use `listRequestLogParamsAll()` (see More examples): it asks for the next page as you iterate, and stops after page `totalPages`.

## More examples

`listRequestLogParamsAll()` takes `listRequestLogParams()`’s arguments except `page`.

```php Every page wrap theme={"dark"}
use Fetchski\AttractCmsLaravel\Facades\Attract;

$requestLogParamRows = Attract::requestLog()->listRequestLogParamsAll(); // LazyCollection<int, RequestLogParamRow>: the next page is fetched as you iterate
```

## Test it

It calls the route above with the SDK faked: the fake answers every call with a valid example, so nothing leaves your machine and no config or key is needed. Save it as `tests/Feature/ListRequestLogParamsTest.php`, then run your tests:

```php tests/Feature/ListRequestLogParamsTest.php theme={"dark"}
<?php

declare(strict_types=1);

namespace Tests\Feature;

use Fetchski\AttractCmsLaravel\Facades\Attract;
use Tests\TestCase;

final class ListRequestLogParamsTest extends TestCase
{
    public function test_list_request_log_params(): void
    {
        Attract::fake();

        $this->getJson('/request-log/params')->assertOk();

        Attract::assertCalled('requestLog.listRequestLogParams');
    }
}
```

```bash Terminal theme={"dark"}
php artisan test
```

**Answer with your own values:** fake `requestLog.listRequestLogParams` with a `sequence()` of pages, each `RequestLogParamPage::factory()->make([...])`, and walk `listRequestLogParamsAll()`.

```php tests/Feature/ListRequestLogParamsAnswerTest.php theme={"dark"}
<?php

declare(strict_types=1);

namespace Tests\Feature;

use Fetchski\AttractCmsLaravel\Data\RequestLogParamPage;
use Fetchski\AttractCmsLaravel\Facades\Attract;
use Tests\TestCase;

final class ListRequestLogParamsAnswerTest extends TestCase
{
    public function test_list_request_log_params_answers_your_values(): void
    {
        Attract::fake([
            'requestLog.listRequestLogParams' => Attract::sequence(
                RequestLogParamPage::factory()->make(['page' => 1, 'totalPages' => 2]),
                RequestLogParamPage::factory()->make(['page' => 2, 'totalPages' => 2]),
            ),
        ]);

        $requestLogParamRows = Attract::requestLog()->listRequestLogParamsAll();

        $this->assertCount(2, $requestLogParamRows->all());
    }
}
```

To fake `listRequestLogParamsAll()`, answer `requestLog.listRequestLogParams` (the walk calls it page by page): a `sequence()` of answers for several pages.

## Related

> [card] [List captured page views](https://docs.fetchski-attract.com/laravel/reference/request-log/list-request-log-entries.md)
>
> `Attract::requestLog()->listRequestLogEntries()`

> [card] [GET /request-log/params](https://docs.fetchski-attract.com/api-reference/request-log/list-captured-query-parameters.md)
>
> The endpoint this calls, in the API reference: the HTTP request and answer, and every rule the site checks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.