The account API allows users to query and manipulate their own account data.
Method | Path | Request | Response |
GET | /v1/accounts/{account_id} | - | Account JSON |
Response format:
{
"id": "ae9b9f24-cfba-4dc6-92c6-c6fecdee88b5",
"name": "User name",
"email": "user@ema.il",
"planId": "26b3c9da-e11c-4643-9271-26c8f3d025a1"
}
Example cURL:
curl 'https://release.api.golem.cloud/v1/accounts/ae9b9f24-cfba-4dc6-92c6-c6fecdee88b5'
-H 'Authorization: Bearer 03f17466-202f-43ac-86cc-52e6c6a42d2d'
Method | Path | Request | Response |
GET | /v1/accounts/{account_id}/plan | - | Plan JSON |
Response format:
{
"planId": "80b56370-1ed4-4d90-864b-e8809641995d",
"planData": {
"projectLimit": 100,
"componentLimit": 100,
"instanceLimit": 10000,
"storageLimit": 500000000,
"monthlyGasLimit": 1000000000000,
"monthlyUploadLimit": 1000000000
}
}
Explanation
projectLimit
is the maximum number of projects for the accountcomponentLimit
is the maximum number of templates for the accountinstanceLimit
is the maximum total number of workers for the accountstorageLimit
is the maximum space an account can consume, in bytesmonthlyGasLimit
is the maximum number of processing units an account can use in a monthmonthlyUploadLimit
is the maximum number of bytes an account can upload via the template APIExample cURL:
curl 'https://release.api.golem.cloud/v1/accounts/ae9b9f24-cfba-4dc6-92c6-c6fecdee88b5/plan'
-H 'Authorization: Bearer 03f17466-202f-43ac-86cc-52e6c6a42d2d'
Method | Path | Request | Response |
PUT | /v1/accounts/{account_id} | Account JSON | Account JSON |
Request and response format:
{
"id": "ae9b9f24-cfba-4dc6-92c6-c6fecdee88b5",
"name": "User name",
"email": "user@ema.il",
"planId": "26b3c9da-e11c-4643-9271-26c8f3d025a1"
}
Explanation
Allows the user to change the account details such as name
and email
. Changing the planId
is not allowed and the request will be rejected.
The response is the updated account data.
Example cURL:
curl
-X PUT 'https://release.api.golem.cloud/v1/accounts/ae9b9f24-cfba-4dc6-92c6-c6fecdee88b5'
-H 'Content-Type: application/json'
-d '{"id": "ae9b9f24-cfba-4dc6-92c6-c6fecdee88b5", "name": "User name", "email": "user2@ema.il", "planId": "26b3c9da-e11c-4643-9271-26c8f3d025a1"}'
-H 'Authorization: Bearer 03f17466-202f-43ac-86cc-52e6c6a42d2d'
All account endpoints can return with the following errors:
Status | Body | Description |
400 | { "errors": ["error1", ...] } | Invalid request, returning with a list of issues detected in the request. |
401 | { "message": "..." } | Unauthorized |
404 | { "message": "..." } | Account not found |
500 | { "error": "..." } | Internal server error |