VegasLounge API 对接文档
  1. Database
VegasLounge API 对接文档
  • Shopping
    • Return list of Flight Offers based on posted searching criteria.
      POST
    • Return list of Flight Offers based on searching criteria.
      GET
  • Authorization
    • Access Granted Client Credentials
    • Get Token Information
  • Flights
    • (Scenario)Basic Flight Booking flow
      • Step 0: Authorization
      • Step 1: Flight Offers Search GET
      • Step 2: Flight Offers Price
      • Step 3: Flight Create Orders
    • Flight Booking
      • Flight Offers Search
      • Flight Offers Search
      • Flight Offers Price
      • Flight Create Orders
      • Flight Order Management
      • Flight Order Management
      • Seatmap Display
      • Seatmap Display
      • Branded Fares Upsell
      • Flight Price Analysis
      • Flight Choice Prediction
    • Flight Inspiration
      • Flight Inspiration Search
      • Flight Cheapest Date Search
      • Flight Availabilities Search
      • Travel Recommendations
    • Flight Schedule
      • On Demand Flight Status
      • Flight Delay Prediction
      • Airport On-Time Performance
    • Airport
      • Airport & City Search by Keyword
      • Airport & City Search by Id
      • Airport Nearest Relevant
      • Airport Routes
    • Airlines
      • Flight Check-in Links
      • Airline Code Lookup
      • Airline Routes
  • Destination experiences
    • Tours and Activities
    • Tours and Activities by Id
    • Tours and Activities by square
    • City Search
  • Car and Transfers
    • Transfer Search
    • Transfer Booking
    • Transfer Management
  • Market insights
    • Flight Most Traveled Destinations
    • Flight Most Booked Destinations
    • Flight Busiest Traveling Period
  • Hotels
    • (Scenario)Basic Hotel Booking flow
      • Step 0: Authorization
      • Step 1: Find Hotels by city
      • Step 2: Hotel Offers Search
      • Step 3: Hotel Booking v1
    • Hotel List by Id
    • Hotel List by Geocode
    • Hotel List by City
    • Hotel Search
    • Hotel Search Offer Information
    • Hotel Booking v1
    • Hotel Booking v2
    • Hotel Ratings
    • Hotel Name Autocomplete
  • Itinerary management
    • Trip Purpose Prediction
  • 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
  • IMEI
    • Get account details
    • Get list of available services
    • Create Bulk Search
    • Export CSV for Bulk Search
    • Export JSON for Bulk Search
    • Get list of Bulk Search history
    • Single service check
    • Get single history result
    • Get list of search history
    • SYNC-API Single service check
  • GPK
    • 玩家取得遊戲連結
  • SUPERSET
    • Menu
      • /menu/
    • Queries
      • /query/
      • /query/distinct/{column_name}
      • /query/related/{column_name}
      • /query/{pk}
      • /saved_query/
      • /saved_query/
      • /saved_query/
      • /saved_query/_info
      • /saved_query/distinct/{column_name}
      • /saved_query/export/
      • /saved_query/related/{column_name}
      • /saved_query/{pk}
      • /saved_query/{pk}
      • /saved_query/{pk}
    • 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
      • /async_event/
    • CacheRestApi
      • /cachekey/invalidate
    • Charts
      • /chart/
      • /chart/
      • /chart/
      • /chart/_info
      • /chart/data
      • /chart/data/{cache_key}
      • /chart/export/
      • /chart/favorite_status/
      • /chart/import/
      • /chart/related/{column_name}
      • /chart/{pk}
      • /chart/{pk}
      • /chart/{pk}
    • CSS Templates
      • /css_template/
      • /css_template/
      • /css_template/
      • /css_template/_info
      • /css_template/related/{column_name}
      • /css_template/{pk}
      • /css_template/{pk}
      • /css_template/{pk}
    • Dashboards
      • /dashboard/
      • /dashboard/
      • /dashboard/
      • /dashboard/_info
      • /dashboard/export/
      • /dashboard/favorite_status/
      • /dashboard/import/
      • /dashboard/related/{column_name}
      • /dashboard/{pk}
      • /dashboard/{pk}
      • /dashboard/{pk}
      • /dashboard/{pk}/charts
    • Database
      • /database/
        GET
      • /database/
        POST
      • /database/_info
        GET
      • /database/export/
        GET
      • /database/import/
        POST
      • /database/test_connection
        POST
      • /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
      • /dataset/
      • /dataset/
      • /dataset/
      • /dataset/_info
      • /dataset/distinct/{column_name}
      • /dataset/export/
      • /dataset/import/
      • /dataset/related/{column_name}
      • /dataset/{pk}
      • /dataset/{pk}
      • /dataset/{pk}
      • /dataset/{pk}/refresh
      • /dataset/{pk}/related_objects
    • LogRestApi
      • /log/
      • /log/
      • /log/{pk}
    • OpenApi
      • /openapi/{version}/_openapi
    • Security
      • /security/csrf_token/
      • /security/login
      • /security/refresh
  • VEGAS
    • BI
      • pre-login
      • login
      • dashboard
    • vl
      • Client API v2.0
        • Get Game List
      • Authentication API v2.0
        • Validate Authorization Code
        • Refresh Access Token
        • Get Account Information
      • Seamless Wallet API v2.0
        • Place Bet
        • Send Payoff
        • Reverse Transaction
        • Get Player Balance
      • Transfer Wallet API v2.0
        • Deposit money to the player's wallet.
        • Withdraw money from the player's wallet.
        • Get the current balance for the player.
        • Query players by balance.
        • Query player's total bet amount since last deposit.
        • Query player's bet/payout summary.
        • Query Total Loss Summary
      • Report API
        • Get Transfers
        • Check Transaction
        • Get Game History Link
        • Verify Transactions Summary
        • Get Detailed Betting Report
        • Get Betting Report
      • isonline
    • Vegaslounge
      • VEGASLOUNGE API集成指南手册
      • 客户端 CLIENT API
        • 示例 获取游戏列表
      • 身份验证 Authentication API
      • 转账钱包 TRANSFER WALLET
        • 示例: 获取玩家余额 Balance
        • 示例: 查询玩家指定余额 playersByBalance
        • 示例: 查询总损失总结 getTotalLoss API
        • 示例: 转入 DEPOSIT API
        • 示例: 转出 WITHDRAW API
        • 示例: 查询玩家最后存款投注金额 betAmountSinceLastDeposit
        • 示例: 查询玩家投注总结 getSummaryBet
        • 示例: 投注记录 REPORT/BETS API
      • 免转钱包 SEAMLESS WALLET
      • 报表 REPORT API
        • Verify Transactions
        • Check Transaction
        • Order Link
        • Verify Transactions Summary
        • Detailed Betting report
      • 附录
        • 投注类型
      • CompletedDOC
      • Verify Transactions
      • Check Transaction
      • Order Link
      • Verify Transactions Summary
      • Detailed Betting report
    • VL
      • report_bets
      • replay_Transfer
      • report_verifyTransactionsSummary
      • report_orderLink
      • report_checkTransaction
      • report_transfer
      • report_getTotalLoss
      • report_getSummaryBet
      • replay
      • betAmountSinceLastDeposit
      • playersByBalance
      • balance
      • withdrawal
      • deposit
    • VegasloungeAPI
      • 客户端 CLIENT API
        • 示例 获取游戏列表
      • 身份验证 Authentication API
      • 转账钱包 TRANSFER WALLET
        • 示例: 获取玩家余额 Balance
        • 示例: 查询玩家指定余额 playersByBalance
        • 示例: 查询总损失总结 getTotalLoss API
        • 示例: 转入 DEPOSIT API
        • 示例: 转出 WITHDRAW API
        • 示例: 查询玩家最后存款投注金额 betAmountSinceLastDeposit
        • 示例: 查询玩家投注总结 getSummaryBet
        • 示例: 投注记录 REPORT/BETS API
      • 免转钱包 SEAMLESS WALLET
      • 报表 REPORT API
        • Verify Transactions
        • Check Transaction
        • Order Link
        • Verify Transactions Summary
        • Detailed Betting report
      • CompletedDOC
        • 附录
          • 投注类型
      • Detailed Betting report
      • Verify Transactions Summary
      • Order Link
      • Check Transaction
      • Verify Transactions
  1. Database

