Delete Session Resource
client.Beta.Sessions.Resources.Delete(ctx, resourceID, params) (*BetaManagedAgentsDeleteSessionResource, error)DELETE/v1/sessions/{session_id}/resources/{resource_id}
Delete Session Resource
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
betaManagedAgentsDeleteSessionResource, err := client.Beta.Sessions.Resources.Delete(
context.TODO(),
"sesrsc_011CZkZBJq5dWxk9fVLNcPht",
anthropic.BetaSessionResourceDeleteParams{
SessionID: "sesn_011CZkZAtmR3yMPDzynEDxu7",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", betaManagedAgentsDeleteSessionResource.ID)
}{
"id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht",
"type": "session_resource_deleted"
}Returns Examples
{
"id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht",
"type": "session_resource_deleted"
}