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

# Remove Session Artifact

> Remove one artifact from a session's persisted artifact projection.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json delete /workspaces/{workspace_id}/agent/sessions/{session_id}/artifacts/{artifact_type}/{artifact_id}
openapi: 3.1.0
info:
  title: Tracecat API
  summary: Tracecat API
  description: The open source AI automation platform for security teams and agents.
  termsOfService: >-
    https://docs.google.com/document/d/e/2PACX-1vQvDe3SoVAPoQc51MgfGCP71IqFYX_rMVEde8zC4qmBCec5f8PLKQRdxa6tsUABT8gWAR9J-EVs2CrQ/pub
  contact:
    name: Tracecat Founders
    email: founders@tracecat.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1'
servers:
  - url: /api
security: []
tags:
  - name: public
    description: Public facing endpoints
  - name: workflows
    description: Workflow management
  - name: actions
    description: Action management
  - name: triggers
    description: Workflow triggers
  - name: secrets
    description: Secret management
  - name: variables
    description: Workspace variable management
paths:
  /workspaces/{workspace_id}/agent/sessions/{session_id}/artifacts/{artifact_type}/{artifact_id}:
    delete:
      tags:
        - agent-sessions
      summary: Remove Session Artifact
      description: Remove one artifact from a session's persisted artifact projection.
      operationId: agent-sessions-remove_session_artifact
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Session Id
        - name: artifact_type
          in: path
          required: true
          schema:
            enum:
              - case
              - workflow
              - run
              - table
              - agent
              - alert
              - integration
              - secret
              - generic
            type: string
            title: Artifact Type
        - name: artifact_id
          in: path
          required: true
          schema:
            type: string
            title: Artifact Id
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSessionArtifactsRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    AgentSessionArtifactsRead:
      properties:
        artifacts:
          items:
            $ref: '#/components/schemas/Artifact'
          type: array
          title: Artifacts
      type: object
      title: AgentSessionArtifactsRead
      description: Response schema for persisted agent session artifacts.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Artifact:
      oneOf:
        - $ref: '#/components/schemas/CaseArtifact'
        - $ref: '#/components/schemas/WorkflowArtifact'
        - $ref: '#/components/schemas/RunArtifact'
        - $ref: '#/components/schemas/TableArtifact'
        - $ref: '#/components/schemas/AgentArtifact'
        - $ref: '#/components/schemas/AlertArtifact'
        - $ref: '#/components/schemas/IntegrationArtifact'
        - $ref: '#/components/schemas/SecretArtifact'
        - $ref: '#/components/schemas/GenericArtifact'
      discriminator:
        propertyName: type
        mapping:
          agent:
            $ref: '#/components/schemas/AgentArtifact'
          alert:
            $ref: '#/components/schemas/AlertArtifact'
          case:
            $ref: '#/components/schemas/CaseArtifact'
          generic:
            $ref: '#/components/schemas/GenericArtifact'
          integration:
            $ref: '#/components/schemas/IntegrationArtifact'
          run:
            $ref: '#/components/schemas/RunArtifact'
          secret:
            $ref: '#/components/schemas/SecretArtifact'
          table:
            $ref: '#/components/schemas/TableArtifact'
          workflow:
            $ref: '#/components/schemas/WorkflowArtifact'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CaseArtifact:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        scope:
          anyOf:
            - $ref: '#/components/schemas/ArtifactScope'
            - type: 'null'
        type:
          type: string
          const: case
          title: Type
          default: case
        severity:
          $ref: '#/components/schemas/CaseSeverity'
        status:
          $ref: '#/components/schemas/CaseStatus'
      additionalProperties: false
      type: object
      required:
        - id
        - title
        - severity
        - status
      title: CaseArtifact
      description: Case artifact shown in artifact-capable chat surfaces.
    WorkflowArtifact:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        scope:
          anyOf:
            - $ref: '#/components/schemas/ArtifactScope'
            - type: 'null'
        type:
          type: string
          const: workflow
          title: Type
          default: workflow
        color:
          type: string
          title: Color
        isPublished:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ispublished
      additionalProperties: false
      type: object
      required:
        - id
        - title
        - color
      title: WorkflowArtifact
      description: Workflow artifact shown in artifact-capable chat surfaces.
    RunArtifact:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        scope:
          anyOf:
            - $ref: '#/components/schemas/ArtifactScope'
            - type: 'null'
        type:
          type: string
          const: run
          title: Type
          default: run
        workflowId:
          type: string
          title: Workflowid
        status:
          type: string
          enum:
            - running
            - success
            - failed
            - cancelled
          title: Status
        startedAt:
          type: string
          format: date-time
          title: Startedat
      additionalProperties: false
      type: object
      required:
        - id
        - title
        - workflowId
        - status
        - startedAt
      title: RunArtifact
      description: Workflow run artifact shown in artifact-capable chat surfaces.
    TableArtifact:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        scope:
          anyOf:
            - $ref: '#/components/schemas/ArtifactScope'
            - type: 'null'
        type:
          type: string
          const: table
          title: Type
          default: table
        rowCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rowcount
      additionalProperties: false
      type: object
      required:
        - id
        - title
      title: TableArtifact
      description: Table artifact shown in artifact-capable chat surfaces.
    AgentArtifact:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        scope:
          anyOf:
            - $ref: '#/components/schemas/ArtifactScope'
            - type: 'null'
        type:
          type: string
          const: agent
          title: Type
          default: agent
      additionalProperties: false
      type: object
      required:
        - id
        - title
      title: AgentArtifact
      description: Agent preset artifact shown in artifact-capable chat surfaces.
    AlertArtifact:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        scope:
          anyOf:
            - $ref: '#/components/schemas/ArtifactScope'
            - type: 'null'
        type:
          type: string
          const: alert
          title: Type
          default: alert
      additionalProperties: false
      type: object
      required:
        - id
        - title
      title: AlertArtifact
      description: Alert artifact stub. Extend when alert surfaces are wired.
    IntegrationArtifact:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        scope:
          anyOf:
            - $ref: '#/components/schemas/ArtifactScope'
            - type: 'null'
        type:
          type: string
          const: integration
          title: Type
          default: integration
      additionalProperties: false
      type: object
      required:
        - id
        - title
      title: IntegrationArtifact
      description: Integration artifact stub. Extend when integration surfaces are wired.
    SecretArtifact:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        scope:
          anyOf:
            - $ref: '#/components/schemas/ArtifactScope'
            - type: 'null'
        type:
          type: string
          const: secret
          title: Type
          default: secret
      additionalProperties: false
      type: object
      required:
        - id
        - title
      title: SecretArtifact
      description: Secret artifact stub. Extend when secret surfaces are wired.
    GenericArtifact:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        scope:
          anyOf:
            - $ref: '#/components/schemas/ArtifactScope'
            - type: 'null'
        type:
          type: string
          const: generic
          title: Type
          default: generic
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
      additionalProperties: false
      type: object
      required:
        - id
        - title
      title: GenericArtifact
      description: Escape hatch for surfaced objects without a dedicated panel view.
    ArtifactScope:
      properties:
        agentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Agentid
        agentType:
          anyOf:
            - type: string
            - type: 'null'
          title: Agenttype
        parentToolCallId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parenttoolcallid
      additionalProperties: false
      type: object
      title: ArtifactScope
      description: Attribution scope for artifact data parts.
    CaseSeverity:
      type: string
      enum:
        - unknown
        - informational
        - low
        - medium
        - high
        - critical
        - fatal
        - other
      title: CaseSeverity
      description: |-
        Case severity values aligned with OCSF severity values.

        Values:
            UNKNOWN (0): The event/finding severity is unknown
            INFORMATIONAL (1): Informational message. No action required
            LOW (2): The user decides if action is needed
            MEDIUM (3): Action is required but the situation is not serious at this time
            HIGH (4): Action is required immediately
            CRITICAL (5): Action is required immediately and the scope is broad
            FATAL (6): An error occurred but it is too late to take remedial action
            OTHER (99): The event/finding severity is not mapped
    CaseStatus:
      type: string
      enum:
        - unknown
        - new
        - in_progress
        - on_hold
        - resolved
        - closed
        - other
      title: CaseStatus
      description: Case status values aligned with OCSF Incident Finding status.
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````