Dream
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/organizations/{organization_id}/verify/dreams/{id}/resume |
create |
The dream as it is after the review job was queued; its status is pending |
GET |
/api/v1/organizations/{organization_id}/verify/dreams |
list |
One page of 25 dreams for the project, newest first |
GET |
/api/v1/organizations/{organization_id}/verify/dreams/{id} |
load |
The dream, its counts, and one page of the selected tab's list |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
dreams, err := client.Dream(nil).List(map[string]any{"organization_id": "example", "project_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(dreams)
dream, err := client.Dream(nil).Load(map[string]any{"id": "example_id", "organization_id": "example", "project_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(dream)
Lua
Construct client as shown in the Lua setup, then call the operations:
local dreams, err = client:Dream():list({ organization_id = "example", project_id = "example" })
local dream, err = client:Dream():load({ id = "example_id", organization_id = "example", project_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$dreams = $client->Dream()->list(["organization_id" => "example", "project_id" => "example"]);
$dream = $client->Dream()->load(["id" => "example_id", "organization_id" => "example", "project_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
dreams = client.Dream().list({"organization_id": "example", "project_id": "example"})
dream = client.Dream().load({"id": "example_id", "organization_id": "example", "project_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
dreams = client.Dream.list({ "organization_id" => "example", "project_id" => "example" })
dream = client.Dream.load({ "id" => "example_id", "organization_id" => "example", "project_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const dreams = await client.Dream().list({ organization_id: "example", project_id: "example" })
const dream = await client.Dream().load({ id: "example_id", organization_id: "example", project_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
attention |
boolean |
Yes | The dream skipped at least one run, which will not be retried |
changes |
array |
Yes | One page of changes when tab is changes; empty otherwise |
completed_at |
one,string,null |
Yes | Completed At |
counts |
object |
Yes | Counts |
dream |
any |
Yes | Dream |
error_code |
one,string,null |
Yes | Diagnostic code from the last failure, or from a dream that stopped early; not display copy, show reason instead |
id |
string |
Yes | Public id used in the dream's URL |
pagination |
object |
Yes | Pagination |
permissions |
object |
Yes | Permissions |
phase |
string |
Yes | Where the dream is. |
reason |
one,string,null |
Yes | Plain-language explanation of the phase: the cause and what happens next. |
reviewed |
integer |
Yes | Finished runs and blocked executions reviewed, not counting skipped ones |
reviewed_date |
string |
Yes | Local day whose finished runs it reviewed |
runs |
array |
Yes | One page of covered runs, reviewed or skipped, when tab is runs; empty otherwise |
scope_name |
string |
Yes | Project or unassigned environment name |
skipped |
integer |
Yes | Runs skipped after repeated rejected review output |
tab |
string |
Yes | Tab |
timezone |
string |
Yes | Organization timezone the dream used |
create
POST /api/v1/organizations/{organization_id}/verify/dreams/{id}/resume
Operation ID: resume_api_v1_dream.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
project_id |
query |
string |
Yes | Project slug or public id that owns the dream |
Responses
200: The dream as it is after the review job was queued; its status is pending
application/json
The response is object and object.
401: Unauthorized
403: Organization administrator required
404: Dream not found for this organization and project
422: The dream already finished, is already queued, or a worker still holds it
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
enum: dream_not_resumable |
Yes | |
error |
string |
Yes |
502: Bad gateway
list
GET /api/v1/organizations/{organization_id}/verify/dreams
Operation ID: api_v1_dreams.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
project_id |
query |
string |
Yes | Project slug or public id |
page |
query |
integer |
No |
Responses
200: One page of 25 dreams for the project, newest first
application/json
| Property | Type | Required | Description |
|---|---|---|---|
dreams |
array of object |
Yes | |
dreams[].attention |
boolean |
Yes | The dream skipped at least one run, which will not be retried |
dreams[].changes |
integer |
Yes | Knowledge and memory entries created, updated or archived |
dreams[].completed_at |
string (date-time) |
Yes | |
dreams[].error_code |
string |
Yes | Diagnostic code from the last failure, or from a dream that stopped early; not display copy, show reason instead |
dreams[].id |
string |
Yes | Public id used in the dream's URL |
dreams[].phase |
enum: queued, running, stalled, paused, stopped, completed, ... |
Yes | Where the dream is. queued: waiting for a worker. running: a worker holds it. stalled: marked running but no worker holds it. paused: it hit an error and the periodic sweep still resumes it. stopped: it hit an error and is no longer retried automatically; only an administrator can resume it. completed: finished normally. stopped_early: finished, but ended before reviewing everything because its project or environment became unavailable. |
dreams[].reason |
string |
Yes | Plain-language explanation of the phase: the cause and what happens next. Null for queued, running and completed dreams. |
dreams[].reviewed |
integer |
Yes | Finished runs and blocked executions reviewed, not counting skipped ones |
dreams[].reviewed_date |
string (date) |
Yes | Local day whose finished runs it reviewed |
dreams[].scope_name |
string |
Yes | Project or unassigned environment name |
dreams[].skipped |
integer |
Yes | Runs skipped after repeated rejected review output |
dreams[].timezone |
string |
Yes | Organization timezone the dream used |
pagination |
object |
Yes | |
pagination.count |
integer |
Yes | |
pagination.last |
integer |
Yes | |
pagination.limit |
integer |
Yes | |
pagination.next |
integer |
Yes | |
pagination.page |
integer |
Yes | |
pagination.previous |
integer |
Yes | |
pagination.series |
array of integer or string |
Yes | |
permissions |
object |
Yes | |
permissions.manage |
boolean |
Yes | |
schedule |
object |
Yes | |
schedule.next_at |
string (date-time) |
Yes | Next scheduled start |
schedule.start_hour |
integer |
Yes | Local 24-hour clock hour a dream starts |
schedule.timezone |
string |
Yes | Organization IANA timezone dreams are scheduled in |
waiting_runs |
integer |
Yes | Finished runs and blocked executions the next dream will review |
401: Unauthorized
403: Forbidden
404: Project not found in this organization
422: Unprocessable entity
502: Bad gateway
load
GET /api/v1/organizations/{organization_id}/verify/dreams/{id}
Operation ID: api_v1_dream.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
project_id |
query |
string |
Yes | Project slug or public id that owns the dream |
tab |
query |
enum: changes, runs |
No | Which list to populate; defaults to changes |
page |
query |
integer |
No |
Responses
200: The dream, its counts, and one page of the selected tab's list
application/json
| Property | Type | Required | Description |
|---|---|---|---|
changes |
array of object |
Yes | One page of changes when tab is changes; empty otherwise |
changes[].archived |
boolean |
Yes | The entry is archived now |
changes[].can_add_back |
boolean |
Yes | True only when the dream archived this knowledge document, it is still archived, its previous title and Markdown were kept, and no available document in the project already has that title (compared ignoring case). Then its previous content can be added back as a new document. Always false for memories and for any other operation |
changes[].created_at |
string (date-time) |
Yes | |
changes[].current |
object or null |
Yes | A memory as it is now, since memories have no page of their own; null for documents, which open their own page |
changes[].entry_id |
string |
Yes | Public id of the knowledge document or memory |
changes[].id |
string |
Yes | |
changes[].library |
enum: knowledge, memory |
Yes | |
changes[].operation |
enum: create, update, archive |
Yes | |
changes[].previous |
object or null |
Yes | The entry before this change; null when the change created it |
changes[].reason |
string |
Yes | Why the dream made this change |
changes[].restore |
object or null |
Yes | Present only when restoring this exact previous version is allowed |
changes[].runs |
array of object |
Yes | Runs this change cites, at most five |
changes[].runs[].environment_name |
string |
Yes | |
changes[].runs[].execution_id |
string |
Yes | Project run page id for a saved Scenario execution or a pull request's Verify run; open /runs/{id} |
changes[].runs[].exploration_id |
string |
Yes | Discovery or Deep Scan page id; open /explorations/{id} for kind discovery and /deepscan/{id} for kind deep_scan |
changes[].runs[].id |
string |
Yes | |
changes[].runs[].kind |
enum: discovery, deep_scan, scenario, triage, pull_request |
Yes | |
changes[].runs[].observed_at |
string (date-time) |
Yes | When the run finished, a person triaged the finding, the pull request merged, or Verify first read an open pull request head |
changes[].runs[].outcome |
string |
Yes | The run's state as recorded, such as completed, partial, failed, passed or blocked |
changes[].runs[].title |
string |
Yes | |
changes[].runs_total |
integer |
Yes | All runs this change cites |
changes[].title |
string |
Yes | The entry's current title |
counts |
object |
Yes | |
counts.changes |
integer |
Yes | Changes the dream made |
counts.runs |
integer |
Yes | Every run the dream covered, reviewed or skipped, so it can exceed the dream's reviewed count |
dream |
object and object |
Yes | |
pagination |
object |
Yes | |
pagination.count |
integer |
Yes | |
pagination.last |
integer |
Yes | |
pagination.limit |
integer |
Yes | |
pagination.next |
integer |
Yes | |
pagination.page |
integer |
Yes | |
pagination.previous |
integer |
Yes | |
pagination.series |
array of integer or string |
Yes | |
permissions |
object |
Yes | |
permissions.manage |
boolean |
Yes | |
runs |
array of object and object |
Yes | One page of covered runs, reviewed or skipped, when tab is runs; empty otherwise |
tab |
enum: changes, runs |
Yes |