# Get an account's architecture

`GET https://evohub.io/api/v1/catalog/connections/{id}/architecture`

Part of the [Catalog API](https://docs.evohub.io/catalog.md) reference · operationId `getConnectionArchitecture`.

One region of the account laid out from what it reported: each
network (VPC) with its internet gateway, peerings and subnets
(public or private, and the NAT gateway a private one leaves
through), what runs in each subnet, what spans the network, what
sits outside any network, the security groups, and the links between
them. A node lists the admin ports its security groups open to the
whole internet.

Requires the `identity:cloudaccount:read` and `catalog:resource:read` scopes.

## Authorization

Any one of:

- `bearerKey`
- `headerKey`

Where:

- `bearerKey`: HTTP Bearer — An EvoHub API key (`evohub_…`) as a bearer token.
- `headerKey`: API key in the header `X-API-Key` — An EvoHub API key (`evohub_…`).

## Path parameters

- `id` (string, required, example `con_7d9f1b3a5c7e9a2c4e6b8d0f2a4c6e8b`): The cloud account's ID.

## Query parameters

- `region` (string, example `eu-central-1`): The region to lay out. `regions` in the answer lists those with resources.

## Responses

### 200 — The architecture.

Content type: `application/json`

Type: `object`

- `data` (Architecture)
  - `connection_id` (string)
  - `provider` (string)
  - `account_id` (string)
  - `region` (string)
  - `regions` (array of object)
  - `vpcs` (array of object): Each network with its internet gateway, subnets, what spans it and its peerings.
  - `outside` (array of object): What sits in no network, such as buckets.
  - `security_groups` (array of object)
  - `links` (array of object): `traffic`, `egress`, `internet` and `allows` links between nodes.
  - `links_truncated` (boolean)

### 400 — The request is not valid: a field or filter value is wrong (`VALIDATION_ERROR`, with a sentence saying what), the body is not the expected JSON or carries an unknown field (`INVALID_BODY`), the cursor is not one this list gave (`INVALID_CURSOR`), a binding names a service that does not exist (`UNKNOWN_COMPONENT`), or a `PATCH` tries to change a slug (`SLUG_IMMUTABLE`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 401 — No API key was sent, or it is unknown, revoked or expired (`UNAUTHORIZED`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 403 — The key lacks a scope this endpoint needs (`FORBIDDEN`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 404 — Nothing with this ID (or slug) exists in the organization (`NOT_FOUND`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 429 — Too many requests (`RATE_LIMITED`). Wait for `Retry-After` seconds.

Headers:

- `Retry-After` (integer): Seconds to wait before retrying.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 500 — Something went wrong on EvoHub's side (`INTERNAL_ERROR`). Retry later.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

## Example request

```bash
curl -X GET 'https://evohub.io/api/v1/catalog/connections/con_7d9f1b3a5c7e9a2c4e6b8d0f2a4c6e8b/architecture' \
  -H 'Authorization: Bearer <TOKEN>'
```
