Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"
18 changes: 8 additions & 10 deletions specification/resources/signals/models/create_deletion_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 11 additions & 24 deletions specification/resources/signals/models/deletion_job.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@ 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:
- cursor: eyJkIjoiMDFKOVpYME41UTdNMkszUjRTNVQ2VjdXOFgifQ==
node:
team_id: 12345678
deletion_id: 01J9ZX0N5Q7M2K3R4S5T6V7W8X
type: managed_agent
type: agent
agent_id: 01a10d3f-2c09-764f-99f8-458e521627f3
status: running
error_message: null
Expand Down
40 changes: 13 additions & 27 deletions specification/resources/signals/signals_create_deletion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions specification/resources/signals/signals_get_deletion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions specification/resources/signals/signals_list_deletions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down