openapi: 3.0.3 info: title: Scout APM API description: Scout APM API for accessing application performance monitoring data version: "0.1" contact: name: Scout APM Support url: https://www.scoutapm.com email: support@scoutapm.com servers: - url: https://scoutapm.com/api/v0 description: Production API server security: - apiKeyHeader: [] paths: /apps: get: summary: List all applications description: Returns a list of all applications accessible with the provided API key operationId: listApps tags: - Applications responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/AppsListResponse' '403': $ref: '#/components/responses/Forbidden' /apps/{id}: get: summary: Get application details description: Returns details for a specific application operationId: getApp tags: - Applications parameters: - $ref: '#/components/parameters/AppId' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/AppDetailResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /apps/{id}/metrics: get: summary: List available metrics description: Returns a list of available metric types for the application operationId: listMetrics tags: - Metrics parameters: - $ref: '#/components/parameters/AppId' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/MetricsListResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /apps/{id}/metrics/{metric_type}: get: summary: Get metric data description: Returns time-series data for a specific metric type operationId: getMetric tags: - Metrics parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/MetricType' - $ref: '#/components/parameters/FromTimestamp' - $ref: '#/components/parameters/ToTimestamp' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/MetricDataResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/endpoints: get: summary: List application endpoints description: > Returns a list of endpoints for the application. With no `sort_by`/`limit`/`offset` parameters the full listing is returned as an array in `results` (original ordering preserved), exactly as before. When any of those parameters is supplied, `results` becomes an object with `endpoints`, `count`, `total_count`, and `has_more` for pagination. operationId: listEndpoints tags: - Endpoints parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/FromTimestamp' - $ref: '#/components/parameters/ToTimestamp' - $ref: '#/components/parameters/EndpointSortBy' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: > Successful response. The `results` shape depends on whether pagination parameters were supplied (see the operation description). content: application/json: schema: oneOf: - $ref: '#/components/schemas/EndpointsListResponse' - $ref: '#/components/schemas/PaginatedEndpointsListResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/endpoints/{endpoint}/metrics/{metric_type}: get: summary: Get endpoint metrics description: Returns metric data for a specific endpoint operationId: getEndpointMetrics tags: - Endpoints parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/Endpoint' - $ref: '#/components/parameters/MetricType' - $ref: '#/components/parameters/FromTimestamp' - $ref: '#/components/parameters/ToTimestamp' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/MetricDataResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/endpoints/{endpoint}/traces: get: summary: List traces for endpoint description: > Returns traces for a specific endpoint within 7 days, slowest first. Paginated with limit/offset (up to 100 per page). operationId: listEndpointTraces tags: - Traces parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/Endpoint' - $ref: '#/components/parameters/FromTimestamp' - $ref: '#/components/parameters/ToTimestamp' - $ref: '#/components/parameters/PageLimit' - $ref: '#/components/parameters/PageOffset' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/TracesListResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/jobs: get: summary: List background jobs description: > Returns background jobs for the application with performance metrics, sorted by time consumed. With no `limit`/`offset` parameters every job is returned as an array in `results`, exactly as before. When either parameter is supplied, `results` becomes an object with `jobs`, `count`, `total_count`, and `has_more` for pagination. operationId: listJobs tags: - Jobs parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/FromTimestamp' - $ref: '#/components/parameters/ToTimestamp' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: > Successful response. The `results` shape depends on whether pagination parameters were supplied (see the operation description). content: application/json: schema: oneOf: - $ref: '#/components/schemas/JobsListResponse' - $ref: '#/components/schemas/PaginatedJobsListResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/jobs/{job_id}/metrics: get: summary: List available job metrics description: Returns a list of available metric types for background jobs operationId: listJobMetrics tags: - Jobs parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/JobId' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/JobMetricsListResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /apps/{id}/jobs/{job_id}/metrics/{metric_type}: get: summary: Get job metrics description: Returns metric data for a specific background job operationId: getJobMetrics tags: - Jobs parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/JobId' - $ref: '#/components/parameters/JobMetricType' - $ref: '#/components/parameters/FromTimestamp' - $ref: '#/components/parameters/ToTimestamp' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/MetricDataResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/jobs/{job_id}/traces: get: summary: List traces for job description: > Returns traces for a specific background job within 7 days, slowest first. Paginated with limit/offset (up to 100 per page). operationId: listJobTraces tags: - Jobs parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/JobId' - $ref: '#/components/parameters/FromTimestamp' - $ref: '#/components/parameters/ToTimestamp' - $ref: '#/components/parameters/PageLimit' - $ref: '#/components/parameters/PageOffset' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/JobTracesListResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/traces/{trace_id}: get: summary: Get trace details description: > Returns detailed information for a specific endpoint or job trace. Traces are retained for 7 days. operationId: getTrace tags: - Traces parameters: - $ref: '#/components/parameters/AppId' - name: trace_id in: path required: true description: >- Trace id from the endpoint traces list (/apps/{id}/endpoints/{endpoint_id}/traces) or the job traces list (/apps/{id}/jobs/{job_id}/traces). For job traces, total_call_time is the job's duration in milliseconds and uri repeats metric_name. schema: type: integer - name: compact in: query required: false description: >- Return a smaller span tree sized for LLM context windows. Identical sibling spans collapse into one node with a count, redundant and empty fields are dropped, and large trees keep the 100 slowest nodes. Spans follow CompactTraceSpan instead of TraceSpan. schema: type: boolean default: false responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/TraceDetailResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /apps/{id}/error_groups: get: summary: List error groups description: Returns error groups for the application (max 100, within 30 days) operationId: listErrorGroups tags: - Errors parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/FromTimestamp' - $ref: '#/components/parameters/ToTimestamp' - name: endpoint in: query required: false description: Base64 URL-encoded endpoint or job filter (e.g., Y29udHJvbGxlci9hY3Rpb24= [controller/action]) schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/ErrorGroupsListResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/error_groups/{error_id}: get: summary: Get error group details description: Returns details for a specific error group operationId: getErrorGroup tags: - Errors parameters: - $ref: '#/components/parameters/AppId' - name: error_id in: path required: true description: Error group identifier schema: type: integer responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/ErrorGroupDetailResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/error_groups/{error_id}/errors: get: summary: Get errors in group description: Returns individual errors within an error group (max 100) operationId: getErrorGroupErrors tags: - Errors parameters: - $ref: '#/components/parameters/AppId' - name: error_id in: path required: true description: Error group identifier schema: type: integer responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/ErrorsListResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/anomaly_events: get: summary: List anomaly events description: > Returns anomaly events for the application overlapping the given timeframe (within 30 days), newest first. Paginated with limit/offset (up to 100 per page). operationId: listAnomalyEvents tags: - Anomalies parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/FromTimestamp' - $ref: '#/components/parameters/ToTimestamp' - name: state in: query required: false description: Filter by event state schema: type: string enum: [open, closed, all] default: all - name: metric in: query required: false description: Filter by metric (e.g., response_time, error_rate) schema: type: string - name: endpoint in: query required: false description: Filter by endpoint name (exact match) schema: type: string - $ref: '#/components/parameters/PageLimit' - $ref: '#/components/parameters/PageOffset' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/AnomalyEventsListResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/anomaly_events/{anomaly_event_id}: get: summary: Get anomaly event details description: Returns details for a specific anomaly event, including joined smart monitor and deploy context operationId: getAnomalyEvent tags: - Anomalies parameters: - $ref: '#/components/parameters/AppId' - name: anomaly_event_id in: path required: true description: Anomaly event identifier schema: type: integer responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/AnomalyEventDetailResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /apps/{id}/insights: get: summary: Get current insights description: Returns all insight types for the application (cached for 5 minutes) operationId: getAllInsights tags: - Insights parameters: - $ref: '#/components/parameters/AppId' - name: limit in: query required: false description: Maximum number of items per insight type schema: type: integer default: 20 responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/InsightsResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /apps/{id}/insights/{type}: get: summary: Get current insights by type description: Returns data for a specific insight type operationId: getInsightByType tags: - Insights parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/InsightType' - name: limit in: query required: false description: Maximum number of items schema: type: integer default: 20 responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/InsightTypeResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /apps/{id}/insights/history: get: summary: Get insights history description: Returns historical insights data with cursor-based pagination operationId: getInsightsHistory tags: - Insights parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/ToTimestamp' - $ref: '#/components/parameters/FromTimestamp' - name: limit in: query required: false description: Maximum number of items per page schema: type: integer default: 10 - name: pagination_cursor in: query required: false description: Cursor for pagination (insight ID) schema: type: integer - name: pagination_direction in: query required: false description: Pagination direction schema: type: string enum: [forward, backward] default: forward - name: pagination_page in: query required: false description: Page number for pagination schema: type: integer default: 1 responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/InsightsHistoryResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' /apps/{id}/insights/history/{type}: get: summary: Get insights history by type description: Returns historical insights data filtered by insight type with cursor-based pagination operationId: getInsightsHistoryByType tags: - Insights parameters: - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/InsightType' - $ref: '#/components/parameters/ToTimestamp' - $ref: '#/components/parameters/FromTimestamp' - name: limit in: query required: false description: Maximum number of items per page schema: type: integer default: 10 - name: pagination_cursor in: query required: false description: Cursor for pagination (insight ID) schema: type: integer - name: pagination_direction in: query required: false description: Pagination direction schema: type: string enum: [forward, backward] default: forward - name: pagination_page in: query required: false description: Page number for pagination schema: type: integer default: 1 responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/InsightsHistoryResponse' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' components: securitySchemes: apiKeyHeader: type: apiKey in: header name: X-SCOUT-API description: API key provided in request header parameters: AppId: name: id in: path required: true description: Application identifier schema: type: integer example: 1234 MetricType: name: metric_type in: path required: true description: Type of metric to retrieve schema: type: string enum: [apdex, response_time, response_time_95th, errors, throughput, queue_time] Endpoint: name: endpoint in: path required: true description: Base64 URL-encoded endpoint identifier (e.g., Y29udHJvbGxlci9hY3Rpb24= [controller/action]) schema: type: string FromTimestamp: name: from in: query required: true description: Start time in ISO 8601 format schema: type: string format: date-time example: 2026-11-28T03:58:48Z ToTimestamp: name: to in: query required: true description: End time in ISO 8601 format schema: type: string format: date-time example: 2026-11-29T03:58:48Z EndpointSortBy: name: sort_by in: query required: false description: > Sort the listing in descending order by this field. Omit to preserve the listing's natural ordering. Supplying this switches the response to the paginated shape. schema: type: string enum: [time_consumed, response_time, throughput, error_rate] Limit: name: limit in: query required: false description: > Maximum number of items to return. Omit for the full listing (no default limit). Supplying this switches the response to the paginated shape. schema: type: integer minimum: 1 maximum: 1000000 example: 50 Offset: name: offset in: query required: false description: > Number of items to skip, for pagination. Supplying this switches the response to the paginated shape. schema: type: integer minimum: 0 maximum: 1000000 default: 0 PageLimit: name: limit in: query required: false description: Maximum number of items to return schema: type: integer minimum: 1 maximum: 100 default: 100 PageOffset: name: offset in: query required: false description: Number of items to skip, for pagination schema: type: integer minimum: 0 maximum: 1000000 default: 0 JobId: name: job_id in: path required: true description: Base64 URL-encoded job identifier (e.g., ZGVmYXVsdC9EdW1teVdvcmtlcg== [default/DummyWorker]) schema: type: string JobMetricType: name: metric_type in: path required: true description: Type of job metric to retrieve schema: type: string enum: [throughput, execution_time, latency, errors, allocations] InsightType: name: type in: path required: true description: Insight type schema: type: string enum: [n_plus_one, memory_bloat, slow_query] schemas: StandardHeader: type: object properties: status: type: object properties: code: type: integer example: 200 message: type: string example: "OK" required: - code - message apiVersion: type: string example: "0.1" required: - status - apiVersion App: type: object properties: id: type: integer example: 1234 name: type: string example: "My Application" last_reported_at: type: string format: date-time nullable: true required: - id - name AppsListResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: apps: type: array items: $ref: '#/components/schemas/App' required: - apps required: - header - results AppDetailResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: app: $ref: '#/components/schemas/App' required: - app required: - header - results MetricsListResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: availableMetrics: type: array items: type: string enum: [apdex, response_time, response_time_95th, errors, throughput, queue_time] required: - availableMetrics required: - header - results MetricDataResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: summaries: type: object additionalProperties: type: object description: Summary statistics for the metric series: type: object additionalProperties: type: array items: type: object properties: timestamp: type: string format: date-time value: type: number required: - header - results Endpoint: type: object properties: name: type: string example: "UsersController#index" 95th_percentile: type: number nullable: true percentage_of_total: type: number formatted_method_name: type: string throughput: type: number response_time: type: number error_rate: type: number max_allocations: type: integer nullable: true link: type: string example: "/apps/1234/endpoints/UsersController" required: - name - 95th_percentile - max_allocations - response_time - formatted_method_name - throughput - error_rate - link EndpointsListResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: array items: $ref: '#/components/schemas/Endpoint' required: - header - results PaginatedEndpointsListResponse: type: object description: > Returned when any of sort_by/limit/offset is supplied. properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: endpoints: type: array items: $ref: '#/components/schemas/Endpoint' count: type: integer description: Number of endpoints in this page total_count: type: integer description: Total number of endpoints across all pages has_more: type: boolean description: Whether more endpoints exist beyond this page required: - endpoints - count - total_count - has_more required: - header - results Job: type: object properties: full_name: type: string example: "default/DummyWorker" name: type: string example: "DummyWorker" queue: type: string example: "default" job_id: type: string description: Base64 URL-encoded job identifier for use with other endpoints throughput: type: number description: Jobs per minute execution_time: type: number description: Average execution time in milliseconds time_consumed: type: number description: Fraction of total job time consumed by this job latency: type: number description: Average queue latency in seconds required: - full_name - name - queue - throughput - execution_time JobsListResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: array items: $ref: '#/components/schemas/Job' required: - header - results PaginationMeta: type: object properties: count: type: integer description: Number of items in this page total_count: type: integer description: Total number of items across all pages has_more: type: boolean description: Whether more items exist beyond this page required: - count - total_count - has_more PaginatedJobsListResponse: type: object description: > Returned when limit or offset is supplied. properties: header: $ref: '#/components/schemas/StandardHeader' results: allOf: - type: object properties: jobs: type: array items: $ref: '#/components/schemas/Job' required: - jobs - $ref: '#/components/schemas/PaginationMeta' required: - header - results JobMetricsListResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: availableMetrics: type: array items: type: string enum: [throughput, execution_time, latency, errors, allocations] required: - availableMetrics required: - header - results JobTrace: type: object properties: id: type: integer time: type: string format: date-time duration: type: number description: Execution duration in milliseconds name: type: string description: Job class name queue: type: string description: Queue name metric_name: type: string context: type: object additionalProperties: true JobTracesListResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: allOf: - type: object properties: traces: type: array items: $ref: '#/components/schemas/JobTrace' required: - traces - $ref: '#/components/schemas/PaginationMeta' required: - header - results Trace: type: object properties: id: type: integer time: type: string format: date-time total_call_time: type: number mem_delta: type: number nullable: true metric_name: type: string uri: type: string nullable: true context: type: object additionalProperties: true TracesListResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: allOf: - type: object properties: traces: type: array items: $ref: '#/components/schemas/Trace' required: - traces - $ref: '#/components/schemas/PaginationMeta' required: - header - results TraceDetail: type: object properties: id: type: integer transaction_id: type: string nullable: true description: Only present in v2 traces hostname: type: string nullable: true description: Only present in v2 traces time: type: string format: date-time total_call_time: type: number mem_delta: type: number nullable: true metric_name: type: string uri: type: string nullable: true context: type: object additionalProperties: true git_sha: type: string nullable: true allocations_count: type: integer nullable: true limited: type: boolean description: Indicates if the trace was limited due too many spans span_count: type: integer description: Spans in the trace before compaction. compact=true only. truncated: type: boolean description: Whether any spans were left out (see omitted_spans). compact=true only. omitted_spans: type: integer description: >- Spans left out of the tree: dropped to fit the node cap, or orphaned (parent missing from the payload). compact=true only. legacy_format: type: boolean description: >- Present (true) on v1 traces, which have no span tree: all job traces, and request traces from agents that don't send spans. spans is empty; use timing_breakdown, allocation_breakdown, and operations instead. timing_breakdown: type: array description: >- v1 traces only. Exclusive time per layer (ActiveRecord, View, ...), largest first. compact=true drops zero layers and rounds to 0.01 ms. items: type: object properties: layer: type: string exclusive_duration_ms: type: number call_count: type: integer allocation_breakdown: type: array description: >- v1 traces only. Exclusive allocations per layer, largest first. Empty when the agent didn't record allocations. compact=true drops zero layers. items: type: object properties: layer: type: string allocations: type: integer call_count: type: integer operations: type: array description: >- v1 traces only. One row per operation the agent recorded, slowest first by exclusive time. Repeat calls to the same operation and statement are merged into call_count; there are no start times or nesting. compact=true keeps the 100 slowest and omits null fields. items: type: object properties: operation: type: string description: Layer and name, e.g. ActiveRecord/User/find call_count: type: integer exclusive_duration_ms: type: number description: type: string nullable: true description: SQL, URL, or other detail the agent recorded backtrace: type: array nullable: true items: type: string omitted_operations: type: integer description: Operations left out to fit the cap. compact=true only, present only when > 0. spans: type: array description: >- Root spans of the trace. Each span nests its own children. TraceSpan by default; CompactTraceSpan with compact=true. Empty on v1 traces. items: anyOf: - $ref: '#/components/schemas/TraceSpan' - $ref: '#/components/schemas/CompactTraceSpan' TraceSpan: type: object properties: id: type: string parent_id: type: string nullable: true description: Span ID of the direct parent. Null for a root span. operation: type: string description: Instrumented operation name, e.g. "ActiveRecord/User/find" type: type: string description: Operation category, e.g. "ActiveRecord", "View", "Controller" description: type: string nullable: true description: Query text, URL, or other detail, when the agent captured one args: type: object nullable: true additionalProperties: true start_time: type: string format: date-time end_time: type: string format: date-time duration_ms: type: number description: Total time spent in this span, in milliseconds exclusive_duration_ms: type: number description: >- Time spent in this span excluding its children, in milliseconds. Overlapping children are counted once. allocations: type: number description: Objects allocated during this span tags: type: object additionalProperties: true backtrace: type: array nullable: true description: Captured for slow spans only. Null otherwise. items: type: object properties: file: type: string line: type: string function: type: string children: type: array items: $ref: '#/components/schemas/TraceSpan' CompactTraceSpan: type: object description: >- A span, or a group of identical sibling spans (same operation, description, and args), returned with compact=true. Fields that would be null or empty are omitted, as are zero allocations and omitted_spans. required: - operation - duration_ms properties: operation: type: string description: >- Instrumented operation name. ActiveRecord/SQL/other spans name their model when known, e.g. "ActiveRecord/User/query". description: type: string args: type: object additionalProperties: true count: type: integer description: Spans collapsed into this node. Omitted when 1. duration_ms: type: number description: Total time across the collapsed spans, in milliseconds avg_duration_ms: type: number description: Mean time per collapsed span. Present only with count. exclusive_duration_ms: type: number description: Time excluding children, in milliseconds. Omitted when equal to duration_ms. allocations: type: number tags: type: object description: >- Custom tags shared by every collapsed span. Tags already reported in other fields (SQL, allocation counters, backtrace, args) are left out. additionalProperties: true backtrace: type: array description: Frames formatted as "file:line:in function". Captured for slow spans only. items: type: string omitted_spans: type: integer description: Spans under this node dropped to fit the node cap children: type: array items: $ref: '#/components/schemas/CompactTraceSpan' TraceDetailResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: trace: $ref: '#/components/schemas/TraceDetail' required: - trace required: - header - results ErrorGroup: type: object properties: id: type: integer name: type: string message: type: string status: type: string errors_count: type: integer last_error_at: type: string format: date-time request_components: type: array items: type: string request_uri: type: string nullable: true app_environment: type: string nullable: true ErrorGroupsListResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: error_groups: type: array items: $ref: '#/components/schemas/ErrorGroup' required: - error_groups required: - header - results ErrorGroupDetail: allOf: - $ref: '#/components/schemas/ErrorGroup' - type: object properties: latest_error: $ref: '#/components/schemas/Error' type: object required: [latest_error] ErrorGroupDetailResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: error_group: $ref: '#/components/schemas/ErrorGroupDetail' required: - error_group required: - header - results Error: type: object properties: id: type: integer message: type: string created_at: type: string format: date-time request_params: type: object additionalProperties: true nullable: true request_uri: type: string nullable: true location: type: string nullable: true request_session: type: object additionalProperties: true nullable: true trace: type: array items: type: string context: type: object additionalProperties: true ErrorsListResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: errors: type: array items: $ref: '#/components/schemas/Error' required: - errors required: - header - results AnomalyEvent: type: object properties: id: type: integer metric: type: string endpoint: type: string nullable: true direction: type: string enum: [high, low] severity: type: string enum: [warning, critical] started_at: type: string format: date-time ended_at: type: string format: date-time nullable: true last_seen_at: type: string format: date-time z_score: type: number current_value: type: number baseline_value: type: number multiplier: type: number nullable: true open: type: boolean description: type: string smart_monitor_id: type: integer nullable: true deploy_id: type: integer nullable: true AnomalyEventDetail: allOf: - $ref: '#/components/schemas/AnomalyEvent' - type: object properties: baseline_std_dev: type: number nullable: true duration_minutes: type: integer nullable: true smart_monitor: type: object nullable: true properties: id: type: integer name: type: string kind: type: string severity_threshold: type: number format: float duration_minutes: type: integer deploy: type: object nullable: true properties: id: type: integer sha: type: string deployed_at: type: string format: date-time AnomalyEventsListResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: allOf: - type: object properties: anomaly_events: type: array items: $ref: '#/components/schemas/AnomalyEvent' required: - anomaly_events - $ref: '#/components/schemas/PaginationMeta' required: - header - results AnomalyEventDetailResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: anomaly_event: $ref: '#/components/schemas/AnomalyEventDetail' required: - anomaly_event required: - header - results InsightTimeframe: type: object properties: start_time: type: string format: date-time end_time: type: string format: date-time duration_minutes: type: integer required: - start_time - end_time - duration_minutes InsightSummary: type: object properties: count: type: integer description: Total number of insights new_count: type: integer description: Number of new insights items: type: array items: type: object additionalProperties: true required: - count - new_count - items InsightsResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: timeframe: $ref: '#/components/schemas/InsightTimeframe' insights: type: object properties: n_plus_one: $ref: '#/components/schemas/InsightSummary' memory_bloat: $ref: '#/components/schemas/InsightSummary' slow_query: $ref: '#/components/schemas/InsightSummary' required: - timeframe - insights required: - header - results InsightTypeResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: timeframe: $ref: '#/components/schemas/InsightTimeframe' total_count: type: integer description: Total number of insights insight_type: type: string enum: [n_plus_one, memory_bloat, slow_query] new_count: type: integer description: Number of new insights items: type: object additionalProperties: true required: - timeframe - items - total_count - insight_type - new_count required: - header - results InsightHistory: type: object properties: id: type: integer description: Unique insight identifier insight_type: type: string description: Type of insight enum: [n_plus_one, memory_bloat, slow_query] first_seen_at: type: string format: date-time description: When the insight was first detected metric_name: type: string description: Name of the associated metric trace: $ref: '#/components/schemas/TraceDetail' fields: type: object additionalProperties: true description: Additional insight-specific data required: - id - first_seen_at - insight_type - metric_name - fields InsightHistoryPagination: type: object properties: has_more: type: boolean description: Whether more results are available pagination_cursor: type: integer nullable: true description: Cursor for next page of results next_pagination_page: type: integer nullable: true description: Next page number required: - has_more InsightsHistoryResponse: type: object properties: header: $ref: '#/components/schemas/StandardHeader' results: type: object properties: total_count: type: integer description: Total number of insights insights: type: array items: $ref: '#/components/schemas/InsightHistory' description: List of historical insights pagination: $ref: '#/components/schemas/InsightHistoryPagination' required: - total_count - insights - pagination required: - header - results responses: Forbidden: description: Forbidden - Invalid or missing API key content: application/json: schema: type: object properties: header: type: object properties: status: type: object properties: code: type: integer example: 403 message: type: string example: "Forbidden, check your API key" apiVersion: type: string example: "0.1" results: type: object example: {} NotFound: description: Resource not found content: application/json: schema: type: object properties: header: type: object properties: status: type: object properties: code: type: integer example: 404 message: type: string example: "Record Not Found" apiVersion: type: string example: "0.1" results: type: object example: {} UnprocessableEntity: description: Invalid request parameters content: application/json: schema: type: object properties: header: type: object properties: status: type: object properties: code: type: integer example: 422 message: type: string example: "Invalid timeframe parameters" apiVersion: type: string example: "0.1" results: type: object example: {} tags: - name: Applications description: Operations related to applications - name: Metrics description: Operations for retrieving application metrics - name: Endpoints description: Operations for endpoint monitoring - name: Jobs description: Operations for background job monitoring - name: Traces description: Operations for trace analysis - name: Errors description: Operations for error monitoring - name: Insights description: Operations for performance insights