Get Session Resource
client.Beta.Sessions.Resources.Get(ctx, resourceID, params) (*BetaSessionResourceGetResponseUnion, error)GET/v1/sessions/{session_id}/resources/{resource_id}
Get 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"),
)
resource, err := client.Beta.Sessions.Resources.Get(
context.TODO(),
"sesrsc_011CZkZBJq5dWxk9fVLNcPht",
anthropic.BetaSessionResourceGetParams{
SessionID: "sesn_011CZkZAtmR3yMPDzynEDxu7",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", resource)
}{
"id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu",
"created_at": "2026-03-15T10:00:00Z",
"mount_path": "/workspace/example-repo",
"type": "github_repository",
"updated_at": "2026-03-15T10:00:00Z",
"url": "https://github.com/example-org/example-repo",
"checkout": {
"name": "main",
"type": "branch"
}
}Returns Examples
{
"id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu",
"created_at": "2026-03-15T10:00:00Z",
"mount_path": "/workspace/example-repo",
"type": "github_repository",
"updated_at": "2026-03-15T10:00:00Z",
"url": "https://github.com/example-org/example-repo",
"checkout": {
"name": "main",
"type": "branch"
}
}