更新时间:2026-06-10 GMT+08:00
分享

获取Space详情 - ShowCoreSpace

功能介绍

根据记忆空间ID获取记忆空间详细信息,包含完整配置和记忆策略。

调用方法

请参见如何调用API

URI

GET /v1/core/spaces/{space_id}

表1 路径参数

参数

是否必选

参数类型

描述

space_id

String

参数解释:

记忆空间 ID,唯一标识一个记忆空间,可通过"创建Space"接口获取。

约束限制:

仅支持字母、数字和中划线。

取值范围:

长度1-48字符。

默认取值:

不涉及。

请求参数

响应参数

状态码:200

成功获取Space信息

状态码:401

表2 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码,标识错误类型,格式为 AgentArts.XXXXXXXX。

取值范围:

不涉及。

error_msg

String

参数解释:

错误信息,描述错误详情,供问题排查使用。

取值范围:

不涉及。

状态码:403

表3 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码,标识错误类型,格式为 AgentArts.XXXXXXXX。

取值范围:

不涉及。

error_msg

String

参数解释:

错误信息,描述错误详情,供问题排查使用。

取值范围:

不涉及。

encoded_authorization_message

String

参数解释:

编码后的授权失败信息。

取值范围:

不涉及。

details

Array of CoreSpaceCommonError objects

参数解释:

依赖的下游服务错误信息列表,包含导致当前请求失败的下游服务错误详情。

取值范围:

不涉及。

表4 CoreSpaceCommonError

参数

参数类型

描述

error_code

String

参数解释:

错误码,标识错误类型,格式为 AgentArts.XXXXXXXX。

取值范围:

不涉及。

error_msg

String

参数解释:

错误信息,描述错误详情,供问题排查使用。

取值范围:

不涉及。

状态码:404

表5 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码,标识错误类型,格式为 AgentArts.XXXXXXXX。

取值范围:

不涉及。

error_msg

String

参数解释:

错误信息,描述错误详情,供问题排查使用。

取值范围:

不涉及。

状态码:429

表6 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码,标识错误类型,格式为 AgentArts.XXXXXXXX。

取值范围:

不涉及。

error_msg

String

参数解释:

错误信息,描述错误详情,供问题排查使用。

取值范围:

不涉及。

状态码:500

表7 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码,标识错误类型,格式为 AgentArts.XXXXXXXX。

取值范围:

不涉及。

error_msg

String

参数解释:

错误信息,描述错误详情,供问题排查使用。

取值范围:

不涉及。

请求示例

/v1/core/spaces/123e4567-e89b-12d3-a456-426614174000

响应示例

状态码:200

成功获取Space信息

{
  "id" : "123e4567-e89b-12d3-a456-426614174000",
  "name" : "space-01",
  "description" : "test-environment",
  "message_ttl_hours" : 168,
  "memory_extract_enabled" : true,
  "memory_extract_idle_seconds" : 60,
  "memory_extract_max_tokens" : 10000,
  "memory_extract_max_messages" : 100,
  "memory_strategies_builtin" : [ {
    "name" : "semantic-memory",
    "type" : "semantic",
    "steps" : [ {
      "step_order" : 1,
      "step_type" : "extraction",
      "isolation_level" : null,
      "instruction" : "You are a long-term memory extraction agent supporting a lifelong learning system. Your task is to identify and extract meaningful information about the users from a given list of messages. ...(truncated)",
      "output_schema" : "<schema>{...SemanticMemory schema...}</schema>\n<conversation>\n{messages}\n</conversation>"
    }, {
      "step_order" : 2,
      "step_type" : "consolidation",
      "isolation_level" : "actor",
      "instruction" : "You are a conservative memory manager that preserves existing information while carefully integrating new facts. Operations: AddMemory, UpdateMemory, SkipMemory. ...(truncated)",
      "output_schema" : "<new_content>\n{new_content}\n</new_content>\n<existing_memories>\n{historical_memories}\n</existing_memories>"
    } ]
  } ],
  "memory_strategies_customized" : [ {
    "id" : "456e7890-e89b-12d3-a456-426614174000",
    "name" : "user-preference-strategy",
    "type" : "user_preference",
    "origin_type" : "user",
    "steps" : [ {
      "id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "step_order" : 1,
      "step_type" : "extraction",
      "isolation_level" : "actor",
      "instruction" : "string",
      "output_schema" : "string",
      "enabled" : true,
      "created_at" : "2025-01-18T10:00:00.000Z",
      "updated_at" : "2025-01-18T10:00:00.000Z"
    } ],
    "created_at" : "2025-01-18T10:00:00.000Z",
    "updated_at" : "2025-01-18T10:00:00.000Z"
  } ],
  "vpc_id" : "string",
  "subnet_id" : "string",
  "private_access" : {
    "domain_name" : "123e4567-e89b-12d3-a456-426614174000.cn-north-4.memory.agentarts.myhuawei.com",
    "ip" : "120.46.xxx.xxx"
  },
  "public_access" : {
    "domain_name" : "123e4567-e89b-12d3-a456-426614174000.cn-north-4.memory.agentarts.myhuawei.com",
    "ip" : "120.46.xxx.xxx"
  },
  "api_key" : {
    "id" : "key-uuid",
    "masked_key" : "sk-***1234"
  },
  "tags" : [ {
    "key" : "Environment",
    "value" : "production"
  } ],
  "status" : "creating",
  "created_at" : "2025-01-18T10:00:00.000Z",
  "updated_at" : "2025-01-18T10:00:00.000Z"
}

状态码:401

认证失败

{
  "error_code" : "AgentArts.01020002",
  "error_msg" : "Authentication failed"
}

状态码:403

权限不足

{
  "error_code" : "AgentArts.01010002",
  "error_msg" : "Insufficient permissions"
}

状态码:404

Space不存在

{
  "error_code" : "AgentArts.01010005",
  "error_msg" : "Specified space does not exist"
}

状态码:429

请求过于频繁

{
  "error_code" : "AgentArts.01020008",
  "error_msg" : "Too many requests"
}

状态码:500

内部服务错误

{
  "error_code" : "AgentArts.01010008",
  "error_msg" : "Internal service error"
}

状态码

状态码

描述

200

成功获取Space信息

401

认证失败

403

权限不足

404

Space不存在

429

请求过于频繁

500

内部服务错误

错误码

请参见错误码

相关文档