> For the complete documentation index, see [llms.txt](https://docs.mnx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mnx.io/cloudapi/api-details/account.md).

# Account

### GetAccount (GET /:login) <a href="#getaccount" id="getaccount"></a>

Retrieves your account details. Instead of providing your login name, you can also provide 'my' (i.e. GET /my).

#### Inputs <a href="#inputs" id="inputs"></a>

* None

#### Returns <a href="#returns" id="returns"></a>

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  |

#### Errors <a href="#errors" id="errors"></a>

For all possible errors, see [CloudAPI HTTP Responses](https://apidocs.joyent.com/cloudapi/#cloudapi-http-responses).

| **Error Code**   | **Description**            |
| ---------------- | -------------------------- |
| ResourceNotFound | If `:login` does not exist |

#### CLI Command <a href="#cli-command" id="cli-command"></a>

```
triton account get
```

or

```
sdc-getaccount
```

#### Example Request <a href="#example-request" id="example-request"></a>

```
GET /my HTTP/1.1
authorization: Signature keyId="..."
accept: application/json
accept-version: ~8
host: api.example.com
```

#### Example Response <a href="#example-response" id="example-response"></a>

```
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) <a href="#updateaccount" id="updateaccount"></a>

Update your account details with the given parameters.

#### Inputs <a href="#inputs-2" id="inputs-2"></a>

| **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 |

#### Returns <a href="#returns-2" id="returns-2"></a>

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  |

#### Errors <a href="#errors-2" id="errors-2"></a>

For all possible errors, see [CloudAPI HTTP Responses](https://apidocs.joyent.com/cloudapi/#cloudapi-http-responses).

| **Error Code**   | **Description**            |
| ---------------- | -------------------------- |
| ResourceNotFound | If `:login` does not exist |

#### CLI Command <a href="#cli-command-2" id="cli-command-2"></a>

```
triton account update postalCode=12345 phone='1 (234) 567 890'
```

or

```
sdc-updateaccount --postal-code=12345 --phone='1 (234) 567 890'
```

#### Example Request <a href="#example-request-2" id="example-request-2"></a>

```
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 <a href="#example-response-2" id="example-response-2"></a>

```
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) <a href="#getaccountlimits-get-loginlimits" id="getaccountlimits-get-loginlimits"></a>

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](https://apidocs.joyent.com/cloudapi/admin.html#appendix-a-provision-limits-plugin) plugin for how limits are configured and used in Triton.

#### Inputs <a href="#inputs-3" id="inputs-3"></a>

* None

#### Returns <a href="#returns-3" id="returns-3"></a>

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. | Usually, this will be one of `windows`, `linux`, `smartos`, `bsd` or `other`. See [IMGAPI os values](https://github.com/joyent/sdc-imgapi/blob/master/docs/index.md#manifest-os). |
| image     | String   | Optional. When `check` is set to "image", this is the Image `name` this limit will be restricted to. | See [IMGAPI image name](https://github.com/joyent/sdc-imgapi/blob/master/docs/index.md#manifest-name).                                                                            |

#### Errors <a href="#errors-3" id="errors-3"></a>

For all possible errors, see [CloudAPI HTTP Responses](https://apidocs.joyent.com/cloudapi/#cloudapi-http-responses).

| **Error Code**   | **Description**            |
| ---------------- | -------------------------- |
| ResourceNotFound | If `:login` does not exist |

#### Example Request <a href="#example-request-3" id="example-request-3"></a>

```
GET /my/limits HTTP/1.1
authorization: Signature keyId="..."
accept: application/json
accept-version: ~9
host: api.example.com
```

#### Example Response <a href="#example-response-3" id="example-response-3"></a>

```
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 <a href="#keys" id="keys"></a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mnx.io/cloudapi/api-details/account.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
