Skip to navigation

Run Query

Runs a SQL query against a database snapshot.

This method is asynchronous. It returns a query ID that you can use to check the status of the query. You can then use the query ID to call Get Query Status and Get Query Result.

When the query is complete, the results are saved as a CSV to the location you specify in your restore account.

If the request fails, see Troubleshooting Queries for possible errors and how to resolve them.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

projectIdstringRequiredformat: "uuid"

ID of the project that contains the database snapshot you want to retrieve. You can see your project ID in the API Credentials page in your global management console.

snapshotIdstringRequiredformat: "uuid"

ID of the database snapshot you want to query. Snapshot must belong to an RDS resource.

Request

This endpoint expects an object.
databaseNamestringRequired
Name of the database to query.
querystringRequired

SQL query to run against the database. Support is limited to Athena SELECT queries.

restoreAccountIdstringRequired

Eon-assigned ID of the restore account.

destinationobjectRequired
Storage location to store CSV of query results to.

Response

Querying database.
queryIdstring

Query ID. Can be used to call Get Query Status and Get Query Result.