From 7de500d348bd808cc49065b069673513d36eaac4 Mon Sep 17 00:00:00 2001 From: Jonathan Pedoeem Date: Thu, 7 May 2026 16:56:50 -0400 Subject: [PATCH 1/2] Add request-analytics + track-group reference docs and refresh MCP tool list - Add reference/request-analytics.mdx documenting POST /api/public/v2/requests/analytics - Add reference/track-group.mdx documenting POST /rest/track-group (was in OpenAPI but had no reference page) - Wire both into the Tracking group in docs.json - Refresh agents/mcp.mdx tool table with the new MCP tools (skill collections, analytics, tracking, tool registry, patch-prompt-template-version, etc.) Co-Authored-By: Claude Opus 4.7 (1M context) --- agents/mcp.mdx | 14 +++--- docs.json | 2 + reference/request-analytics.mdx | 77 +++++++++++++++++++++++++++++++++ reference/track-group.mdx | 19 ++++++++ 4 files changed, 106 insertions(+), 6 deletions(-) create mode 100644 reference/request-analytics.mdx create mode 100644 reference/track-group.mdx diff --git a/agents/mcp.mdx b/agents/mcp.mdx index cbee521..45555fb 100644 --- a/agents/mcp.mdx +++ b/agents/mcp.mdx @@ -72,16 +72,18 @@ For clients that support stdio transport (e.g. Claude Desktop, Cursor), you can ## Available Tools -The MCP server exposes 37 tools covering all major PromptLayer features: +The MCP server exposes 64 tools covering all major PromptLayer features: | Category | Tools | |---|---| -| **Prompt Templates** | `get-prompt-template`, `get-prompt-template-raw`, `list-prompt-templates`, `publish-prompt-template`, `list-prompt-template-labels`, `create-prompt-label`, `move-prompt-label`, `delete-prompt-label`, `get-snippet-usage` | -| **Request Logs** | `get-request`, `search-request-logs`, `get-trace` | -| **Tracking** | `log-request`, `create-spans-bulk` | +| **Prompt Templates** | `get-prompt-template`, `get-prompt-template-raw`, `list-prompt-templates`, `publish-prompt-template`, `patch-prompt-template-version`, `list-prompt-template-labels`, `create-prompt-label`, `move-prompt-label`, `delete-prompt-label`, `get-snippet-usage` | +| **Request Logs** | `get-request`, `search-request-logs`, `get-trace`, `get-request-search-suggestions`, `get-request-analytics` | +| **Tracking** | `log-request`, `create-spans-bulk`, `track-prompt`, `track-score`, `track-metadata`, `track-group` | | **Datasets** | `list-datasets`, `get-dataset-rows`, `create-dataset-group`, `create-dataset-version-from-file`, `create-dataset-version-from-filter-params`, `create-draft-dataset-version`, `add-request-log-to-dataset`, `save-draft-dataset-version` | -| **Evaluations** | `list-evaluations`, `get-evaluation-rows`, `create-report`, `run-report`, `get-report`, `get-report-score`, `update-report-score-card`, `delete-reports-by-name` | -| **Agents** | `list-workflows`, `create-workflow`, `patch-workflow`, `run-workflow`, `get-workflow-version-execution-results`, `get-workflow` | +| **Evaluations** | `list-evaluations`, `get-evaluation-rows`, `create-report`, `run-report`, `get-report`, `get-report-score`, `add-report-column`, `edit-report-column`, `delete-report-column`, `update-report-score-card`, `rename-report`, `delete-report`, `delete-reports-by-name` | +| **Agents** | `list-workflows`, `get-workflow`, `get-workflow-labels`, `create-workflow`, `patch-workflow`, `run-workflow`, `get-workflow-version-execution-results` | +| **Tool Registry** | `list-tool-registries`, `get-tool-registry`, `create-tool-registry`, `create-tool-version` | +| **Skill Collections** | `list-skill-collections`, `create-skill-collection`, `get-skill-collection`, `update-skill-collection`, `save-skill-collection-version` | | **Folders** | `create-folder`, `edit-folder`, `get-folder-entities`, `move-folder-entities`, `delete-folder-entities`, `resolve-folder-id` | ## Source Code diff --git a/docs.json b/docs.json index 30a0d96..093f676 100644 --- a/docs.json +++ b/docs.json @@ -209,10 +209,12 @@ "reference/get-trace", "reference/search-request-logs", "reference/search-request-suggestions", + "reference/request-analytics", "reference/log-request", "reference/track-prompt", "reference/track-score", "reference/track-metadata", + "reference/track-group", "reference/spans-bulk", "reference/otlp-ingest-traces" ] diff --git a/reference/request-analytics.mdx b/reference/request-analytics.mdx new file mode 100644 index 0000000..ede7a3b --- /dev/null +++ b/reference/request-analytics.mdx @@ -0,0 +1,77 @@ +--- +title: "Request Analytics" +openapi: "POST /api/public/v2/requests/analytics" +description: "Aggregate analytics across request logs — totals, time-series breakdowns, latency percentiles, and model/prompt breakdowns." +--- + +Get aggregated analytics for your request logs using the same filter syntax as [Search Request Logs](/reference/search-request-logs). The response is a set of pre-computed aggregations (not paginated rows), making it easy to power dashboards, alerts, or ad-hoc spend/latency questions. + +### Authentication + +This endpoint requires API key authentication via the `X-API-KEY` header. + +## Request body + +Same shape as `search-request-logs`: + +| Field | Type | Description | +|-------|------|-------------| +| `filter_group` | object | Structured AND/OR filter group. Same fields and operators as [Search Request Logs](/reference/search-request-logs#filters). | +| `q` | string | Free-text query applied alongside `filter_group`. | +| `sort_by` | string | Sort field (rarely affects analytics output but accepted for parity with search). | +| `sort_order` | `asc` \| `desc` | Sort direction. | + +## Response + +The response is an aggregated payload, not a paginated list. The exact shape includes: + +- **Totals**: `totalRequests`, `totalTokens`, `totalCost`, `averageLatency`, plus cache and thinking-token counts. +- **Time series (`stats`)**: per-bucket entries with `requests`, `tokens`, `inputTokens`, `outputTokens`, `cost`, `latency`, `cachedTokens`, `thinkingTokens`, `traceShare`, `statusCounts`, `outputShapeCounts` (json / toolCall / plainText), `avgTurnCount`, `avgToolCallCount`, and `toolCallCountP95`. +- **Latency percentiles (`latency`)**: `average_latency`, `p50_latency`, `p90_latency`, `p95_latency` keyed by bucket date. +- **Model breakdowns**: `mostUsedModels`, `modelRequestsByDay`, `latencyByModelByDay`. +- **Prompt template breakdowns**: `mostUsedPromptTemplates`, `promptTemplateRequestsByDay`, `latencyByPromptTemplateByDay`. +- **Time-series interval metadata**: `chartInterval` describing the bucket size used for the time series. + +Bucket size is selected automatically based on the filter time range (seconds → minutes → hours → days). + +## Example: spend on GPT-4o this week + +```bash +curl -X POST https://api.promptlayer.com/api/public/v2/requests/analytics \ + -H "X-API-KEY: your_api_key" \ + -H "Content-Type: application/json" \ + -d '{ + "filter_group": { + "logic": "AND", + "filters": [ + { "field": "engine", "operator": "is", "value": "gpt-4o" }, + { + "field": "request_start_time", + "operator": "between", + "value": ["2025-03-08T00:00:00Z", "2025-03-15T00:00:00Z"] + } + ] + } + }' +``` + +## Example: p90 latency for production traffic + +```json +{ + "filter_group": { + "logic": "AND", + "filters": [ + { "field": "tags", "operator": "contains", "value": "production" } + ] + } +} +``` + +Read the `latency.p90_latency` map from the response (per-bucket p90 latency in seconds). + +### Related + +- [Search Request Logs](/reference/search-request-logs) — paginated rows instead of aggregations. +- [Search Suggestions](/reference/search-request-suggestions) — autocomplete for filter values. +- [Analytics page](/why-promptlayer/analytics) — dashboard view powered by this same data. diff --git a/reference/track-group.mdx b/reference/track-group.mdx new file mode 100644 index 0000000..c6a0819 --- /dev/null +++ b/reference/track-group.mdx @@ -0,0 +1,19 @@ +--- +title: "Track Group" +openapi: "POST /rest/track-group" +--- + +Associate a request with a group ID. Useful for linking multiple related requests under a shared group identifier (e.g. all requests in a single user-facing operation). + +## Example Code +```python +import requests +response = requests.post( + "https://api.promptlayer.com/rest/track-group", + headers={"X-API-KEY": ""}, + json={ + "request_id": "", + "group_id": "" + }, +) +``` From 9d422b93031eddf4acb0caee8e01246b33ca6a3b Mon Sep 17 00:00:00 2001 From: Jonathan Pedoeem Date: Thu, 7 May 2026 17:04:28 -0400 Subject: [PATCH 2/2] Add request-analytics OpenAPI schema; share RequestLogQuery; drop track-group - Add /api/public/v2/requests/analytics path entry plus full request and response schemas (RequestAnalyticsResponse, RequestAnalyticsStat, RequestAnalyticsLatencyByDay, RequestAnalyticsDimensionLatency, RequestAnalyticsBreakdownEntry, RequestAnalyticsToolLatency). - Factor the shared filter/search/sort body into a `RequestLogQuery` component; both the analytics endpoint and SearchRequestLogsRequest now reference it (search extends it with page/per_page/include_prompt_name via allOf). - Drop the new track-group reference page (the endpoint is legacy and was not exposed through MCP); other already-published track-* pages stay. - Update agents/mcp.mdx tool count and tables to drop the legacy tracking tools that no longer ship in @promptlayer/mcp-server. Co-Authored-By: Claude Opus 4.7 (1M context) --- agents/mcp.mdx | 4 +- docs.json | 1 - openapi.json | 540 ++++++++++++++++++++++++++++++-- reference/request-analytics.mdx | 4 +- reference/track-group.mdx | 19 -- 5 files changed, 525 insertions(+), 43 deletions(-) delete mode 100644 reference/track-group.mdx diff --git a/agents/mcp.mdx b/agents/mcp.mdx index 45555fb..85c1b21 100644 --- a/agents/mcp.mdx +++ b/agents/mcp.mdx @@ -72,13 +72,13 @@ For clients that support stdio transport (e.g. Claude Desktop, Cursor), you can ## Available Tools -The MCP server exposes 64 tools covering all major PromptLayer features: +The MCP server exposes 60 tools covering all major PromptLayer features: | Category | Tools | |---|---| | **Prompt Templates** | `get-prompt-template`, `get-prompt-template-raw`, `list-prompt-templates`, `publish-prompt-template`, `patch-prompt-template-version`, `list-prompt-template-labels`, `create-prompt-label`, `move-prompt-label`, `delete-prompt-label`, `get-snippet-usage` | | **Request Logs** | `get-request`, `search-request-logs`, `get-trace`, `get-request-search-suggestions`, `get-request-analytics` | -| **Tracking** | `log-request`, `create-spans-bulk`, `track-prompt`, `track-score`, `track-metadata`, `track-group` | +| **Tracking** | `log-request`, `create-spans-bulk` | | **Datasets** | `list-datasets`, `get-dataset-rows`, `create-dataset-group`, `create-dataset-version-from-file`, `create-dataset-version-from-filter-params`, `create-draft-dataset-version`, `add-request-log-to-dataset`, `save-draft-dataset-version` | | **Evaluations** | `list-evaluations`, `get-evaluation-rows`, `create-report`, `run-report`, `get-report`, `get-report-score`, `add-report-column`, `edit-report-column`, `delete-report-column`, `update-report-score-card`, `rename-report`, `delete-report`, `delete-reports-by-name` | | **Agents** | `list-workflows`, `get-workflow`, `get-workflow-labels`, `create-workflow`, `patch-workflow`, `run-workflow`, `get-workflow-version-execution-results` | diff --git a/docs.json b/docs.json index 093f676..408be1b 100644 --- a/docs.json +++ b/docs.json @@ -214,7 +214,6 @@ "reference/track-prompt", "reference/track-score", "reference/track-metadata", - "reference/track-group", "reference/spans-bulk", "reference/otlp-ingest-traces" ] diff --git a/openapi.json b/openapi.json index 0fd1e3a..5716ece 100644 --- a/openapi.json +++ b/openapi.json @@ -5880,6 +5880,79 @@ } } }, + "/api/public/v2/requests/analytics": { + "post": { + "summary": "Request Analytics", + "operationId": "getRequestAnalytics", + "tags": [ + "tracking" + ], + "description": "Aggregate analytics across request logs — totals, time-series breakdowns, latency percentiles, and model/prompt/provider/tag breakdowns. Body is the same `RequestLogQuery` shape as `POST /api/public/v2/requests/search` but returns aggregated values instead of paginated rows.", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string" + }, + "description": "API key for authentication." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestLogQuery" + } + } + } + }, + "responses": { + "200": { + "description": "Aggregated analytics for the matching request logs.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestAnalyticsResponse" + } + } + } + }, + "400": { + "description": "Invalid filter or unsupported analytics filter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Authentication failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Invalid workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, "/api/public/v2/skill-collections": { "get": { "summary": "List Skill Collections", @@ -12713,10 +12786,10 @@ } } }, - "SearchRequestLogsRequest": { + "RequestLogQuery": { "type": "object", - "title": "SearchRequestLogsRequest", - "description": "Search and filter request logs with structured filters, free-text search, sorting, and pagination.", + "title": "RequestLogQuery", + "description": "Canonical request-log query payload — the filter / search / sort fields shared by `POST /api/public/v2/requests/search` (which also accepts pagination + `include_prompt_name`) and `POST /api/public/v2/requests/analytics`.", "properties": { "filter_group": { "nullable": true, @@ -12728,19 +12801,6 @@ "nullable": true, "description": "Free-text search query. Searches across the prompt input and LLM output text using fuzzy prefix matching." }, - "page": { - "type": "integer", - "minimum": 1, - "nullable": true, - "description": "Page number for pagination. Defaults to 1." - }, - "per_page": { - "type": "integer", - "minimum": 1, - "maximum": 25, - "nullable": true, - "description": "Number of results per page. Defaults to 10, maximum 25." - }, "sort_by": { "type": "string", "nullable": true, @@ -12752,7 +12812,7 @@ "latency_ms", "status" ], - "description": "Field to sort results by." + "description": "Field to sort results by. Does not affect aggregated output for `/requests/analytics`." }, "sort_order": { "type": "string", @@ -12762,14 +12822,456 @@ "desc" ], "description": "Sort direction. Must be provided together with sort_by." + } + } + }, + "RequestAnalyticsLatencyByDay": { + "type": "object", + "description": "Per-bucket latency percentiles in seconds. Keys are bucket dates (e.g. `2025-03-15`); values are seconds.", + "properties": { + "average_latency": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "p50_latency": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "p90_latency": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "p95_latency": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + } + }, + "RequestAnalyticsDimensionLatency": { + "type": "object", + "description": "Per-dimension (model / prompt template / provider) latency series. Each percentile is a list of `[date, seconds]` pairs.", + "properties": { + "average_latency": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + }, + "p50_latency": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + }, + "p90_latency": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + }, + "p95_latency": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + } + }, + "RequestAnalyticsStat": { + "type": "object", + "description": "One time-series bucket.", + "properties": { + "date": { + "type": "string", + "description": "ISO bucket key (e.g. `2025-03-15`)." + }, + "dateLabel": { + "type": "string", + "description": "Human-readable bucket label." + }, + "requests": { + "type": "integer" + }, + "tokens": { + "type": "integer" + }, + "inputTokens": { + "type": "integer" + }, + "outputTokens": { + "type": "integer" + }, + "cost": { + "type": "number" + }, + "latency": { + "type": "number", + "description": "Average latency in seconds." + }, + "cachedTokens": { + "type": "integer" + }, + "thinkingTokens": { + "type": "integer" + }, + "traceShare": { + "type": "number", + "description": "Fraction of requests in the bucket that have a trace." + }, + "statusCounts": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + }, + "outputShapeCounts": { + "type": "object", + "properties": { + "json": { + "type": "integer" + }, + "toolCall": { + "type": "integer" + }, + "plainText": { + "type": "integer" + } + } + }, + "avgTurnCount": { + "type": "number" + }, + "avgToolCallCount": { + "type": "number" }, - "include_prompt_name": { + "toolCallCountP95": { + "type": "number", + "nullable": true + } + } + }, + "RequestAnalyticsBreakdownEntry": { + "type": "object", + "description": "Aggregated breakdown row (provider / prompt / tag).", + "properties": { + "provider": { + "type": "string", + "description": "Set on provider breakdown rows." + }, + "promptId": { + "type": "string", + "description": "Set on prompt breakdown rows." + }, + "tag": { + "type": "string", + "description": "Set on tag breakdown rows." + }, + "requests": { + "type": "integer" + }, + "cost": { + "type": "number" + }, + "tokens": { + "type": "integer" + }, + "inputTokens": { + "type": "integer" + }, + "outputTokens": { + "type": "integer" + } + } + }, + "RequestAnalyticsToolLatency": { + "type": "object", + "description": "Per-tool latency stats.", + "properties": { + "toolName": { + "type": "string" + }, + "requests": { + "type": "integer" + }, + "avgLatencySeconds": { + "type": "number", + "nullable": true + }, + "minLatencySeconds": { + "type": "number", + "nullable": true + }, + "maxLatencySeconds": { + "type": "number", + "nullable": true + } + } + }, + "RequestAnalyticsResponse": { + "type": "object", + "title": "RequestAnalyticsResponse", + "description": "Aggregated analytics across the matching request logs. Bucket size is selected automatically based on the filter time range (seconds → minutes → hours → days).", + "required": [ + "success" + ], + "properties": { + "success": { "type": "boolean", + "enum": [ + true + ] + }, + "chartInterval": { + "type": "object", + "description": "Bucket-interval metadata describing how the time-series was bucketed.", + "properties": { + "interval": { + "type": "string" + }, + "bucketSizeMs": { + "type": "integer" + }, + "bucketMinutes": { + "type": "integer", + "nullable": true + } + } + }, + "averageLatency": { + "type": "number", + "description": "Overall average latency across all matching requests, in seconds." + }, + "totalCost": { + "type": "number" + }, + "totalTokens": { + "type": "integer" + }, + "totalRequests": { + "type": "integer" + }, + "totalCachedTokens": { + "type": "integer" + }, + "totalThinkingTokens": { + "type": "integer" + }, + "cacheTokenRatio": { + "type": "number", "nullable": true, - "description": "When true, includes the prompt template name in each result item. Defaults to false." + "description": "`totalCachedTokens / total_input_tokens`, or null when there are no input tokens." + }, + "stats": { + "type": "array", + "description": "Per-bucket time-series.", + "items": { + "$ref": "#/components/schemas/RequestAnalyticsStat" + } + }, + "mostUsedModels": { + "type": "array", + "description": "List of `[modelName, requestCount]` pairs ordered by usage.", + "items": { + "type": "array", + "items": {} + } + }, + "modelRequestsByDay": { + "type": "object", + "description": "Map of model name → list of `[date, requestCount]` pairs.", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "mostUsedPromptTemplates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "promptId": { + "type": "string" + }, + "requests": { + "type": "integer" + }, + "promptName": { + "type": "string", + "nullable": true + } + } + } + }, + "promptTemplateRequestsByDay": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "providerRequestsByDay": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "latency": { + "$ref": "#/components/schemas/RequestAnalyticsLatencyByDay" + }, + "latencyByModelByDay": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RequestAnalyticsDimensionLatency" + } + }, + "latencyByPromptTemplateByDay": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RequestAnalyticsDimensionLatency" + } + }, + "latencyByProviderByDay": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RequestAnalyticsDimensionLatency" + } + }, + "errorTypes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "errorType": { + "type": "string" + }, + "requests": { + "type": "integer" + } + } + } + }, + "providerBreakdown": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RequestAnalyticsBreakdownEntry" + } + }, + "promptBreakdown": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RequestAnalyticsBreakdownEntry" + } + }, + "tagsBreakdown": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RequestAnalyticsBreakdownEntry" + } + }, + "metadataKeysTop": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "requests": { + "type": "integer" + } + } + } + }, + "outputKeysTop": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "requests": { + "type": "integer" + } + } + } + }, + "toolsLatency": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RequestAnalyticsToolLatency" + } + }, + "toolsUsageBars": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "requests": { + "type": "integer" + } + } + } } } }, + "SearchRequestLogsRequest": { + "title": "SearchRequestLogsRequest", + "description": "Search and filter request logs with structured filters, free-text search, sorting, and pagination. Extends `RequestLogQuery` with pagination and `include_prompt_name`.", + "allOf": [ + { + "$ref": "#/components/schemas/RequestLogQuery" + }, + { + "type": "object", + "properties": { + "page": { + "type": "integer", + "minimum": 1, + "nullable": true, + "description": "Page number for pagination. Defaults to 1." + }, + "per_page": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "nullable": true, + "description": "Number of results per page. Defaults to 10, maximum 25." + }, + "include_prompt_name": { + "type": "boolean", + "nullable": true, + "description": "When true, includes the prompt template name in each result item. Defaults to false." + } + } + } + ] + }, "StructuredFilter": { "type": "object", "title": "StructuredFilter", diff --git a/reference/request-analytics.mdx b/reference/request-analytics.mdx index ede7a3b..5bde478 100644 --- a/reference/request-analytics.mdx +++ b/reference/request-analytics.mdx @@ -12,13 +12,13 @@ This endpoint requires API key authentication via the `X-API-KEY` header. ## Request body -Same shape as `search-request-logs`: +The body is `RequestLogQuery` — the canonical query payload also used by [Search Request Logs](/reference/search-request-logs) (search additionally accepts `page`, `per_page`, and `include_prompt_name`). | Field | Type | Description | |-------|------|-------------| | `filter_group` | object | Structured AND/OR filter group. Same fields and operators as [Search Request Logs](/reference/search-request-logs#filters). | | `q` | string | Free-text query applied alongside `filter_group`. | -| `sort_by` | string | Sort field (rarely affects analytics output but accepted for parity with search). | +| `sort_by` | string | Sort field. Does not affect aggregated output. | | `sort_order` | `asc` \| `desc` | Sort direction. | ## Response diff --git a/reference/track-group.mdx b/reference/track-group.mdx deleted file mode 100644 index c6a0819..0000000 --- a/reference/track-group.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Track Group" -openapi: "POST /rest/track-group" ---- - -Associate a request with a group ID. Useful for linking multiple related requests under a shared group identifier (e.g. all requests in a single user-facing operation). - -## Example Code -```python -import requests -response = requests.post( - "https://api.promptlayer.com/rest/track-group", - headers={"X-API-KEY": ""}, - json={ - "request_id": "", - "group_id": "" - }, -) -```