:::endpoint GET /v1/admin/sidebar

The order, the pins and the headings somebody chose for the admin sidebar on
the website, in the firm the request acts in. Arranging happens on the web.

A preference, never a list of what this person may open. Draw the screens from
[the permissions](/docs/api/admin/profile), and use this only to order them: an
id here that you do not know, or that this person may not open, is skipped, and
a screen this does not mention keeps its usual place. That is how the website
reads it too, and it means a new screen never waits for anybody to rearrange
their menu.

Needs a firm. Our own staff name one with the `Propper-Workspace` header.

## Request

```bash
curl https://api.proppertrading.com/v1/admin/sidebar \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Propper-Workspace: acme"
```

## Response

```json
{
    "data": {
        "object": "sidebar_layout",
        "arranged": true,
        "pinned": ["traders", "tickets"],
        "sections": [
            {
                "key": "crm",
                "label": "People",
                "items": ["traders", "kyc"],
                "hidden": false
            },
            {
                "key": "finance",
                "label": null,
                "items": ["payouts"],
                "hidden": true
            }
        ]
    },
    "meta": { "request_id": "req_01m501d5vyvf5pcm91r08xd4rz" }
}
```

| Field                | Description |
| -------------------- | ----------- |
| `arranged`           | False when this person never arranged anything here. `pinned` and `sections` are empty then, and the usual order applies |
| `pinned`             | Screen ids pinned to the top, in order |
| `sections[].key`     | The heading, by the key the website uses for it |
| `sections[].label`   | The name this person gave the heading, or null for its usual name |
| `sections[].items`   | Screen ids under it, in order |
| `sections[].hidden`  | Folded away on the web |

## Errors

| Status | Code                      | Meaning                                                          |
| ------ | ------------------------- | ---------------------------------------------------------------- |
| 400    | `workspace_required`      | Asked by our own staff without naming a firm                     |
| 401    | `invalid_token`           | Not a token, or the secret does not match                        |
| 401    | `revoked_token`           | Signed out here or from another device                           |
| 401    | `expired_token`           | Ninety days without use, or a set expiry passed                  |
| 403    | `admin_access_required`   | This account no longer helps run the environment                 |
| 403    | `insufficient_scope`      | This device does not hold `admin:read`                           |
| 403    | `workspace_not_permitted` | The `Propper-Workspace` header names an environment this account cannot act in |