This API is used to obtain the random password generated during initial Windows ECS installation for user Administrator or the configured Cloudbase-init user when you use an image that supports Cloudbase-Init to create a Windows ECS.
After starting an ECS, wait for 5 to 10 minutes and ensure that the password is injected. Then, you can use this API to query the password.
Linux ECSs do not use this API to obtain a password.
GET /v2.1/{project_id}/servers/{server_id}/os-server-password
GET /v2/{project_id}/servers/{server_id}/os-server-password
None
GET https://{endpoint}/v2/{project_id}/servers/{server_id}/os-server-password GET https://{endpoint}/v2.1/{project_id}/servers/{server_id}/os-server-password
{ "password": "UHC9+YW1xDC1Yu8Mg9n+tnOp7euEO/cW//9KgdJKWhr5w==" }