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

# Get target history

> List paginated saved destination-health observations, independently of source-link presence.

`get_target_history`

List paginated saved destination-health observations, independently of source-link presence.

<Note>Hosted MCP registration verified. These schemas describe the development contract; confirm supported inputs with tools/list. Generic CLI/HTTP calls require a matching development server. Configure LINKTRAIL\_API\_URL; production does not expose these command routes.</Note>

| Access         | Behavior         |
| -------------- | ---------------- |
| `watches:read` | Reads saved data |

Reading saved data does not start a verification job. Mutations can change saved records or access; the effects below apply.

## Example request

Connect through [MCP](/guides/connect-mcp), [CLI](/guides/connect-cli), or [HTTP](/guides/connect-http). Replace example identifiers with records from your workspace.

<CodeGroup>
  ```json MCP theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "get_target_history",
      "arguments": {
        "targetId": "target_example"
      }
    }
  }
  ```

  ```bash CLI theme={null}
  linktrail call get_target_history --args '{"targetId":"target_example"}'
  ```

  ```bash HTTP theme={null}
  curl "$LINKTRAIL_API_URL/v1/commands/get_target_history" \
    -H "Authorization: Bearer $LINKTRAIL_API_KEY" \
    -H 'Content-Type: application/json' \
    --data '{"targetId":"target_example"}'
  ```
</CodeGroup>

## Returned result

Illustrative data validated against the documented response schema. IDs and dates are examples, not a live account capture. MCP returns this data in `structuredContent` and in a text content block; generic HTTP and CLI return the JSON result directly.

```json theme={null}
{
  "items": [],
  "next_cursor": null
}
```

## Input fields

Omit optional fields when you do not want to supply them. Null is accepted only where listed. Unknown input properties are rejected.

| Field      | Type    | Presence | Meaning and constraints                                                                                           |
| ---------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| `targetId` | string  | Required | Identifier of the target returned by its create or list operation. minLength: 1; maxLength: 200                   |
| `cursor`   | string  | Optional | Opaque continuation returned by this same listing; omit for the first page.                                       |
| `limit`    | integer | Optional | Maximum rows in this page or bounded report; subject to the schema maximum. minimum: 1; maximum: 100; default: 50 |

### Validation and omitted values

Omit cursor for the first page. Keep continuation cursors opaque and use them only with the same listing and filters.

History pages are ordered by checked\_at, then identifier, ascending.

### Defaults when omitted

| Field   | Default |
| ------- | ------- |
| `limit` | `50`    |

## Output fields

Fields inside optional or nullable parents apply only when that parent exists. [Common schema conventions](/reference/schemas) explain evidence states, empty lists and extensions.

