From 8588af4e1bc09e945e15a282ae988f839b2bf466 Mon Sep 17 00:00:00 2001 From: aupadhyay-shark Date: Fri, 9 Oct 2026 17:51:06 +0530 Subject: [PATCH] =?UTF-8?q?signals=20deletion:=20rename=20type=20managed?= =?UTF-8?q?=5Fagent=20=E2=86=92=20agent,=20simplify=20descriptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename enum value managed_agent → agent in models, examples, and responses to match the live prod API (cthulhu#180125). - Simplify operation descriptions to match the export endpoint style: short paragraphs, no tables in description blocks. - make bundle + make lint: 0 errors. Co-authored-by: Cursor --- .../examples/curl/signals_create_deletion.yml | 2 +- .../models/create_deletion_request.yml | 18 ++++----- .../resources/signals/models/deletion_job.yml | 35 +++++----------- .../deletion_job_accepted_response.yml | 5 +-- .../responses/deletion_job_response.yml | 2 +- .../responses/list_deletions_response.yml | 6 +-- .../signals/signals_create_deletion.yml | 40 ++++++------------- .../signals/signals_get_deletion.yml | 4 +- .../signals/signals_list_deletions.yml | 8 ++-- 9 files changed, 43 insertions(+), 77 deletions(-) diff --git a/specification/resources/signals/examples/curl/signals_create_deletion.yml b/specification/resources/signals/examples/curl/signals_create_deletion.yml index 522f3617b..1b847dd1f 100644 --- a/specification/resources/signals/examples/curl/signals_create_deletion.yml +++ b/specification/resources/signals/examples/curl/signals_create_deletion.yml @@ -3,5 +3,5 @@ source: |- curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ - -d '{"type":"managed_agent","team_id":12345678,"agent_id":"01a10d3f-2c09-764f-99f8-458e521627f3"}' \ + -d '{"type":"agent","team_id":12345678,"agent_id":"01a10d3f-2c09-764f-99f8-458e521627f3"}' \ "https://api.digitalocean.com/v1/signals/deletions" diff --git a/specification/resources/signals/models/create_deletion_request.yml b/specification/resources/signals/models/create_deletion_request.yml index aee479240..2812f5daf 100644 --- a/specification/resources/signals/models/create_deletion_request.yml +++ b/specification/resources/signals/models/create_deletion_request.yml @@ -4,26 +4,24 @@ properties: type: type: string description: >- - The scope of the deletion. `managed_agent` deletes the signals data - collected for one agent and requires `agent_id`. `inference` deletes the - signals data collected for the team's Serverless Inference requests and - must not include `agent_id`. + The scope of the deletion. `agent` deletes data for one agent and + requires `agent_id`. `inference` deletes data for the team's Serverless + Inference requests. enum: - - managed_agent + - agent - inference - example: managed_agent + example: agent team_id: type: integer format: int64 - description: The team whose data should be deleted. Must match the team of the authenticated token. + description: The team whose data should be deleted. Must match the authenticated team. example: 12345678 agent_id: type: string format: uuid description: >- - The agent whose data should be deleted. For Harness Runtime, this is the - Environment Config ID. Required when `type` is `managed_agent`; must be - omitted when `type` is `inference`. + The agent whose data should be deleted. Required when `type` is `agent`; + must be omitted when `type` is `inference`. example: 01a10d3f-2c09-764f-99f8-458e521627f3 required: - type diff --git a/specification/resources/signals/models/deletion_job.yml b/specification/resources/signals/models/deletion_job.yml index cd3b2a1f6..c046318cf 100644 --- a/specification/resources/signals/models/deletion_job.yml +++ b/specification/resources/signals/models/deletion_job.yml @@ -1,7 +1,5 @@ type: object -description: >- - A data deletion job that permanently removes signals data for an agent or - for a team's Serverless Inference usage. +description: A deletion job that permanently removes signals data for an agent or for a team's Serverless Inference usage. properties: team_id: type: integer @@ -10,32 +8,25 @@ properties: example: 12345678 deletion_id: type: string - description: The unique identifier for the deletion job. + description: The unique identifier for the deletion job (ULID). example: 01J9ZX0N5Q7M2K3R4S5T6V7W8X type: type: string description: >- - The scope of the deletion. `managed_agent` deletes the signals data - collected for one agent. `inference` deletes the signals data collected - for the team's Serverless Inference requests. + The scope of the deletion. `agent` deletes data for one agent. + `inference` deletes data for the team's Serverless Inference requests. enum: - - managed_agent + - agent - inference - example: managed_agent + example: agent agent_id: type: string format: uuid - description: >- - The agent whose data is being deleted. For Harness Runtime, this is the - Environment Config ID. Only present for `managed_agent` deletions. + description: The agent whose data is being deleted. Only present for `agent` deletions. example: 01a10d3f-2c09-764f-99f8-458e521627f3 status: type: string - description: >- - The current status of the deletion job. `queued` jobs are waiting to be - processed, `running` jobs are deleting data, `complete` jobs have - permanently deleted all matching data, and `failed` jobs stopped before - finishing. + description: The current status of the deletion job. enum: - queued - running @@ -45,7 +36,7 @@ properties: error_message: type: string nullable: true - description: A description of why the deletion failed, or null if it has not failed. + description: Error message if the deletion failed, or null otherwise. example: null created_at: type: integer @@ -56,17 +47,13 @@ properties: type: integer format: int64 nullable: true - description: >- - Unix timestamp when processing of the deletion job started, or null if - the job is still queued. + description: Unix timestamp when processing started, or null if still queued. example: 1791036410 completed_at: type: integer format: int64 nullable: true - description: >- - Unix timestamp when the deletion job finished, or null if it is still in - progress. + description: Unix timestamp when the deletion finished, or null if still in progress. example: null required: - team_id diff --git a/specification/resources/signals/responses/deletion_job_accepted_response.yml b/specification/resources/signals/responses/deletion_job_accepted_response.yml index 2c3ad061f..32ab717df 100644 --- a/specification/resources/signals/responses/deletion_job_accepted_response.yml +++ b/specification/resources/signals/responses/deletion_job_accepted_response.yml @@ -1,6 +1,5 @@ description: >- - The deletion job was accepted. The job is queued and processed - asynchronously. + The deletion job was accepted and will be processed asynchronously. headers: ratelimit-limit: @@ -17,7 +16,7 @@ content: example: team_id: 12345678 deletion_id: 01J9ZX0N5Q7M2K3R4S5T6V7W8X - type: managed_agent + type: agent agent_id: 01a10d3f-2c09-764f-99f8-458e521627f3 status: queued error_message: null diff --git a/specification/resources/signals/responses/deletion_job_response.yml b/specification/resources/signals/responses/deletion_job_response.yml index 081f9954c..405438ecd 100644 --- a/specification/resources/signals/responses/deletion_job_response.yml +++ b/specification/resources/signals/responses/deletion_job_response.yml @@ -15,7 +15,7 @@ content: example: team_id: 12345678 deletion_id: 01J9ZX0N5Q7M2K3R4S5T6V7W8X - type: managed_agent + type: agent agent_id: 01a10d3f-2c09-764f-99f8-458e521627f3 status: running error_message: null diff --git a/specification/resources/signals/responses/list_deletions_response.yml b/specification/resources/signals/responses/list_deletions_response.yml index 626c4668d..9dd8c6c7e 100644 --- a/specification/resources/signals/responses/list_deletions_response.yml +++ b/specification/resources/signals/responses/list_deletions_response.yml @@ -33,9 +33,7 @@ content: end_cursor: type: string description: >- - The cursor of the last item on this page. Pass this value as - `after` to retrieve the next page. Present only when there are - more results. + Cursor of the last item. Pass as `after` to fetch the next page. example: eyJkIjoiMDFKOVpXN0E4QjlDMEQxRTJGM0c0SDVKNksifQ== example: edges: @@ -43,7 +41,7 @@ content: node: team_id: 12345678 deletion_id: 01J9ZX0N5Q7M2K3R4S5T6V7W8X - type: managed_agent + type: agent agent_id: 01a10d3f-2c09-764f-99f8-458e521627f3 status: running error_message: null diff --git a/specification/resources/signals/signals_create_deletion.yml b/specification/resources/signals/signals_create_deletion.yml index 2d2f3d1b0..dba992fc3 100644 --- a/specification/resources/signals/signals_create_deletion.yml +++ b/specification/resources/signals/signals_create_deletion.yml @@ -4,35 +4,21 @@ summary: Create a Data Deletion Job description: | To permanently delete signals data, send a POST request to - `/v1/signals/deletions`. The request body must include a `type` and the - `team_id` of the authenticated team. + `/v1/signals/deletions`. - | Type | Scope | Required Fields | - |------|-------|-----------------| - | `managed_agent` | The sessions, dialogues, and signal reports collected for one agent. | `type`, `team_id`, `agent_id` | - | `inference` | The sessions, dialogues, and signal reports collected for the team's Serverless Inference requests. | `type`, `team_id` | + Two deletion types are supported: - **Deletion is permanent and cannot be undone.** Deletion runs in the - background. Poll the get deletion endpoint to check the job's status. + - `agent` — deletes sessions, dialogues, and signal reports for one agent. + Requires `agent_id`. Disables signals collection for the agent. + - `inference` — deletes sessions, dialogues, and signal reports for the + team's Serverless Inference requests. - For `managed_agent` deletions, the agent's sessions and dialogues stop - appearing in signals results immediately, and signals collection is - disabled for the agent. Wait until the deletion is complete before enabling - signals for the agent again. For `inference` deletions, only data collected - before the request is deleted; signals continues to analyze new Serverless - Inference requests. + Deletion is permanent and cannot be undone. The job runs asynchronously; + poll the get endpoint to check status. - Deletion does not remove export files created earlier. They remain - available to download until they expire. - - The endpoint is idempotent while a job is active. A new job returns - `202 Accepted`. If a queued or running job already exists for the same - target, that job is returned with `200 OK` instead of creating a duplicate. - A request made after the previous job has finished starts a new job. - - Each team may have a limited number of active deletion jobs at once. - Requests beyond that limit return `429 Too Many Requests`; wait for existing - jobs to finish before submitting more. + The endpoint is idempotent: if a queued or running job already exists for + the same target, it is returned with `200 OK`. A new job returns + `202 Accepted`. tags: - Signals @@ -44,9 +30,9 @@ requestBody: schema: $ref: 'models/create_deletion_request.yml' examples: - Managed Agent: + Agent: value: - type: managed_agent + type: agent team_id: 12345678 agent_id: 01a10d3f-2c09-764f-99f8-458e521627f3 Inference: diff --git a/specification/resources/signals/signals_get_deletion.yml b/specification/resources/signals/signals_get_deletion.yml index a807ae90f..756cd6863 100644 --- a/specification/resources/signals/signals_get_deletion.yml +++ b/specification/resources/signals/signals_get_deletion.yml @@ -3,8 +3,8 @@ operationId: signals_get_deletion summary: Retrieve a Data Deletion Job description: | - To retrieve the status and details of a signals data deletion job, send a - GET request to `/v1/signals/deletions/{deletion_id}`. + To retrieve the status of a signals data deletion job, send a GET request + to `/v1/signals/deletions/{deletion_id}`. tags: - Signals diff --git a/specification/resources/signals/signals_list_deletions.yml b/specification/resources/signals/signals_list_deletions.yml index 3b1b881b9..fbc9722a3 100644 --- a/specification/resources/signals/signals_list_deletions.yml +++ b/specification/resources/signals/signals_list_deletions.yml @@ -3,11 +3,9 @@ operationId: signals_list_deletions summary: List Data Deletion Jobs description: | - To list signals data deletion jobs for your team, newest first, send a GET - request to `/v1/signals/deletions`. Results are paginated using - cursor-based pagination with `limit` and `after` parameters. To fetch the - next page, pass the `cursor` of the last edge (or `page_info.end_cursor`) - as `after`. + To list signals data deletion jobs for your team, send a GET request to + `/v1/signals/deletions`. Results are paginated using cursor-based pagination + with `limit` and `after` parameters. tags: - Signals