diff --git a/specification/resources/signals/examples/curl/signals_create_export.yml b/specification/resources/signals/examples/curl/signals_create_export.yml index b99a68d39..5b8d0ed6f 100644 --- a/specification/resources/signals/examples/curl/signals_create_export.yml +++ b/specification/resources/signals/examples/curl/signals_create_export.yml @@ -1,7 +1,15 @@ lang: cURL source: |- + # Export one Harness Runtime environment curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"agent_id":"01a0f3d5-b58d-7c99-a743-7ca0397b7f5d","signal_type":["ExecutionFailureToolNotFound"]}' \ "https://api.digitalocean.com/v1/signals/exports" + + # Export the team's Serverless Inference Signals (no agent_id) + curl -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + -d '{"type":"inference","signal_type":["MisalignmentCorrection"]}' \ + "https://api.digitalocean.com/v1/signals/exports" diff --git a/specification/resources/signals/models/create_export_request.yml b/specification/resources/signals/models/create_export_request.yml index 575d24a19..0f44baf3e 100644 --- a/specification/resources/signals/models/create_export_request.yml +++ b/specification/resources/signals/models/create_export_request.yml @@ -1,10 +1,25 @@ type: object description: Request body to create a new signals data export. properties: + type: + type: string + description: >- + The scope of the export. `agent` exports Signals conversations for one + Harness Runtime environment and requires `agent_id`. `inference` exports + Serverless Inference Signals conversations for the whole team (team-wide; + omit `agent_id`). Defaults to `agent` when `agent_id` is provided and to + `inference` when it is omitted. + enum: + - agent + - inference + example: agent agent_id: type: string format: uuid - description: The environment whose data should be exported. For Harness Runtime, this is the Environment Config ID. + description: >- + The environment whose data should be exported. For Harness Runtime, this + is the Environment Config ID. Required when `type` is `agent`; must be + omitted when `type` is `inference`. example: 01a0f3d5-b58d-7c99-a743-7ca0397b7f5d signal_type: type: array @@ -33,5 +48,3 @@ properties: format: date-time description: Include only sessions that started at or before this timestamp. example: "2026-10-01T00:00:00Z" -required: - - agent_id diff --git a/specification/resources/signals/models/export_job.yml b/specification/resources/signals/models/export_job.yml index 7c9a28a68..329bee1c1 100644 --- a/specification/resources/signals/models/export_job.yml +++ b/specification/resources/signals/models/export_job.yml @@ -6,10 +6,22 @@ properties: format: uuid description: The unique identifier for the export job. example: 9f13c09c-c877-436b-9863-dcc39c9dd737 + type: + type: string + description: >- + The scope of the export. `agent` covers one Harness Runtime environment; + `inference` covers the team's Serverless Inference Signals conversations. + enum: + - agent + - inference + example: agent agent_id: type: string format: uuid - description: The environment whose data is being exported. For Harness Runtime, this is the Environment Config ID. + description: >- + The environment whose data is being exported. For Harness Runtime, this + is the Environment Config ID. Not meaningful for `inference` exports; use + `type` to distinguish the export scope. example: 01a0f3d5-b58d-7c99-a743-7ca0397b7f5d status: type: string diff --git a/specification/resources/signals/responses/export_job_response.yml b/specification/resources/signals/responses/export_job_response.yml index ada9e3a19..e0adcc444 100644 --- a/specification/resources/signals/responses/export_job_response.yml +++ b/specification/resources/signals/responses/export_job_response.yml @@ -14,6 +14,7 @@ content: $ref: '../models/export_job.yml' example: export_id: 9f13c09c-c877-436b-9863-dcc39c9dd737 + type: agent agent_id: 01a0f3d5-b58d-7c99-a743-7ca0397b7f5d status: complete filters: diff --git a/specification/resources/signals/responses/list_exports_response.yml b/specification/resources/signals/responses/list_exports_response.yml index 92c494b04..5bb94a3ac 100644 --- a/specification/resources/signals/responses/list_exports_response.yml +++ b/specification/resources/signals/responses/list_exports_response.yml @@ -35,6 +35,7 @@ content: - cursor: eyJ0ZWFtX2lkIjozOTQ0OTk0Nn0= node: export_id: 9f13c09c-c877-436b-9863-dcc39c9dd737 + type: agent agent_id: 01a0f3d5-b58d-7c99-a743-7ca0397b7f5d status: complete filters: diff --git a/specification/resources/signals/signals_create_export.yml b/specification/resources/signals/signals_create_export.yml index 89b2f74b7..6a8c4201c 100644 --- a/specification/resources/signals/signals_create_export.yml +++ b/specification/resources/signals/signals_create_export.yml @@ -4,10 +4,12 @@ summary: Create an Export Job description: | To create a new signals data export, send a POST request to - `/v1/signals/exports` with an `agent_id` in the request body. You may - optionally filter the export by `signal_type`, `session_ids`, `start_time`, - and `end_time`. Use the export options endpoint to discover available signal - types. + `/v1/signals/exports`. To export one Harness Runtime environment, include its + `agent_id` (`type` defaults to `agent`). To export the team's Serverless + Inference Signals conversations, set `type` to `inference` and omit + `agent_id`. You may optionally filter the export by `signal_type`, + `session_ids`, `start_time`, and `end_time`. Use the export options endpoint + to discover available signal types. The export job runs asynchronously. Poll the get export endpoint to check its status. When complete, use the download endpoint to retrieve a @@ -22,10 +24,19 @@ requestBody: application/json: schema: $ref: 'models/create_export_request.yml' - example: - agent_id: 01a0f3d5-b58d-7c99-a743-7ca0397b7f5d - signal_type: - - ExecutionFailureToolNotFound + examples: + agent: + summary: Export one Harness Runtime environment + value: + agent_id: 01a0f3d5-b58d-7c99-a743-7ca0397b7f5d + signal_type: + - ExecutionFailureToolNotFound + inference: + summary: Export the team's Serverless Inference Signals + value: + type: inference + signal_type: + - MisalignmentCorrection responses: '201':