- Shopping
- Authorization
- Flights
- Destination experiences
- Car and Transfers
- Market insights
- Hotels
- Itinerary management
- STARGAME
- Common errors
- InitialGetBalance
- InitialGetBalance
- GetBalanceBadHash
- GetBalanceBadHash
- InvalidCommand
- InvalidCommand
- InvalidUserName
- InvalidUserName
- PlayerBetMissingTransactionId
- PlayerBetMissingTransactionId
- PlayerWinEmptyTransactionId
- PlayerWinEmptyTransactionId
- PlayerBetNegativeAmount
- PlayerBetNegativeAmount
- PlayerWinNegativeAmount
- PlayerWinNegativeAmount
- PlayerBetInsufficientBalance
- PlayerBetInsufficientBalance
- CheckBalance
- CheckBalance
- Workflow
- OpenSession
- OpenSession
- OpenSessionAlreadyOpened
- OpenSessionAlreadyOpened
- GetBalance
- GetBalance
- PlayerBet #1 (-50)
- PlayerBet #1 (-50)
- PlayerWin (+150)
- PlayerWin (+150)
- PlayerBet #2 (-50)
- PlayerBet #2 (-50)
- PlayerWinZeroAmount (+0)
- PlayerWinZeroAmount (+0)
- PlayerBet #3 (-50)
- PlayerBet #3 (-50)
- PlayerWin (+200)
- PlayerWin (+200)
- PlayerWinTransactionAlreadyExist
- PlayerWinTransactionAlreadyExist
- PlayerBet #4 (-200)
- PlayerBet #4 (-200)
- PlayerBetTransactionAlreadyExist
- PlayerBetTransactionAlreadyExist
- PlayerBetBadHash
- PlayerBetBadHash
- PlayerWinBadHash
- PlayerWinBadHash
- CancelBet #4 (+200)
- CancelBet #4 (+200)
- CancelBetAlreadyCancelled
- CancelBetAlreadyCancelled
- CancelBetDoesNotExist
- CancelBetDoesNotExist
- PlayerBet #5 (-50)
- PlayerBet #5 (-50)
- CloseSession
- CloseSession
- PlayerBet #6 (-250)
- PlayerBet #6 (-250)
- PlayerWin (+50)
- PlayerWin (+50)
- CancelBet #5 (+50)
- CancelBet #5 (+50)
- PlayerBet #7 (-100)
- PlayerBet #7 (-100)
- PlayerBet #8 (-50)
- PlayerBet #8 (-50)
- PlayerBet #9 (-25)
- PlayerBet #9 (-25)
- PlayerBet #10 (-25)
- PlayerBet #10 (-25)
- PlayerBet #11 (-50)
- PlayerBet #11 (-50)
- CancelBet #7 (+100)
- CancelBet #7 (+100)
- CancelBet #9 (+25)
- CancelBet #9 (+25)
- CancelBet #11 (+50)
- CancelBet #11 (+50)
- PlayerWin (+75)
- PlayerWin (+75)
- CloseSessionAlreadyClosed
- CloseSessionAlreadyClosed
- FinalCheckBalance
- FinalCheckBalance
- RemoteSession
- Common errors
- IMEI
- GPK
- SUPERSET
- Menu
- Queries
- Annotation Layers
- /annotation_layer/
- /annotation_layer/
- /annotation_layer/
- /annotation_layer/_info
- /annotation_layer/related/{column_name}
- /annotation_layer/{pk}
- /annotation_layer/{pk}
- /annotation_layer/{pk}
- /annotation_layer/{pk}/annotation/
- /annotation_layer/{pk}/annotation/
- /annotation_layer/{pk}/annotation/
- /annotation_layer/{pk}/annotation/{annotation_id}
- /annotation_layer/{pk}/annotation/{annotation_id}
- /annotation_layer/{pk}/annotation/{annotation_id}
- AsyncEventsRestApi
- CacheRestApi
- Charts
- CSS Templates
- Dashboards
- Database
- /database/GET
- /database/POST
- /database/_infoGET
- /database/export/GET
- /database/import/POST
- /database/test_connectionPOST
- /database/{pk}DELETE
- /database/{pk}GET
- /database/{pk}PUT
- /database/{pk}/function_names/GET
- /database/{pk}/related_objects/GET
- /database/{pk}/schemas/GET
- /database/{pk}/select_star/{table_name}/GET
- /database/{pk}/select_star/{table_name}/{schema_name}/GET
- /database/{pk}/table/{table_name}/{schema_name}/GET
- Datasets
- LogRestApi
- OpenApi
- Security
- VEGAS
- BI
- vl
- Vegaslounge
- VL
- VegasloungeAPI
/database/
POST
/database/
Database
Request
Body Params application/json
allow_csv_upload
boolean
optional
allow_ctas
boolean
optional
allow_cvas
boolean
optional
allow_dml
boolean
optional
allow_multi_schema_metadata_fetch
boolean
optional
allow_run_async
boolean
optional
cache_timeout
integer <int32> | null
optional
database_name
string
required
>= 1 characters<= 250 characters
encrypted_extra
string | null
optional
This is used to provide connection information for systems like Hive, Presto, and BigQuery, which do not conform to the username:password syntax normally used by SQLAlchemy.
expose_in_sqllab
boolean
optional
extra
string
optional
1. The
engine_params
object gets unpacked into the sqlalchemy.create_engine call, while the metadata_params
gets unpacked into the sqlalchemy.MetaData call.2. The
metadata_cache_timeout
is a cache timeout setting in seconds for metadata fetch of this database. Specify it as "metadata_cache_timeout": {"schema_cache_timeout": 600, "table_cache_timeout": 600}. If unset, cache will not be enabled for the functionality. A timeout of 0 indicates that the cache never expires.3. The
schemas_allowed_for_csv_upload
is a comma separated list of schemas that CSVs are allowed to upload to. Specify it as "schemas_allowed_for_csv_upload": ["public", "csv_upload"]. If database flavor does not support schema or any schema is allowed to be accessed, just leave the list empty4. the
version
field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct5. The
allows_virtual_table_explore
field is a boolean specifying whether or not the Explore button in SQL Lab results is shown.force_ctas_schema
string | null
optional
>= 0 characters<= 250 characters
impersonate_user
boolean
optional
If Hive and hive.server2.enable.doAs is enabled, will run the queries as service account, but impersonate the currently logged on user via hive.server2.proxy.user property.
server_cert
string | null
optional
sqlalchemy_uri
string
required
>= 1 characters<= 1024 characters
Example
{
"allow_csv_upload": true,
"allow_ctas": true,
"allow_cvas": true,
"allow_dml": true,
"allow_multi_schema_metadata_fetch": true,
"allow_run_async": true,
"cache_timeout": 0,
"database_name": "string",
"encrypted_extra": "string",
"expose_in_sqllab": true,
"extra": "string",
"force_ctas_schema": "string",
"impersonate_user": true,
"server_cert": "string",
"sqlalchemy_uri": "string"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/database/' \
--header 'Content-Type: application/json' \
--data-raw '{
"allow_csv_upload": true,
"allow_ctas": true,
"allow_cvas": true,
"allow_dml": true,
"allow_multi_schema_metadata_fetch": true,
"allow_run_async": true,
"cache_timeout": 0,
"database_name": "string",
"encrypted_extra": "string",
"expose_in_sqllab": true,
"extra": "string",
"force_ctas_schema": "string",
"impersonate_user": true,
"server_cert": "string",
"sqlalchemy_uri": "string"
}'
Responses
🟢201Created
application/json
Body
id
number
optional
result
object (DatabaseRestApi.post)
optional
allow_csv_upload
boolean
optional
allow_ctas
boolean
optional
allow_cvas
boolean
optional
allow_dml
boolean
optional
allow_multi_schema_metadata_fetch
boolean
optional
allow_run_async
boolean
optional
cache_timeout
integer <int32> | null
optional
database_name
string
required
>= 1 characters<= 250 characters
encrypted_extra
string | null
optional
This is used to provide connection information for systems like Hive, Presto, and BigQuery, which do not conform to the username:password syntax normally used by SQLAlchemy.
expose_in_sqllab
boolean
optional
extra
string
optional
1. The
engine_params
object gets unpacked into the sqlalchemy.create_engine call, while the metadata_params
gets unpacked into the sqlalchemy.MetaData call.2. The
metadata_cache_timeout
is a cache timeout setting in seconds for metadata fetch of this database. Specify it as "metadata_cache_timeout": {"schema_cache_timeout": 600, "table_cache_timeout": 600}. If unset, cache will not be enabled for the functionality. A timeout of 0 indicates that the cache never expires.3. The
schemas_allowed_for_csv_upload
is a comma separated list of schemas that CSVs are allowed to upload to. Specify it as "schemas_allowed_for_csv_upload": ["public", "csv_upload"]. If database flavor does not support schema or any schema is allowed to be accessed, just leave the list empty4. the
version
field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct5. The
allows_virtual_table_explore
field is a boolean specifying whether or not the Explore button in SQL Lab results is shown.force_ctas_schema
string | null
optional
>= 0 characters<= 250 characters
impersonate_user
boolean
optional
If Hive and hive.server2.enable.doAs is enabled, will run the queries as service account, but impersonate the currently logged on user via hive.server2.proxy.user property.
server_cert
string | null
optional
sqlalchemy_uri
string
required
>= 1 characters<= 1024 characters
Example
{
"id": 0,
"result": {
"allow_csv_upload": true,
"allow_ctas": true,
"allow_cvas": true,
"allow_dml": true,
"allow_multi_schema_metadata_fetch": true,
"allow_run_async": true,
"cache_timeout": 0,
"database_name": "string",
"encrypted_extra": "string",
"expose_in_sqllab": true,
"extra": "string",
"force_ctas_schema": "string",
"impersonate_user": true,
"server_cert": "string",
"sqlalchemy_uri": "string"
}
}
🔵302302
🟠400Bad Request
🟠401Unauthorized
🟠404Record Not Found
🔴500Server Error