retrieve prompt run.md
Retrieve Prompt Run
Returns one stored prompt run, including mentions, citations, and any sanitized coding-agent trace captured for the run.
OpenAPI
openapi: 3.1.0
info:
title: Lightsage Public API
description: Public API for Lightsage CLI and external integrations.
version: 1.0.0
servers:
- url: https://api.lightsage.com
description: Production
security: []
tags:
- name: Status
description: Check API availability and validate the calling API key.
- name: Visibility
description: >-
Measure visibility, citations, competitors, and prompt performance across
answer platforms.
- name: Prompts
description: Manage tracked prompts and topics, and inspect their stored runs.
- name: Opportunities
description: Review ranked opportunities computed from prompt visibility results.
- name: Tasks
description: Manage the persisted action queue and task lifecycle.
- name: Site Audits
description: Review website audit results and page-level findings.
- name: Agent Analytics
description: >-
See which coding agents, AI bots, and people visit your tracked sites,
which pages they read, which pages return errors, and where the visits
come from.
- name: Evals
description: Define eval tasks, judges, subjects, and saved configurations.
- name: Eval Templates
description: >-
Select reusable judges, targets, schedules, metadata, and runtime settings
with `POST /v2/eval-templates`, then copy only those settings into
prompt-specific evals with `POST /v2/evals/batch`. Templates never contain
prompts and remain independent from evals created from them.
- name: Eval Runs
description: Start eval runs and inspect their lifecycle state.
- name: Eval Results
description: Review completed eval outcomes and diagnostic details.
- name: Agent Preference
description: >-
Compare your company head-to-head with a tracked competitor. Create a
comparison with `POST /v2/agent-preference/evals`, run it with `POST
/v2/eval-runs`, then read which company agents recommended.
- name: Agents
description: List runnable coding-agent harness and model combinations.
- name: Repositories
description: Manage reusable Git repository workspaces.
- name: Environments
description: List reusable runtime environments without exposing secret values.
- name: MCP Servers
description: List reusable MCP server integrations without exposing credentials.
- name: CLIs
description: List reusable command-line interfaces without exposing setup commands.
- name: Skills
description: List reusable skills available to workflows and evals.
paths:
/v2/prompts/runs/{run_id}:
get:
tags:
- Prompts
summary: Retrieve Prompt Run
description: >-
Returns one stored prompt run, including mentions, citations, and any
sanitized coding-agent trace captured for the run.
operationId: v2_prompt_runs_retrieve
parameters:
- name: run_id
in: path
required: true
schema:
type: string
title: Run Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/V2PromptRunDetail'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- LightsageApiKeyAuth: []
components:
schemas:
V2PromptRunDetail:
properties:
id:
type: string
title: Id
prompt_id:
type: string
title: Prompt Id
prompt:
anyOf:
- $ref: '#/components/schemas/V2PromptRunPrompt'
- type: 'null'
platform:
anyOf:
- $ref: '#/components/schemas/V2PromptRunPlatform'
- type: 'null'
target_kind:
anyOf:
- type: string
enum:
- answer_engine
- coding_agent
- type: 'null'
title: Target Kind
harness:
anyOf:
- type: string
- type: 'null'
title: Harness
description: >-
Coding-agent harness for agent runs; otherwise the answer platform
identifier.
model_id:
anyOf:
- type: string
- type: 'null'
title: Model Id
description: Public model ID. Internal hosting providers are never returned.
run_date:
type: string
title: Run Date
response_preview:
anyOf:
- type: string
- type: 'null'
title: Response Preview
is_brand_mentioned:
anyOf:
- type: boolean
- type: 'null'
title: Is Brand Mentioned
citation_count:
type: integer
title: Citation Count
default: 0
tool_call_count:
anyOf:
- type: integer
- type: 'null'
title: Tool Call Count
description: >-
Coding-agent tool invocations, counting a call and its result once.
Matches the length of `tool_calls` on the detail response; null for
answer-engine runs.
search_grounding:
anyOf:
- $ref: '#/components/schemas/SearchGroundingMode'
- type: 'null'
description: >-
Web access mode requested for this run. Null for runs recorded
before web access was tracked.
web_retrieval_observed:
anyOf:
- type: boolean
- type: 'null'
title: Web Retrieval Observed
description: >-
Whether the coding agent was observed searching or fetching from the
web. Null when not measured, including answer-engine runs.
search_observed:
anyOf:
- type: boolean
- type: 'null'
title: Search Observed
grounding_qualified:
anyOf:
- type: boolean
- type: 'null'
title: Grounding Qualified
description: >-
Whether the run satisfied the requested web access mode. Null means
the default mode was used or isolation could not be proven.
grounding_qualification_reason:
anyOf:
- type: string
- type: 'null'
title: Grounding Qualification Reason
created_at:
anyOf:
- type: string
- type: 'null'
title: Created At
response:
anyOf:
- type: string
- type: 'null'
title: Response
mentions:
items:
$ref: '#/components/schemas/V2PromptRunMention'
type: array
title: Mentions
citations:
items:
$ref: '#/components/schemas/V2PromptRunCitation'
type: array
title: Citations
tool_calls:
items:
additionalProperties: true
type: object
type: array
title: Tool Calls
description: >-
Sanitized coding-agent tool invocations captured for this run, one
entry per invocation with its result merged in.
conversation_turns:
items:
additionalProperties: true
type: object
type: array
title: Conversation Turns
description: >-
Sanitized interleaved text and tool-call trace captured for this
run. It interleaves the agent's `text` turns with `tool_call` turns,
so its length is not a tool-call count; use `tool_calls` or
`tool_call_count`.
type: object
required:
- id
- prompt_id
- run_date
title: V2PromptRunDetail
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
V2PromptRunPrompt:
properties:
id:
type: string
title: Id
text:
type: string
title: Text
topic:
anyOf:
- $ref: '#/components/schemas/V2PromptRunTopic'
- type: 'null'
type: object
required:
- id
- text
title: V2PromptRunPrompt
V2PromptRunPlatform:
properties:
id:
type: string
title: Id
name:
type: string
title: Name
type: object
required:
- id
- name
title: V2PromptRunPlatform
SearchGroundingMode:
type: string
enum:
- disabled
- enabled
- default
title: SearchGroundingMode
description: Requested web-retrieval behavior for an eval run.
V2PromptRunMention:
properties:
id:
type: string
title: Id
brand:
anyOf:
- $ref: '#/components/schemas/V2PromptRunBrand'
- type: 'null'
position:
anyOf:
- type: integer
- type: 'null'
title: Position
is_recommended:
anyOf:
- type: boolean
- type: 'null'
title: Is Recommended
is_primary:
anyOf:
- type: boolean
- type: 'null'
title: Is Primary
quote:
anyOf:
- type: string
- type: 'null'
title: Quote
sentiment:
anyOf:
- type: string
- type: 'null'
title: Sentiment
type: object
required:
- id
title: V2PromptRunMention
V2PromptRunCitation:
properties:
id:
type: string
title: Id
url:
type: string
title: Url
domain:
anyOf:
- type: string
- type: 'null'
title: Domain
title:
anyOf:
- type: string
- type: 'null'
title: Title
is_company_link:
type: boolean
title: Is Company Link
default: false
position:
anyOf:
- type: integer
- type: 'null'
title: Position
type: object
required:
- id
- url
title: V2PromptRunCitation
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
V2PromptRunTopic:
properties:
id:
type: string
title: Id
name:
type: string
title: Name
type: object
required:
- id
- name
title: V2PromptRunTopic
V2PromptRunBrand:
properties:
id:
type: string
title: Id
name:
type: string
title: Name
domain:
anyOf:
- type: string
- type: 'null'
title: Domain
logo_url:
anyOf:
- type: string
- type: 'null'
title: Logo Url
type: object
required:
- id
- name
title: V2PromptRunBrand
securitySchemes:
LightsageApiKeyAuth:
type: apiKey
in: header
name: X-Lightsage-Api-Key
This documentation is built and hosted on Mintlify, a developer documentation platform.