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

# History

`function` **History.get**

<pre language="python">
  `def History.get(
  id: str,
  /
  ) -> typing.Any`
</pre>

The record of the run with task ID `id` (or whose entry's folder is named `id`), as `list` gives it; None when it is not kept.

`function` **History.link**

<pre language="python">
  `def History.link(
  label: str,
  url: str,
  /
  ) -> None`
</pre>

Add a link to this run's record: a results page, say, which a history list then shows. A link already there is not added twice.

`function` **History.list**

<pre language="python">
  `def History.list(
  *,
  limit: int = 50,
  kind: None | str = None,
  outcome: None | str = None,
  branch: None | str = None
  ) -> list`
</pre>

The records of past runs, newest first: at most `limit` of them, only those of task `kind`, those that ended `outcome` (`ok`, `failed`, `error`, `cancelled`, `running`, `abandoned`), and those run on git `branch`, when given. Each is a dict, as `task.json` has it, its command line redacted, with `dir` (the entry's folder), `outcome`, and each build's `build_events` (its kept stream, for `bazel.build_events.read`) where its folder has one. This run's own record is among them, `running`.

`function` **History.root**

<pre language="python">
  `def History.root() -> str`
</pre>

The folder the history is kept in.


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