Account
You can obtain your account details and update them through CloudAPI, although login cannot be changed, and password can not be retrieved.
Retrieves your account details. Instead of providing your login name, you can also provide 'my' (i.e. GET /my).
- None
Account object:
Field | Type | Description |
id | UUID | Unique id for this account |
login | String | Your login name |
email | String | Email address |
companyName | String | ... |
firstName | String | ... |
lastName | String | ... |
address | String | ... |
postalCode | String | ... |
city | String | ... |
state | String | ... |
country | String | ... |
phone | String | ... |
created | ISO8601 date | When this account was created |
updated | ISO8601 date | When this account's details was last updated |
triton_cns_enabled | Boolean | true if Triton CNS is enabled for account |
Error Code | Description |
ResourceNotFound | If :login does not exist |
triton account get
or
sdc-getaccount
GET /my HTTP/1.1
authorization: Signature keyId="..."
accept: application/json
accept-version: ~8
host: api.example.com
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 285
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, Api-Version, Response-Time
Access-Control-Allow-Methods: GET, HEAD, POST, PUT
Access-Control-Expose-Headers: Api-Version, Request-Id, Response-Time
Connection: Keep-Alive
Content-MD5: Sz+3BJ3EKDxL3MLQQumPgg==
Date: Tue, 22 Dec 2015 05:06:33 GMT
Server: Joyent Triton 8.0.0
Api-Version: 8.0.0
Request-Id: c3d496f0-a869-11e5-8662-47ccf5717dbf
Response-Time: 2122
{
"id": "b89d9dd3-62ce-4f6f-eb0d-f78e57d515d9",
"login": "barbar",
"email": "[email protected]",
"companyName": "Example Inc",
"firstName": "BarBar",
"lastName": "Jinks",
"phone": "123-456-7890",
"updated": "2015-12-21T11:48:54.884Z",
"created": "2015-12-21T11:48:54.884Z"
}
Update your account details with the given parameters.
Field | Type | Description |
email | String | Email address |
companyName | String | ... |
firstName | String | ... |
lastName | String | ... |
address | String | ... |
postalCode | String | ... |
city | String | ... |
state | String | ... |
country | String | ... |
phone | String | ... |
triton_cns_enabled | Boolean | Enable or disable the Triton CNS |
Account object:
Field | Type | Description |
id | UUID | Unique id for this account |
login | String | Your login name |
email | String | Email address |
companyName | String | ... |
firstName | String | ... |
lastName | String | ... |
address | String | ... |
postalCode | String | ... |
city | String | ... |
state | String | ... |
country | String | ... |
phone | String | ... |
created | ISO8601 date | When this account was created |
updated | ISO8601 date | When this account's details was last updated |
triton_cns_enabled | Boolean | true if Triton CNS is enabled for account |
Error Code | Description |
ResourceNotFound | If :login does not exist |
triton account update postalCode=12345 phone='1 (234) 567 890'
or
sdc-updateaccount --postal-code=12345 --phone='1 (234) 567 890'
POST /my HTTP/1.1
authorization: Signature keyId="...
accept: application/json
content-type: application/json
accept-version: ~8
content-length: 48
content-md5: 6kCHdE651hsI9N82TUkU/g==
host: api.example.com
connection: keep-alive
postal-code=12345&phone=1%20(234)%20567%20890
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 309
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, Api-Version, Response-Time
Access-Control-Allow-Methods: GET, HEAD, POST, PUT
Access-Control-Expose-Headers: Api-Version, Request-Id, Response-Time
Connection: Keep-Alive
Content-MD5: xxJ5ppNDrEyAf5VIlt4GZw==
Date: Tue, 22 Dec 2015 12:16:37 GMT
Server: Joyent Triton 8.0.0
Api-Version: 8.0.0
Request-Id: d8db9e90-a8a5-11e5-90c9-4dcf4848c834
Response-Time: 1244
{
"id": "b89d9dd3-62ce-4f6f-eb0d-f78e57d515d9",
"login": "barbar",
"email": "[email protected]",
"companyName": "Example Inc",
"firstName": "BarBar",
"lastName": "Jinks",
"postalCode": "12345",
"phone": "1 (234) 567 890",
"updated": "2015-12-22T12:16:37.781Z",
"created": "2015-12-21T11:48:54.884Z"
}
When the operator has enabled the CloudAPI Provisioning Limits plugin, you can retreive your account limits and usage through this API.
- None
An array of provisioning limit objects. Possible values for each provisioning limit object are:
Field | Type | Description | Possible values |
by | String | The type of limit. Note that "machines" means the "number of machines". | "ram", "quota", or "machines". |
value | Number | The limit value. I.e. the total number of machines, total ram or total quota. | Ram is defined in terms of MiB. Quota is defined in terms of GiB. |
used | Number | How much of the limit is used by existing machines. | Ram is defined in terms of MiB. Quota is defined in terms of GiB. |
check | String | Optional. Restricts the limit to an image name or to an image os. | "image" or "os". |
os | String | Optional. When check is set to "os", this is the Image os name this limit will be restricted to. | |
image | String | Optional. When check is set to "image", this is the Image name this limit will be restricted to. |
Error Code | Description |
ResourceNotFound | If :login does not exist |
GET /my/limits HTTP/1.1
authorization: Signature keyId="..."
accept: application/json
accept-version: ~9
host: api.example.com
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 285
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, Api-Version, Response-Time
Access-Control-Allow-Methods: GET, HEAD, POST, PUT
Access-Control-Expose-Headers: Api-Version, Request-Id, Response-Time
Connection: Keep-Alive
Content-MD5: Sz+3BJ3EKDxL3MLQQumPgg==
Date: Tue, 01 Aug 2019 05:06:33 GMT
Server: Joyent Triton 9.8.0
Api-Version: 9.0.0
Request-Id: c3d496f0-a869-11e5-8662-47ccf5717dbf
Response-Time: 1455
[
{
"by": "machines",
"value": 100,
"used": 2
},
{
"by": "ram",
"value": 1024,
"used": 512
},
{
"check": "os",
"os": "linux",
"by": "quota",
"value": 1024,
"used": 1
}
]
Last modified 3yr ago