Claude Platform Docs

Obtenir une ressource de session

$ ant beta:sessions:resources retrieve
GET/v1/sessions/{session_id}/resources/{resource_id}

Obtenir une ressource de session

Parameters
--session-id: string⁠Path parameter
--resource-id: string⁠Path parameter
--beta: optional array of AnthropicBeta⁠Header parameter

This endpoint is in beta: requests must send managed-agents-2026-04-01 in this header.

--workspace-id: optional string⁠Header parameter

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Returns

The requested session resource.

One of the following:
beta_managed_agents_github_repository_resource: object{ type: "github_repository", id, created_at, 4 more }
type: "github_repository"
id: string
created_at: string

A timestamp in RFC 3339 format

formatdate-time
mount_path: string
updated_at: string

A timestamp in RFC 3339 format

formatdate-time
url: string
One of the following:
beta_managed_agents_branch_checkout: object{ type: "branch", name }
type: "branch"
name: string

Branch name to check out.

minLength1
maxLength255
beta_managed_agents_commit_checkout: object{ type: "commit", sha }
type: "commit"
sha: string

Full commit SHA to check out.

minLength7
maxLength64
beta_managed_agents_file_resource: object{ type: "file", id, created_at, 3 more }
type: "file"
id: string
created_at: string

A timestamp in RFC 3339 format

formatdate-time
file_id: string
mount_path: string
updated_at: string

A timestamp in RFC 3339 format

formatdate-time
beta_managed_agents_memory_store_resource: object{ type: "memory_store", memory_store_id, access, 4 more }

A memory store attached to an agent session.

type: "memory_store"
memory_store_id: string

The memory store ID (memstore_...). Must belong to the caller's organization and workspace.

access: optional "read_write" or "read_only"

Access mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem.

One of the following:
"read_write"
"read_only"
description: optional string

Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.

instructions: optional string

Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.

maxLength4096
mount_path: optional string

Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.

name: optional string

Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.

Obtenir une ressource de session
ant beta:sessions:resources retrieve \
  --api-key my-anthropic-api-key \
  --session-id sesn_011CZkZAtmR3yMPDzynEDxu7 \
  --resource-id sesrsc_011CZkZBJq5dWxk9fVLNcPht
Returns Examples
Response 200
{
  "id": "sesrsc_011CZkZCKr6eXym1gWMPdQiu",
  "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"
  }
}