# dap schema

This command generates and downloads the schema of a specific table within a specified namespace in JSON format.

### Usage

```
dap [arguments] schema [flags]
```

### Options

**`--namespace <string>`**\
Specifies the data source (namespace). Available options: {canvas, canvas\_logs, catalog, new\_quizzes}.

**`--table <string>`**\
Specifies the tables whose schemas to fetch. Can be a single table name, a comma separated list of table names or the special `all` keyword to fetch all tables in the namespace.

**`--output-directory <string> (default: downloads)`**\
Specifies the absolute or relative path to the output directory where the snapshot will be stored.

### Global options

**`--client-id <string>`**\
Client ID obtained from the Identity Service. Skip, if `DAP_CLIENT_ID` environment variable is set.

**`--client-secret <string>`**\
Client Secret obtained from the Identity Service. Skip, if `DAP_CLIENT_SECRET` environment variable is set.

**`-h, --help`**\
Displays help information for the command.

### Examples

Get schema of `courses` and `users` tables from the `canvas` namespace:\
`$ dap schema --namespace canvas --table courses,users`

Get schema of all tables from the `canvas` namespace:\
`$ dap schema --namespace canvas --table all`

### Related Resources

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Key Concepts</strong></td><td>Get familiar with the key concepts in DAP.</td><td><a href="/pages/cJaYwvmMF5X5JAaAk5t2">/pages/cJaYwvmMF5X5JAaAk5t2</a></td></tr><tr><td><strong>Rate Limits &#x26; Policies</strong></td><td>Learn more about the limits and our policies in DAP.</td><td><a href="/pages/IMS6CiJ696rMh5SIknEA">/pages/IMS6CiJ696rMh5SIknEA</a></td></tr><tr><td><strong>Datasets</strong></td><td>Discover the available namespaces and tables.</td><td><a href="/pages/ZPKfCGb0n7ZXL6lqNaBr">/pages/ZPKfCGb0n7ZXL6lqNaBr</a></td></tr></tbody></table>


---

# 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://developerdocs.instructure.com/services/dap/dap-cli-readme/dap-cli-reference/dap-cli-reference-schema.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.