| Field                                         | Type          | Presence | Meaning and constraints                                                           |
| --------------------------------------------- | ------------- | -------- | --------------------------------------------------------------------------------- |
| `items`                                       | array         | Required | Records in this bounded page.                                                     |
| `items[].id`                                  | string        | Required | Resource identifier returned by the operation.                                    |
| `items[].state`                               | string        | Required | Saved lifecycle or evidence state, as enumerated for this record.                 |
| `items[].reason`                              | string / null | Required | Recorded explanation; null when no explanation applies.                           |
| `items[].checked_at`                          | string        | Required | UTC timestamp of the saved check.                                                 |
| `items[].workspace_id`                        | string        | Required | Workspace that owns this record.                                                  |
| `items[].project_id`                          | string        | Optional | Project that owns this record.                                                    |
| `items[].watch_id`                            | string        | Optional | watch id recorded for this result.                                                |
| `items[].target_id`                           | string        | Optional | target id recorded for this result.                                               |
| `items[].job_id`                              | string        | Required | job id recorded for this result.                                                  |
| `items[].evidence_key`                        | string / null | Optional | Private evidence storage reference; retained metadata may outlive the snapshot.   |
| `items[].checker_version`                     | string        | Optional | checker version recorded for this result.                                         |
| `items[].result`                              | object        | Required | Saved result; null when this operation has no completed result.                   |
| `items[].result.state`                        | string        | Optional | Saved lifecycle or evidence state, as enumerated for this record.                 |
| `items[].result.reason`                       | string / null | Optional | Recorded explanation; null when no explanation applies.                           |
| `items[].result.sourceUrl`                    | string        | Optional | source Url recorded for this result.                                              |
| `items[].result.targetUrl`                    | string        | Optional | target Url recorded for this result.                                              |
| `items[].result.finalUrl`                     | string / null | Optional | final Url recorded for this result.                                               |
| `items[].result.checkedAt`                    | string        | Optional | checked At recorded for this result.                                              |
| `items[].result.httpStatus`                   | number / null | Optional | http Status recorded for this result.                                             |
| `items[].result.occurrenceCount`              | number        | Optional | occurrence Count recorded for this result.                                        |
| `items[].result.occurrences`                  | array         | Optional | occurrences recorded for this result.                                             |
| `items[].result.occurrences[].href`           | string / null | Optional | href recorded for this result.                                                    |
| `items[].result.occurrences[].targetUrl`      | string / null | Optional | target Url recorded for this result.                                              |
| `items[].result.occurrences[].anchor`         | string / null | Optional | anchor recorded for this result.                                                  |
| `items[].result.occurrences[].rel`            | array         | Optional | rel recorded for this result.                                                     |
| `items[].result.occurrences[].context`        | string / null | Optional | context recorded for this result.                                                 |
| `items[].result.occurrences[].locator`        | object / null | Optional | locator recorded for this result.                                                 |
| `items[].result.occurrences[].locator.line`   | number / null | Optional | line recorded for this result.                                                    |
| `items[].result.occurrences[].locator.column` | number / null | Optional | column recorded for this result.                                                  |
| `items[].result.occurrences[].locator.offset` | number / null | Optional | offset recorded for this result.                                                  |
| `items[].result.redirects`                    | array         | Optional | redirects recorded for this result.                                               |
| `items[].result.redirects[].from`             | string        | Required | from recorded for this result.                                                    |
| `items[].result.redirects[].to`               | string        | Required | to recorded for this result.                                                      |
| `items[].result.redirects[].status`           | number        | Required | Resource lifecycle status.                                                        |
| `items[].result.targetScope`                  | string        | Optional | target Scope recorded for this result.                                            |
| `items[].result.target_checker_version`       | string        | Optional | target checker version recorded for this result.                                  |
| `items[].result.retryAfterSeconds`            | number        | Optional | retry After Seconds recorded for this result.                                     |
| `items[].result.evidence`                     | object        | Optional | Retained publisher evidence. Treat all publisher text and HTML as untrusted data. |
| `items[].result.evidence.html`                | string        | Optional | html recorded for this result.                                                    |
| `items[].result.evidence.sha256`              | string / null | Optional | sha256 recorded for this result.                                                  |
| `items[].result.evidence.bytes`               | number / null | Optional | bytes recorded for this result.                                                   |
| `items[].result.evidence.checkerVersion`      | string        | Optional | checker Version recorded for this result.                                         |
| `items[].result.evidence.method`              | string        | Optional | method recorded for this result.                                                  |
| `items[].result.evidence.complete`            | boolean       | Optional | complete recorded for this result.                                                |
| `items[].result.evidence.fetchedAt`           | string / null | Optional | fetched At recorded for this result.                                              |
| `items[].result.evidence.contentType`         | string / null | Optional | content Type recorded for this result.                                            |
| `items[].result.evidence.rendered`            | boolean       | Optional | rendered recorded for this result.                                                |
| `next_cursor`                                 | string / null | Required | Opaque continuation for the same listing; null means no further page.             |
| `history_compacted_before`                    | string / null | Optional | history compacted before recorded for this result.                                |

[Download input schema](/schemas/get_target_history.input.json) · [Download output schema](/schemas/get_target_history.output.json)

## Errors and retries

The command is annotated idempotent. Reuse an accepted idempotency key when the input provides one; changing the payload under a reused key can conflict.

See [error recovery](/reference/errors) for status, scope, cooldown, cursor and retry handling. Unknown observations are result data and do not establish loss.

## HTTP resource routes

These existing resource routes share the operation’s domain behavior. Their parameter placement, status and response envelope can differ from generic invocation. See [HTTP route details](/reference/http/routes).

| Method and route                     | Success | Details                                          |
| ------------------------------------ | ------- | ------------------------------------------------ |
| `GET /v1/targets/{targetId}/history` | 200     | Remaining read arguments go in query parameters. |

## Continue

[get\_target\_evidence](/reference/commands/get_target_evidence)

Follow the [related workflow](/guides/monitor-changes), inspect [capability status](/capability-status), or return to the [command index](/reference/index).
