Skip to content

Commit ad80483

Browse files
cmanallenbillyvgaliu39bruno-garcia
committed
feat(replays): Add bulk delete endpoint blueprint (#92315)
Adds blueprint for proposed bulk delete endpoint. --------- Co-authored-by: Billy Vong <[email protected]> Co-authored-by: Andrew Liu <[email protected]> Co-authored-by: Bruno Garcia <[email protected]>
1 parent 1fb08a4 commit ad80483

File tree

1 file changed

+110
-0
lines changed
  • src/sentry/replays/blueprints

1 file changed

+110
-0
lines changed

src/sentry/replays/blueprints/api.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,3 +614,113 @@ A POST request is issued with no body. The URL and authorization context is used
614614
}
615615
}
616616
```
617+
618+
## Replay Deletion Jobs [/organizations/<organization_id_or_slug>/replays/jobs/delete/]
619+
620+
- Parameters
621+
622+
- per_page (optional, number)
623+
Default: 10
624+
- offset (optional, number)
625+
Default: 0
626+
627+
### List Replay Deletion Jobs [GET]
628+
629+
Retrieve a collection of replay delete jobs.
630+
631+
**Attributes**
632+
633+
| Column | Type | Description |
634+
| ------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------- |
635+
| id | number | - |
636+
| dateCreated | string | - |
637+
| dateUpdated | string | - |
638+
| rangeStart | string | The minimum UTC timestamp in the deletion range. |
639+
| rangeEnd | string | The maximum UTC timestamp in the deletion range. |
640+
| environments | list[string] | The environment to delete replays from. If not specified, applies to all environments |
641+
| projects | list[number] | The projects to delete replays from. |
642+
| status | string | The status of the deletion job. One of `pending`, `in-progress`, and `completed`. |
643+
| query | optional[string] | The query string which matches the to-be-deleted replays. Conforms to https://docs.sentry.io/concepts/search/#query-syntax |
644+
645+
- Response 200
646+
647+
```json
648+
{
649+
"data": [
650+
{
651+
"id": 23,
652+
"dateCreated": "2025-06-06T14:05:57.909921",
653+
"dateUpdated": "2025-06-06T14:05:57.909921",
654+
"rangeStart": "2025-06-01T00:00:00.000000",
655+
"rangeEnd": "2025-06-04T00:00:00.000000",
656+
"environments": ["production"],
657+
"projects": [11276],
658+
"status": "in-progress",
659+
"query": "release:2.3.0 AND url:*/billing*"
660+
}
661+
]
662+
}
663+
```
664+
665+
### Create a Replay Batch Deletion Job [POST]
666+
667+
Delete a collection of replays. Deletes are throttled and will take some time to complete. The number of events expected to be deleted is returned on the meta object. This number is ephemeral and can change. It is only returned for informational reasons.
668+
669+
- Request
670+
671+
```json
672+
{
673+
"data": {
674+
"rangeStart": "2025-06-01T00:00:00.000000",
675+
"rangeEnd": "2025-06-04T00:00:00.000000",
676+
"environments": ["production"],
677+
"projects": [11276],
678+
"query": "release:2.3.0 AND url:*/billing*"
679+
}
680+
}
681+
```
682+
683+
- Response 201
684+
685+
```json
686+
{
687+
"data": {
688+
"id": 23,
689+
"dateCreated": "2025-06-06T14:05:57.909921",
690+
"dateUpdated": "2025-06-06T14:05:57.909921",
691+
"rangeStart": "2025-06-01T00:00:00.000000",
692+
"rangeEnd": "2025-06-04T00:00:00.000000",
693+
"environments": ["production"],
694+
"projects": [11276],
695+
"status": "pending",
696+
"query": "release:2.3.0 AND url:*/billing*"
697+
},
698+
"meta": {
699+
"count": 13922
700+
}
701+
}
702+
```
703+
704+
## Replay Delete Job [/organizations/<organization_id_or_slug>/replays/jobs/delete/<id>/]
705+
706+
### Get Replay Delete Job [GET]
707+
708+
Fetch a replay delete job instance.
709+
710+
- Response 200
711+
712+
```json
713+
{
714+
"data": {
715+
"id": 23,
716+
"dateCreated": "2025-06-06T14:05:57.909921",
717+
"dateUpdated": "2025-06-06T14:05:57.909921",
718+
"rangeStart": "2025-06-01T00:00:00.000000",
719+
"rangeEnd": "2025-06-04T00:00:00.000000",
720+
"environments": ["production"],
721+
"projects": [11276],
722+
"status": "pending",
723+
"query": "release:2.3.0 AND url:*/billing*"
724+
}
725+
}
726+
```

0 commit comments

Comments
 (0)