/database/{pk}

PUT
/database/{pk}
Database
Changes a Database.

Request

Path Params
pk
integer 
required
Body Params application/json
allow_csv_upload
boolean 
optional
Allow to upload CSV file data into this databaseIf selected, please set the schemas allowed for csv upload in Extra.
allow_ctas
boolean 
optional
Allow CREATE TABLE AS option in SQL Lab
allow_cvas
boolean 
optional
Allow CREATE VIEW AS option in SQL Lab
allow_dml
boolean 
optional
Allow users to run non-SELECT statements (UPDATE, DELETE, CREATE, ...) in SQL Lab
allow_multi_schema_metadata_fetch
boolean 
optional
Allow SQL Lab to fetch a list of all tables and all views across all database schemas. For large data warehouse with thousands of tables, this can be expensive and put strain on the system.
allow_run_async
boolean 
optional
Operate the database in asynchronous mode, meaning that the queries are executed on remote workers as opposed to on the web server itself. This assumes that you have a Celery worker setup as well as a results backend. Refer to the installation docs for more information.
cache_timeout
integer <int32> | null 
optional
Duration (in seconds) of the caching timeout for charts of this database. A timeout of 0 indicates that the cache never expires. Note this defaults to the global timeout if undefined.
database_name
string  | null 
optional
A database name to identify this connection.
>= 1 characters<= 250 characters
encrypted_extra
string  | null 
optional
JSON string containing additional connection configuration.
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
Expose this database to SQLLab
extra
string 
optional
JSON string containing extra configuration elements.
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 empty
4. the version field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct
5. 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
When allowing CREATE TABLE AS option in SQL Lab, this option forces the table to be created in this schema
>= 0 characters<= 250 characters
impersonate_user
boolean 
optional
If Presto, all the queries in SQL Lab are going to be executed as the currently logged on user who must have permission to run them.
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
Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.
sqlalchemy_uri
string  | null 
optional
Refer to the SqlAlchemy docs for more information on how to structure your URI.
>= 0 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 PUT '/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

