> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List trace deletion requests



## OpenAPI

````yaml https://api.sgp.scale.com/openapi-versions/v5/openapi.json get /v5/spans/deletions
openapi: 3.1.0
info:
  title: EGP API V5
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
paths:
  /v5/spans/deletions:
    get:
      tags:
        - Spans
      summary: List trace deletion requests
      operationId: GET-V5-/v5/spans/deletions
      parameters:
        - name: starting_after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The deletion request ID to start after.
            title: Starting After
          description: The deletion request ID to start after.
        - name: ending_before
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The deletion request ID to end before.
            title: Ending Before
          description: The deletion request ID to end before.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 10000
            minimum: 1
            description: The maximum number of deletion requests to return.
            default: 100
            title: Limit
          description: The maximum number of deletion requests to return.
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: >-
              Optional deletion statuses to include. Supports repeated status
              parameters and comma-separated values.
            title: Status
          description: >-
            Optional deletion statuses to include. Supports repeated status
            parameters and comma-separated values.
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedList_TraceDeletionListItem_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PaginatedList_TraceDeletionListItem_:
      properties:
        object:
          type: string
          const: list
          title: Object
          default: list
        items:
          items:
            $ref: '#/components/schemas/TraceDeletionListItem'
          type: array
          title: Items
        limit:
          type: integer
          title: Limit
          description: The maximum number of items to return.
          default: 100
        total:
          type: integer
          title: Total
          description: >-
            The total of items that match the query. This is greater than or
            equal to the number of items returned.
        has_more:
          type: boolean
          title: Has More
          description: Whether there are more items left to be fetched.
      type: object
      required:
        - items
        - total
        - has_more
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TraceDeletionListItem:
      properties:
        object:
          type: string
          title: Object
          default: trace_deletion
        deletion_request_id:
          type: string
          title: Deletion Request Id
        status:
          $ref: '#/components/schemas/TraceDeletionRequestStatus'
        source_type:
          $ref: '#/components/schemas/TraceDeletionSourceType'
        group_id:
          title: Group Id
          type: string
        trace_count:
          title: Trace Count
          type: integer
        resolved_trace_count:
          title: Resolved Trace Count
          type: integer
        created_at:
          type: string
          format: date-time
          title: Created At
        started_at:
          title: Started At
          type: string
          format: date-time
        completed_at:
          title: Completed At
          type: string
          format: date-time
        last_worker_attempt_at:
          title: Last Worker Attempt At
          type: string
          format: date-time
        requested_by_user_id:
          title: Requested By User Id
          type: string
        reason_code:
          $ref: '#/components/schemas/TraceDeletionReasonCode'
        error_summary:
          title: Error Summary
          type: string
      type: object
      required:
        - deletion_request_id
        - status
        - source_type
        - created_at
        - reason_code
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          title: Error Type
          type: string
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TraceDeletionRequestStatus:
      type: string
      enum:
        - accepted
        - resolving
        - deleting
        - completed
        - failed
        - canceled
      title: TraceDeletionRequestStatus
    TraceDeletionSourceType:
      type: string
      enum:
        - trace_ids
        - group_id
      title: TraceDeletionSourceType
    TraceDeletionReasonCode:
      type: string
      enum:
        - customer_requested_deletion
      title: TraceDeletionReasonCode
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````