实时音视频 SPARKRTC-获取项目ID:调用API获取项目ID

时间:2024-11-08 15:01:13

调用API获取项目ID

您还能通过调用查询指定条件下的项目信息API获取项目ID。

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

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

{ 
    "projects": [ 
        { 
            "domain_id": "65382450e8f64ac0870cd180d14e684b", 
            "is_domain": false, 
            "parent_id": "65382450e8f64ac0870cd180d14e684b", 
            "name": "region01", 
            "description": "", 
            "links": { 
                "next": null, 
                "previous": null, 
                "self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99" 
            }, 
            "id": "a4a5d4098fb4474fa22cd05f897d6b99", 
            "enabled": true 
        } 
    ], 
    "links": { 
        "next": null, 
        "previous": null, 
        "self": "https://www.example.com/v3/projects" 
    } 
}
support.huaweicloud.com/api-rtc/rtc_07_0015.html