Accounts API
The Accounts API allows you to manage accounts in Quave Cloud. You can create, retrieve, and delete accounts.
Make sure to read the Get Started document to understand how the API works.
Note: All endpoints in this API accept only the user token.
Create Account
To create a new account, send a POST request to the /api/public/v1/account
endpoint.
Below are the fields you can provide:
Field | Type | Description | Required |
---|---|---|---|
name | String | The name of the account to be created. | Yes |
registryServer | String | The URL of the private Docker registry. | No* |
registryEmail | String | The email associated with the private registry account. | No* |
registryUsername | String | The username for the private registry. | No* |
registryPassword | String | The password for the private registry. | No* |
*Note: If any of the registry fields are provided, all of them become required.
Example:
curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "My New Account",
"registryServer": "https://registry.example.com",
"registryEmail": "user@example.com",
"registryUsername": "registryuser",
"registryPassword": "dckr_pat_00000"
}' \
https://api.zcloud.ws/api/public/v1/account
Example Response:
{
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b"
}
The response contains the accountId
of the newly created account.
Private Registry Information
When creating an account, you have the option to include private registry credentials. This allows you to use a private Docker registry with your account. Here are some important points to note:
- All registry fields (
registryServer
,registryEmail
,registryUsername
,registryPassword
) are optional when creating an account. - However, if you provide any of the registry fields, all of them become required. You must provide all four fields or none of them.
- The
registryPassword
is securely encoded before being stored in the database. - If you don't provide registry information when creating the account, you can still add it later through your account settings page. See the Container Registry section for more details.
If you attempt to create an account with incomplete registry information, you'll receive an error response indicating that all registry fields must be provided if any are specified.
Get Account
To retrieve an account, send a GET request to the /api/public/v1/account
endpoint.
You need to provide the accountId
as a query parameter.
Example:
curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
https://api.zcloud.ws/api/public/v1/account?accountId=5f7b1b7b7b7b7b7b7b7b7b7b
Example Response:
{
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "My Account",
"slug": "my-account",
"isVerified": true
}
The response contains the following fields:
Field | Type | Description |
---|---|---|
accountId | String | The account ID. |
name | String | The account name. |
slug | String | The account slug. |
isVerified | Boolean | Whether the account is verified. |
Delete Account
To delete an account, send a DELETE request to the /api/public/v1/account
endpoint.
You need to provide the accountId
as a query parameter.
Example:
curl -X DELETE \
-H 'Authorization: YOUR_TOKEN' \
https://api.zcloud.ws/api/public/v1/account?accountId=5f7b1b7b7b7b7b7b7b7b7b7b
Example Response:
{
"message": "Account deleted successfully"
}
Note: Deleting an account requires admin permissions.