VR云渲游平台 CVR-获取项目ID:调用API获取项目ID

时间:2024-10-28 16:17:37

调用API获取项目ID

项目ID可以通过调用查询指定条件下的项目列表API获取。

获取项目ID的接口为“GET https://{Endpoint}/v3/projects”,其中{Endpoint}为 IAM 的终端节点,可以从地区和终端节点获取。接口的认证鉴权请参见认证鉴权

响应示例如下,其中projects下的“id”即为项目ID。

{
    "projects": [
        {
            "domain_id": "65ewtrgaggshhk1223245sghjlse684b",
            "is_domain": false,
            "parent_id": "65ewtrgaggshhk1223245sghjlse684b",
            "name": "project_name",
            "description": "",
            "links": {
                "next": null,
                "previous": null,
                "self": "https://www.example.com/v3/projects/a4adasfjljaaaakla12334jklga9sasfg"
            },
            "id": "a4adasfjljaaaakla12334jklga9sasfg",
            "enabled": true
        }
    ],
    "links": {
        "next": null,
        "previous": null,
        "self": "https://www.example.com/v3/projects"
    }
}
support.huaweicloud.com/api-cvr/cvr_01_0011.html