You need to enable JavaScript to run this app.
导航
获取存储空间列表
最近更新时间:2025.07.28 10:33:17首次发布时间:2023.08.11 19:22:04
复制全文
我的收藏
有用
有用
无用
无用

本接口用于获取存储空间的列表。

请求说明

  • 请求方式:GET
  • 请求地址:https://veefedge.volcengineapi.com/?Action=ListKvNamespace&Version=2021-04-30

请求参数

Query

参数类型是否必选示例值描述
ActionStringListKvNamespace公共参数。该参数表示接口名称。取值:ListKvNamespace
VersionString2021-04-30公共参数。该参数表示接口版本。取值:2021-04-30
PageInteger1页码。默认为 1。
LimitInteger50每页记录数。默认为 50 条记录。
最多为 50 条。
OrderByInteger2该参数指定查询数据的顺序,接受以下值:
  • 1:降序排列存储空间。
  • 2(默认):升序排列存储空间。
OrderTypeString1可用的排序类型有:
  • create_time(默认):根据创建时间排序存储空间。
  • update_time:根据最后更新时间排序存储空间。

返回参数

参数类型示例值描述
kv_namespaces[]KvNamespace见下文说明存储空间列表
total_countInt642存储空间总数

KvNamespace

参数类型示例值描述
namespace_namestringtest-kv1存储空间名称。
namespace_idstring46d79a9944ae2fd81f2643e2fe5ef42d****存储空间id。
descriptionstringtest存储空间的描述。
creatorstringtestuser存储空间的创建者。
create_timeint641661864175创建时间。以 UNIX 时间戳格式显示。
update_timeint641678288603更新时间。以 UNIX 时间戳格式显示。

请求示例

GET https://veefedge.volcengineapi.com/?Action=ListKvNamespace
&<公共请求参数>

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20230808095102CFDFA3280****",
        "Action": "ListKvNamespace",
        "Version": "2021-04-30",
        "Service": "veefedge",
        "Region": "cn-north-1"
    },
    "Result": {
        "kv_namespaces": [
            {
                "namespace_name": "test-kv1",
                "namespace_id": "46d79a9944ae2fd81f2643e2fe5ef42d****",
                "description": "test",
                "creator": "testuser",
                "create_time": 1661864175,
                "update_time": 1678288603
            },
            {
                "namespace_name": "asdJSJasdad",
                "namespace_id": "510257916f6b5503b288d064b7154****",
                "description": "",
                "creator": "testuser",
                "create_time": 1662005890,
                "update_time": 1664337001
            }
        ],
        "total_count": 2
    }
}

错误码

如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见错误码