> ## Documentation Index
> Fetch the complete documentation index at: https://platform.atlan.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on Atlan objects, use the Atlan MCP server at https://api.atlan.com/mcp or the atlanai CLI; `atlanai --map json` prints its command map. Run a read-only identity check before any write.
> The docs MCP server at /mcp searches these docs only. It cannot read or change Atlan objects.
> SDK packages: Python `atlanai` (PyPI) and TypeScript `@atlanai/sdk` (npm). Show Python first, then TypeScript.

# Make your first API read

> Verify a bearer credential, list visible workspaces, and list Skills with the public HTTP API.

Use this quickstart when you have a pre-provisioned credential and need to
confirm what it can read. The three requests are read-only. They do not create
or change Registry content.

<Note>
  **Preview.** Run the requests in an approved development environment before
  relying on them in production automation.
</Note>

## Before you start

* Obtain a bearer credential through your organization's access process.
* Keep it in an approved secret store or ignored local environment file.
* Set the public Gateway URL and credential in your shell:

```bash theme={null}
export ATLAN_GATEWAY_URL="https://api.atlan.com"
export ATLAN_TOKEN="<token>"
```

## Choose your interface

The identity response confirms the caller and whether it has completed
onboarding. Workspace and Skill lists return visible results; an empty list is
still a successful read.

<Tabs>
  <Tab title="CLI">
    Use the CLI for local work, CI jobs, and coding agents that need
    machine-readable output.

    ```bash theme={null}
    atlanai auth status
    atlanai workspace list --json id,display_name,effective_role
    atlanai skill list --json id,name,artifact_status
    ```

    `auth status` identifies the resolved account and credential source without
    printing the credential. Select a workspace returned by `workspace list`
    before a write.
  </Tab>

  <Tab title="JavaScript">
    Atlan publishes tracing SDKs, not a management client package, so call the
    management API over HTTP. This helper applies a timeout, checks the
    response content type, and surfaces the documented problem body on failure.

    ```js theme={null}
    export function createAtlanJsonClient({ gatewayUrl, token, timeoutMs = 10_000 }) {
      return async function requestJson(path, init = {}) {
        const headers = new Headers(init.headers);
        headers.set("Authorization", `Bearer ${token}`);
        if (init.body != null && !headers.has("Content-Type")) {
          headers.set("Content-Type", "application/json");
        }

        const response = await fetch(new URL(path, gatewayUrl), {
          ...init,
          headers,
          signal: init.signal ?? AbortSignal.timeout(timeoutMs),
        });
        const contentType = response.headers.get("content-type") ?? "";
        const isJson = contentType.includes("application/json") ||
          contentType.includes("application/problem+json");
        const body = isJson ? await response.json() : await response.text();

        if (!response.ok) {
          const error = new Error(body?.detail ?? `Atlan API returned ${response.status}`);
          error.status = response.status;
          error.code = body?.code;
          error.traceId = body?.trace_id;
          throw error;
        }
        if (!isJson) throw new TypeError("Expected a JSON response");
        return body;
      };
    }
    ```

    Then use it for the same three reads:

    ```js theme={null}
    const atlan = createAtlanJsonClient({
      gatewayUrl: process.env.ATLAN_GATEWAY_URL,
      token: process.env.ATLAN_TOKEN,
    });

    const [identity, workspaces, skills] = await Promise.all([
      atlan("/registry/v1/auth/whoami"),
      atlan("/registry/v1/workspaces?limit=20"),
      atlan("/skill/v1/skills?limit=20"),
    ]);
    console.log({ identity, workspaces, skills });
    ```

    Bundle and file endpoints return bytes, not JSON. Use a separate reader for
    those — see [Skills](/cookbooks/how-tos/skills).
  </Tab>
</Tabs>

## Verify the result

Confirm that the identity is the expected account, then choose a workspace
returned by the CLI or SDK response before a write. If the response is an
error, use [Errors and retries](/platform/references/errors-and-retries); do not change
a workspace ID or retry a write until you understand the result.

Next, [publish and retrieve a Skill](/cookbooks/how-tos/skills) or use the
[CLI Skill workflow](/tools/cli/tutorials/get-started).
