# admin

Superadmin operations: list resources across all users, batch delete, and transfer resources between users. Requires superadmin permissions.

## `carto admin list <resource-type>`

List all resources across the organization (not just yours).

```bash
carto admin list maps
carto admin list workflows
carto admin list connections

# With pagination and search
carto admin list maps --page-size 50
carto admin list connections --search snowflake

# Fetch every page
carto admin list maps --all
carto admin list workflows --all
```

**Resource types:** `maps`, `workflows`, `connections`.

**Options:**

| Option            | Description                    |
| ----------------- | ------------------------------ |
| `--page <n>`      | Page number.                   |
| `--page-size <n>` | Items per page.                |
| `--search <term>` | Search by name or description. |
| `--all`           | Fetch all pages automatically. |

## `carto admin batch-delete <json-body>`

Delete multiple resources in a single call.

```bash
carto admin batch-delete '{"resource_ids":["map1","map2","workflow1"]}'
```

## `carto admin transfer <json-body>`

Transfer resources from one user to another.

```bash
carto admin transfer '{
  "from_user": "user1@example.com",
  "to_user": "user2@example.com",
  "resource_ids": ["map1", "workflow1"]
}'
```

## `carto admin settings get | apply | diff`

Round-trip org-wide administrative settings (basemaps toggles, palettes, maps, connections, workflows, builder-gen-ai, carto-ai) as a single JSON bundle. The same shape that `apply` accepts is what `get` emits, so the three subcommands compose for moving settings between environments or capturing a snapshot for audit.

```bash
# Dump the current org settings to stdout
carto admin settings get

# Or write them to a file
carto admin settings get --out settings.json

# Preview what would change without writing
carto admin settings diff settings.json
cat settings.json | carto admin settings diff -

# Apply a bundle (per-section PATCH — only the sections present in the file are touched)
carto admin settings apply settings.json
carto admin settings apply --file settings.json
cat settings.json | carto admin settings apply -
```

**Subcommands:**

| Subcommand       | Description                                                                                                                  |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `settings get`   | Read the current org settings as a JSON bundle.                                                                              |
| `settings apply` | Apply a bundle. Sections present in the bundle are PATCHed individually; sections absent from the bundle are left untouched. |
| `settings diff`  | Preview what `apply` would change. Pure read-only — no writes.                                                               |

**Options:**

| Option          | Description                                                                             |
| --------------- | --------------------------------------------------------------------------------------- |
| `--out <file>`  | (`get` only) Write the bundle to a file instead of stdout.                              |
| `--file <path>` | (`apply` only) Read the bundle from a file instead of the positional argument or stdin. |


---

# Agent Instructions: 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:

```
GET https://docs.carto.com/carto-for-agents/cli/command-reference/admin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
