Account
You can obtain your account details and update them through CloudAPI, although login cannot be changed, and password can not be retrieved.
GetAccount (GET /:login)
Retrieves your account details. Instead of providing your login name, you can also provide 'my' (i.e. GET /my).
Inputs
Returns
Account object:
Errors
For all possible errors, see CloudAPI HTTP Responses.
CLI Command
or
Example Request
GET /my HTTP/1.1
authorization: Signature keyId="..."
accept: application/json
accept-version: ~8
host: api.example.com
Example Response
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": "barbar@example.com",
"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"
}
UpdateAccount (POST /:login)
Update your account details with the given parameters.
Inputs
Returns
Account object:
Errors
For all possible errors, see CloudAPI HTTP Responses.
CLI Command
triton account update postalCode=12345 phone='1 (234) 567 890'
or
sdc-updateaccount --postal-code=12345 --phone='1 (234) 567 890'
Example Request
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
Example Response
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": "barbar@example.com",
"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"
}
GetAccountLimits (GET /:login/limits)
When the operator has enabled the CloudAPI Provisioning Limits plugin, you can retreive your account limits and usage through this API.
See the Provisioning Limits plugin for how limits are configured and used in Triton.
Inputs
Returns
An array of provisioning limit objects. Possible values for each provisioning limit object are:
Errors
For all possible errors, see CloudAPI HTTP Responses.
Example Request
GET /my/limits HTTP/1.1
authorization: Signature keyId="..."
accept: application/json
accept-version: ~9
host: api.example.com
Example Response
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
}
]
Keys