Merk
Tilgang til denne siden krever autorisasjon. Du kan prøve å logge på eller endre kataloger.
Tilgang til denne siden krever autorisasjon. Du kan prøve å endre kataloger.
Create or update an autoentities definition in an existing Data API builder configuration file. Autoentities define pattern-based rules that automatically expose matching database objects as DAB entities at startup.
See Auto configuration.
Syntax
dab auto-config <definition-name> [options]
Quick glance
| Option | Summary |
|---|---|
-c, --config |
Config file path. Default dab-config.json. |
Head section
| Option | Summary |
|---|---|
<definition-name> |
Required. Name of the autoentities definition to configure. |
--patterns.include |
T-SQL LIKE patterns to include database objects. Default: %.%. |
--patterns.exclude |
T-SQL LIKE patterns to exclude database objects. Default: null. |
--patterns.name |
Interpolation syntax for entity naming. Default: {object}. |
--permissions |
Permissions in role:actions format. Default: null. |
Template section
| Option | Summary |
|---|---|
--template.rest.enabled |
Enable/disable REST for matched entities. Default: true. |
--template.graphql.enabled |
Enable/disable GraphQL for matched entities. Default: true. |
--template.mcp.dml-tool |
Enable/disable Model Context Protocol (MCP) data manipulation language (DML) tools for matched entities. Default: true. |
--template.health.enabled |
Enable/disable health checks for matched entities. Default: true. |
--template.cache.enabled |
Enable/disable caching for matched entities. Default: false. |
--template.cache.ttl-seconds |
Cache time-to-live in seconds. Default: null. |
--template.cache.level |
Cache level. Allowed values: L1, L1L2. Default: L1L2. |
<definition-name>
Required positional argument. Logical name of the autoentities definition. Case-sensitive. If the definition already exists, DAB updates it; otherwise, DAB creates it.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"patterns": {
"include": [ "dbo.%" ]
},
"permissions": [
{
"role": "anonymous",
"actions": [ { "action": "read" } ]
}
]
}
}
}
-c, --config
Path to config file. Defaults to dab-config.json unless dab-config.<DAB_ENVIRONMENT>.json exists, where DAB_ENVIRONMENT is an environment variable.
Example
dab auto-config my-def \
--config ./dab-config.json \
--patterns.include "dbo.%"
Resulting config
{
"autoentities": {
"my-def": {
"patterns": {
"include": [ "dbo.%" ]
}
}
}
}
--patterns.include
T-SQL LIKE patterns to include database objects. Space-separated array. The pattern format is schema.object (for example, dbo.%). Default: %.%.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"patterns": {
"include": [ "dbo.%" ]
},
"permissions": [
{
"role": "anonymous",
"actions": [ { "action": "read" } ]
}
]
}
}
}
--patterns.exclude
T-SQL LIKE patterns to exclude database objects. Space-separated array. Exclude patterns are evaluated after include patterns. Default: null.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--patterns.exclude "dbo.internal%" \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"patterns": {
"include": [ "dbo.%" ],
"exclude": [ "dbo.internal%" ]
},
"permissions": [
{
"role": "anonymous",
"actions": [ { "action": "read" } ]
}
]
}
}
}
--patterns.name
Interpolation syntax for entity naming. Supports {schema} and {object} placeholders. Must be unique for each generated entity. Default: {object}.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--patterns.name "{schema}_{object}" \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"patterns": {
"include": [ "dbo.%" ],
"name": "{schema}_{object}"
},
"permissions": [
{
"role": "anonymous",
"actions": [ { "action": "read" } ]
}
]
}
}
}
--permissions
Permissions for all matched entities in role:actions format. Default: null.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"permissions": [
{
"role": "anonymous",
"actions": [ { "action": "read" } ]
}
]
}
}
}
--template.rest.enabled
Enable or disable REST endpoints for all matched entities. Allowed values: true, false. Default: true.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--template.rest.enabled true \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"template": {
"rest": { "enabled": true }
}
}
}
}
--template.graphql.enabled
Enable or disable GraphQL for all matched entities. Allowed values: true, false. Default: true.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--template.graphql.enabled true \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"template": {
"graphql": { "enabled": true }
}
}
}
}
--template.mcp.dml-tool
Enable or disable MCP DML tools for all matched entities. Allowed values: true, false. Default: true.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--template.mcp.dml-tool true \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"template": {
"mcp": { "dml-tools": true }
}
}
}
}
--template.health.enabled
Enable or disable health checks for all matched entities. Allowed values: true, false. Default: true.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--template.health.enabled true \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"template": {
"health": { "enabled": true }
}
}
}
}
--template.cache.enabled
Enable or disable response caching for all matched entities. Allowed values: true, false. Default: false.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--template.cache.enabled true \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"template": {
"cache": { "enabled": true }
}
}
}
}
--template.cache.ttl-seconds
Cache time-to-live in seconds for all matched entities. Default: null.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--template.cache.enabled true \
--template.cache.ttl-seconds 30 \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"template": {
"cache": {
"enabled": true,
"ttl-seconds": 30
}
}
}
}
}
--template.cache.level
Cache level for all matched entities. Allowed values: L1, L1L2. Default: L1L2.
Example
dab auto-config my-def \
--patterns.include "dbo.%" \
--template.cache.enabled true \
--template.cache.ttl-seconds 30 \
--template.cache.level L1L2 \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"template": {
"cache": {
"enabled": true,
"ttl-seconds": 30,
"level": "l1l2"
}
}
}
}
}
Full example
dab auto-config my-def \
--patterns.include "dbo.%" \
--patterns.exclude "dbo.internal%" \
--patterns.name "{schema}_{object}" \
--template.rest.enabled true \
--template.graphql.enabled true \
--template.cache.enabled true \
--template.cache.ttl-seconds 30 \
--template.cache.level L1L2 \
--permissions "anonymous:read"
Resulting config
{
"autoentities": {
"my-def": {
"patterns": {
"include": [ "dbo.%" ],
"exclude": [ "dbo.internal%" ],
"name": "{schema}_{object}"
},
"template": {
"rest": { "enabled": true },
"graphql": { "enabled": true },
"cache": {
"enabled": true,
"ttl-seconds": 30,
"level": "l1l2"
}
},
"permissions": [
{
"role": "anonymous",
"actions": [ { "action": "read" } ]
}
]
}
}
}