Mabl Insight API
The Insight API from Mabl — 3 operation(s) for insight.
The Insight API from Mabl — 3 operation(s) for insight.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/mabl:mabl-insight-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: mabl Insight API
description: APIs for interacting with mabl services
version: 0.599.3.1792436330
x-readme-id: 62c896636916ce01d2ff4f5a
servers:
- url: /
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Insight
paths:
/workspaces/{workspace_id}/insights/aggregate:
get:
tags:
- Insight
summary: Aggregate insight counts by day for a workspace
description: 'Returns a daily histogram of insight counts for a workspace over a required
created_time window. Counts are bucketed in the requested timezone and grouped
by insight type and insight status. Uses a bounded Datastore scan and in-memory
aggregation (does not return full insight entities).
Maximum allowed window is 60 calendar days in the requested timezone.'
operationId: aggregateWorkspaceInsights
parameters:
- name: workspace_id
in: path
description: The workspace (organization) id
required: true
style: simple
explode: false
schema:
type: string
- name: created_after_time
in: query
description: Inclusive lower bound on created_time (epoch milliseconds)
required: true
style: form
explode: true
schema:
type: integer
format: int64
- name: created_before_time
in: query
description: Inclusive upper bound on created_time (epoch milliseconds)
required: true
style: form
explode: true
schema:
type: integer
format: int64
- name: timezone
in: query
description: IANA timezone for daily bucket boundaries (e.g., America/Los_Angeles)
required: false
style: form
explode: true
schema:
type: string
default: America/Los_Angeles
- name: environment_id
in: query
description: Restricts the aggregate to insights associated with the given environment ID
required: false
style: form
explode: true
schema:
type: string
- name: application_id
in: query
description: Restricts the aggregate to insights associated with the given application ID
required: false
style: form
explode: true
schema:
type: string
- name: archived
in: query
description: Restricts the aggregate to archived or non-archived insights
required: false
style: form
explode: true
schema:
type: boolean
- name: insight_type
in: query
description: Restricts the aggregate to insights of the given type
required: false
style: form
explode: true
schema:
type: string
responses:
'200':
description: Daily insight count histogram
content:
application/json:
schema:
$ref: '#/components/schemas/InsightWorkspaceAggregateResult'
'400':
$ref: '#/components/responses/ErrorResponse400'
'401':
$ref: '#/components/responses/ErrorResponse401'
'403':
$ref: '#/components/responses/ErrorResponse403'
default:
$ref: '#/components/responses/ErrorResponse'
x-mabl-action: Read::Insight
/insights:
get:
tags:
- Insight
summary: Query Insights
description: Used to query insights
operationId: queryInsights
parameters:
- name: organization_id
in: query
description: Restricts the query to insights associated with the given organization ID
required: false
style: form
explode: true
schema:
type: string
- name: workspace_id
in: query
description: Restricts the query to insights associated with the given workspace ID
required: false
style: form
explode: true
schema:
type: string
- name: environment_id
in: query
description: Restricts the query to insights associated with the given environment ID
required: false
style: form
explode: true
schema:
type: string
- name: application_id
in: query
description: Restricts the query to insights associated with the given application ID
required: false
style: form
explode: true
schema:
type: string
- name: archived
in: query
description: Restricts the query to archived insights
required: false
style: form
explode: true
schema:
type: boolean
- name: insight_type
in: query
description: Restricts the query to insights of the given type
required: false
style: form
explode: true
schema:
type: string
- name: category
in: query
description: Restricts the query to insights of the given category
required: false
style: form
explode: true
schema:
type: string
- name: created_after_time
in: query
description: Restricts the query to insights created at or after the given time (epoch milliseconds)
required: false
style: form
explode: true
schema:
type: integer
format: int64
- name: created_before_time
in: query
description: Restricts the query to insights created at or before the given time (epoch milliseconds)
required: false
style: form
explode: true
schema:
type: integer
format: int64
- name: limit
in: query
description: The limit to use for pagination
required: false
style: form
explode: true
schema:
minimum: 1
type: integer
format: int32
- name: cursor
in: query
description: The cursor to use for pagination
required: false
style: form
explode: true
schema:
type: string
responses:
'200':
description: Results of the query
content:
application/json:
schema:
$ref: '#/components/schemas/InsightQueryResult'
'400':
$ref: '#/components/responses/ErrorResponse400'
'401':
$ref: '#/components/responses/ErrorResponse401'
'403':
$ref: '#/components/responses/ErrorResponse403'
default:
$ref: '#/components/responses/ErrorResponse'
x-mabl-action: Read::Insight
post:
tags:
- Insight
summary: Create Insight
description: Used to create new insights
operationId: createInsight
requestBody:
description: The insight to create
content:
application/json:
schema:
$ref: '#/components/schemas/Insight'
required: true
responses:
'201':
description: The insight that was created
content:
application/json:
schema:
$ref: '#/components/schemas/Insight'
'400':
$ref: '#/components/responses/ErrorResponse400'
'401':
$ref: '#/components/responses/ErrorResponse401'
'403':
$ref: '#/components/responses/ErrorResponse403'
default:
$ref: '#/components/responses/ErrorResponse'
x-mabl-action: Create::Insight
/insights/{id}:
get:
tags:
- Insight
summary: Get insight
description: Used to retrieve an insight by ID
operationId: getInsight
parameters:
- name: id
in: path
description: The ID of the insight to retrieve
required: true
style: simple
explode: false
schema:
type: string
responses:
'200':
description: The insight with the given ID
content:
application/json:
schema:
$ref: '#/components/schemas/Insight'
'400':
$ref: '#/components/responses/ErrorResponse400'
'401':
$ref: '#/components/responses/ErrorResponse401'
'403':
$ref: '#/components/responses/ErrorResponse403'
'404':
description: Insight not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseGeneric'
default:
$ref: '#/components/responses/ErrorResponse'
x-mabl-action: Read::Insight
put:
tags:
- Insight
summary: Put Insight
description: Used to put (create or set) insights
operationId: putInsight
parameters:
- name: id
in: path
description: The ID of the insight to put
required: true
style: simple
explode: false
schema:
type: string
requestBody:
description: The insight to put
content:
application/json:
schema:
$ref: '#/components/schemas/Insight'
required: true
responses:
'200':
description: The updated insight
content:
application/json:
schema:
$ref: '#/components/schemas/Insight'
'400':
$ref: '#/components/responses/ErrorResponse400'
'401':
$ref: '#/components/responses/ErrorResponse401'
'403':
$ref: '#/components/responses/ErrorResponse403'
default:
$ref: '#/components/responses/ErrorResponse'
x-mabl-action: Edit::Insight
delete:
tags:
- Insight
summary: Delete insight
description: Used to delete an existing insight
operationId: removeInsight
parameters:
- name: id
in: path
description: The ID of the insight to delete
required: true
style: simple
explode: false
schema:
type: string
responses:
'200':
description: The Insight was successfully removed
content:
application/json:
schema:
$ref: '#/components/schemas/Insight'
'401':
$ref: '#/components/responses/ErrorResponse401'
'403':
$ref: '#/components/responses/ErrorResponse403'
'404':
description: Insight not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseGeneric'
default:
$ref: '#/components/responses/ErrorResponse'
x-mabl-action: Delete::Insight
patch:
tags:
- Insight
summary: Update Insight
description: Used to update existing insights
operationId: updateInsight
parameters:
- name: id
in: path
description: The ID of the insight to update
required: true
style: simple
explode: false
schema:
type: string
- name: If-Match
in: header
description: If-Match header according to http/1.1 spec section 14.24
required: false
style: simple
explode: false
schema:
type: string
requestBody:
description: The update to apply
content:
application/json:
schema:
$ref: '#/components/schemas/Insight'
required: true
responses:
'200':
description: The updated insight
content:
application/json:
schema:
$ref: '#/components/schemas/Insight'
'400':
$ref: '#/components/responses/ErrorResponse400'
'401':
$ref: '#/components/responses/ErrorResponse401'
'403':
$ref: '#/components/responses/ErrorResponse403'
'404':
description: Insight not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseGeneric'
default:
$ref: '#/components/responses/ErrorResponse'
x-mabl-action: Edit::Insight
components:
responses:
ErrorResponse401:
description: User not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseGeneric'
ErrorResponse400:
description: Invalid or missing parameter
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseGeneric'
ErrorResponse403:
description: User not authorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseGeneric'
ErrorResponse:
description: Unknown error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseGeneric'
schemas:
InsightDailyAggregateBucket:
required:
- by_status
- by_type
- date
type: object
properties:
date:
type: integer
description: 'Inclusive start of the calendar day as Unix epoch milliseconds, aligned to
midnight in the request timezone
'
format: int64
by_type:
type: object
additionalProperties:
type: integer
format: int64
description: Map from insight type to count for this day
by_status:
type: object
additionalProperties:
type: integer
format: int64
description: Map from insight status to count for this day
description: Insight counts for a single calendar day
GuardrailApprovalKind:
type: string
description: Who decides a guardrail approval. SELF is decided by the person the agent acts for; WORKSPACE, for an agent acting for an API key, by a workspace owner or editor.
enum:
- SELF
- WORKSPACE
InsightQueryResult:
type: object
properties:
insights:
type: array
description: All insights that matched the query
readOnly: true
items:
$ref: '#/components/schemas/Insight'
cursor:
type: string
description: Cursor used for pagination
readOnly: true
GuardrailRefusal:
type: object
properties:
id:
type: string
description: The id of the guardrail policy that decided the refusal.
reason:
type: string
description: Why the policy refuses the request, written for the person the agent acts for.
decision_id:
type: string
description: The id of this decision in the guardrail decision log.
action:
type: string
description: The action the request was evaluated as, written Verb::Resource (for example Delete::Test), as declared by the operation's x-mabl-action extension.
policy_source:
type: string
description: 'Who set the deciding policy: workspace for a rule the workspace''s owners wrote, account for a rule set for the workspace''s account, mabl_agent_type for the agent type''s ceiling, and mabl_default for mabl''s own defaults.'
approval:
description: The approval for this request; present when error_code is approval_required and the approval could be recorded. Without it the request cannot be approved.
allOf:
- $ref: '#/components/schemas/GuardrailApprovalRef'
description: The guardrail policy that refused an agent request.
GuardrailApprovalState:
type: string
description: Where a guardrail approval stands. PENDING awaits a decision and expires undecided after 24 hours; APPROVED lets the agent repeat the request, as often as it does, for 20 minutes; DENIED refuses the same request for 20 minutes after the decision, after which asking again opens a new approval; CANCELLED means a person withdrew it while pending or revoked it while approved. EXPIRED and CANCELLED are final.
enum:
- PENDING
- APPROVED
- DENIED
- EXPIRED
- CANCELLED
Tag:
required:
- name
type: object
properties:
name:
type: string
description: tag name
x-mabl-scope: public
values:
maxItems: 32
minItems: 0
type: array
items:
type: string
InsightWorkspaceAggregateResult:
required:
- buckets
- timezone
type: object
properties:
buckets:
type: array
description: 'One entry per calendar day in the response timezone that had at least one
matching insight. Ordered by date ascending. Days with zero insights are omitted.
'
items:
$ref: '#/components/schemas/InsightDailyAggregateBucket'
timezone:
type: string
description: Normalized IANA timezone used for day bucket boundaries
description: Daily histogram of insight counts for a workspace
GuardrailApprovalRef:
type: object
properties:
id:
type: string
description: The approval's id.
state:
description: Where the approval stands.
allOf:
- $ref: '#/components/schemas/GuardrailApprovalState'
kind:
description: Who decides the approval.
allOf:
- $ref: '#/components/schemas/GuardrailApprovalKind'
request_expires_time:
type: integer
description: When the approval expires if nobody decides it, in epoch milliseconds.
format: int64
url:
type: string
description: The mabl app page where a person reviews the approval.
description: 'An approval a guardrail policy asks for. While it is PENDING, stop: give the person the url, tell them the request is waiting for approval, and do not repeat the request or poll in a loop. Once a person tells you it is APPROVED, repeat the identical request with the header X-Mabl-Approval set to id. DENIED means a person said no, so do not work around it.'
TestTypeEnum:
type: string
description: Type of test
enum:
- api
- browser
- performance
- mobile
- desktop
x-mabl-scope: public
ErrorResponseGeneric:
type: object
properties:
id:
type: string
x-mabl-scope: public
code:
maximum: 599
minimum: 100
type: integer
format: int32
x-mabl-scope: public
message:
type: string
x-mabl-scope: public
error_code:
type: string
description: Machine-readable reason for the error, present only when the API names one. Values are guardrail_blocked (a guardrail policy refused an agent request), approval_required (a guardrail policy requires a person to approve the request first).
guardrail:
description: The guardrail policy that refused the request; present only when error_code is guardrail_blocked or approval_required.
allOf:
- $ref: '#/components/schemas/GuardrailRefusal'
Insight:
type: object
properties:
id:
type: string
description: The ID of the insight
organization_id:
type: string
description: DEPRECATED - The ID of the organization to which this insight applies
workspace_id:
type: string
description: The ID of the workspace to which this insight applies
environment_id:
type: string
description: The ID of the environment to which this insight applies
application_id:
type: string
description: The ID of the application to which this insight applies
deployment_id:
type: string
description: The ID of the deployment to which this insight applies
credentials_id:
type: string
description: The ID of the credentials to which this insight applies
run_policy_id:
type: string
description: DEPRECATED - The ID of the run policy to which this insight applies
plan_id:
type: string
description: The ID of the plan to which this insight applies
test_script_id:
type: string
description: DEPRECATED - The ID of the test script to which this insight applies
branch_name:
type: string
description: The branch this insight applies to
journey_id:
type: string
description: The ID of the journey to which this insight applies
test_type:
$ref: '#/components/schemas/TestTypeEnum'
flow_id:
type: string
description: The ID of the flow, if any, to which this insight applies
flow_invariant_id:
type: string
description: The invariant ID of the flow, if any, to which this insight applies
step_id_in_journey:
type: string
description: The ID of the step within a specific journey that may repeat flows, if any, to which this insight applies
step_id_in_flow:
type: string
description: The ID of the step within its flow, if any, to which this insight applies
step_run_id:
type: string
description: The ID of a single execution of the step, if any, to which this insight applies
created_time:
type: integer
description: Time at which the insight was created
format: int64
created_by_id:
type: string
description: The ID of the user who created this insight
last_updated_time:
type: integer
description: time the insight was last updated
format: int64
last_updated_by_id:
type: string
description: The ID of the user who last updated this insight
model_id:
type: string
description: The ID of the state detection model that triggered this insight
model_version:
type: string
description: The version of the state detection model that triggered this insight
state_detection_group_id:
type: string
description: The ID of the group of state detections used to generate this insight
type:
type: string
description: The type of the insight
current_state:
type: string
description: The current state of the insight
status:
type: string
description: the state
enum:
- alert
- warning
- ok
- improvement
- info
category:
type: string
description: the category of the insight
resource:
type: string
description: the resource this insight relates to
features:
type: array
description: Features that resulted in this insight
items:
type: string
grouping_fields:
type: array
description: Measurement fields that were used to calculate the state_detection_group_id of this insight
items:
type: string
context:
type: object
additionalProperties:
type: string
description: The context used to generate this insight (key-value pairs)
last_status_times:
type: object
additionalProperties:
type: integer
format: int64
description: Map from status to the last time we observed this insight type with that status
window_start_time:
type: integer
description: Time associated with an upstream journey execution or system event (epoch milliseconds)
format: int64
tags:
type: array
description: Free text tags associated with this entity
items:
$ref: '#/components/schemas/Tag'
archived:
type: boolean
description: Archived insight true/false
useful:
type: boolean
description: Flag indicating whether or not the insight was useful to the user
correct:
type: boolean
description: Flag indicating whether or not the user considers the insight to be correct
run_policy_execution_id:
type: string
description: DEPRECATED - The ID of the run policy execution that triggered this insight
plan_run_id:
type: string
description: The ID of the plan run that triggered this insight
journey_run_id:
type: string
description: The ID of the journey run that triggered this insight
execution_runner_version:
type: string
description: the version of the runner the execution occured on
emulation_mode:
type: string
description: Desktop or mobile web emulation to which this insight applies
device_emulation_id:
type: string
description: Device ID to which this insight applies
device_emulation_preset_type:
type: string
description: Device preset type to which this insight applies
triggering_state_detection_id:
type: string
description: The ID of the state detection that triggered this insight
x-implements-interface:
- ActivityTrackingBaseEntity
- HasOrganizationId
- HasWorkspaceId
securitySchemes:
basicAuth:
type: http
scheme: basic
bearerAuth:
type: apiKey
name: Authorization
in: header