🟢200OK
application/json
Database changed
Body
id
number 
optional
result
object (DatabaseRestApi.put) 
optional
allow_csv_upload
boolean 
optional
Allow to upload CSV file data into this databaseIf selected, please set the schemas allowed for csv upload in Extra.
allow_ctas
boolean 
optional
Allow CREATE TABLE AS option in SQL Lab
allow_cvas
boolean 
optional
Allow CREATE VIEW AS option in SQL Lab
allow_dml
boolean 
optional
Allow users to run non-SELECT statements (UPDATE, DELETE, CREATE, ...) in SQL Lab
allow_multi_schema_metadata_fetch
boolean 
optional
Allow SQL Lab to fetch a list of all tables and all views across all database schemas. For large data warehouse with thousands of tables, this can be expensive and put strain on the system.
allow_run_async
boolean 
optional
Operate the database in asynchronous mode, meaning that the queries are executed on remote workers as opposed to on the web server itself. This assumes that you have a Celery worker setup as well as a results backend. Refer to the installation docs for more information.
cache_timeout
integer <int32> | null 
optional
Duration (in seconds) of the caching timeout for charts of this database. A timeout of 0 indicates that the cache never expires. Note this defaults to the global timeout if undefined.
database_name
string  | null 
optional
A database name to identify this connection.
>= 1 characters<= 250 characters
encrypted_extra
string  | null 
optional
JSON string containing additional connection configuration.
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
Expose this database to SQLLab
extra
string 
optional
JSON string containing extra configuration elements.
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 empty
4. the version field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct
5. 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
When allowing CREATE TABLE AS option in SQL Lab, this option forces the table to be created in this schema
>= 0 characters<= 250 characters
impersonate_user
boolean 
optional
If Presto, all the queries in SQL Lab are going to be executed as the currently logged on user who must have permission to run them.
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
Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.
sqlalchemy_uri
string  | null 
optional
Refer to the SqlAlchemy docs for more information on how to structure your URI.
>= 0 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"
    }
}
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
🟠422Parameter Error
🔴500Server Error
Previous
/database/{pk}
Next
/database/{pk}/function_names/
Built with