Overview
API for Cloud SQL database instance management
Cloud SQL Admin API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 106 endpoints.
At a glance
- Authentication
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Analytics
- Base URL
https://sqladmin.googleapis.com/- Version
- v1
- Endpoints
- 106
- OpenAPI
- Specification ↗
- Spec updated
- 2023-04-21
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://sqladmin.googleapis.com/sql/v1beta4/flags" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://sqladmin.googleapis.com/sql/v1beta4/flags", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://sqladmin.googleapis.com/sql/v1beta4/flags",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /sql/v1beta4/flags | Lists all available database flags for Cloud SQL instances. |
| GET | /sql/v1beta4/projects/{project}/instances | Lists instances under a given project. |
| POST | /sql/v1beta4/projects/{project}/instances | Creates a new Cloud SQL instance. |
| GET | /sql/v1beta4/projects/{project}/instances/{instance} | Retrieves a resource containing information about a Cloud SQL instance. |
| PUT | /sql/v1beta4/projects/{project}/instances/{instance} | Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. |
| PATCH | /sql/v1beta4/projects/{project}/instances/{instance} | Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics. |
| DELETE | /sql/v1beta4/projects/{project}/instances/{instance} | Deletes a Cloud SQL instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/addServerCa | Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/backupRuns | Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/backupRuns | Creates a new backup run on demand. |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id} | Retrieves a resource containing information about a backup run. |
| DELETE | /sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id} | Deletes the backup taken by a backup run. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/clone | Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/connectSettings | Retrieves connect settings about a Cloud SQL instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral | Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certi |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/databases | Lists databases in the specified Cloud SQL instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/databases | Inserts a resource containing information about a database inside a Cloud SQL instance. |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/databases/{database} | Retrieves a resource containing information about a database inside a Cloud SQL instance. |
| PUT | /sql/v1beta4/projects/{project}/instances/{instance}/databases/{database} | Updates a resource containing information about a database inside a Cloud SQL instance. |
| PATCH | /sql/v1beta4/projects/{project}/instances/{instance}/databases/{database} | Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics. |
| DELETE | /sql/v1beta4/projects/{project}/instances/{instance}/databases/{database} | Deletes a database from a Cloud SQL instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster | Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/export | Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/failover | Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to t |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/getDiskShrinkConfig | Get Disk Shrink Config for a given instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/import | Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/listServerCas | Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certifi |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/performDiskShrink | Perform Disk Shrink on primary instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica | Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance | Reschedules the maintenance on the given instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/resetReplicaSize | Reset Replica Size to primary instance disk size. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig | Deletes all client certificates and generates a new server SSL certificate for the instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/restart | Restarts a Cloud SQL instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup | Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa | Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/sslCerts | Lists all of the current SSL certificates for the instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/sslCerts | Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint} | Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creati |
| DELETE | /sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint} | Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync | Start External primary instance migration. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/startReplica | Starts the replication in the read replica instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/stopReplica | Stops the replication in the read replica instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/truncateLog | Truncate MySQL general and slow query log tables MySQL only. |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/users | Lists users in the specified Cloud SQL instance. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/users | Creates a new user in a Cloud SQL instance. |
| PUT | /sql/v1beta4/projects/{project}/instances/{instance}/users | Updates an existing user in a Cloud SQL instance. |
| DELETE | /sql/v1beta4/projects/{project}/instances/{instance}/users | Deletes a user from a Cloud SQL instance. |
| GET | /sql/v1beta4/projects/{project}/instances/{instance}/users/{name} | Retrieves a resource containing information about a user. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings | Verify External primary instance external sync settings. |
| POST | /sql/v1beta4/projects/{project}/instances/{instance}:generateEphemeralCert | Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certi |
| GET | /sql/v1beta4/projects/{project}/operations | Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time. |
| GET | /sql/v1beta4/projects/{project}/operations/{operation} | Retrieves an instance operation that has been performed on an instance. |
| GET | /sql/v1beta4/projects/{project}/tiers | Lists all available machine types (tiers) for Cloud SQL, for example, `db-custom-1-3840`. For related information, see [Pricing](/sql/pricing). |
| GET | /v1/flags | Lists all available database flags for Cloud SQL instances. |
| GET | /v1/projects/{project}/instances | Lists instances under a given project. |
| POST | /v1/projects/{project}/instances | Creates a new Cloud SQL instance. |
| GET | /v1/projects/{project}/instances/{instance} | Retrieves a resource containing information about a Cloud SQL instance. |
| PUT | /v1/projects/{project}/instances/{instance} | Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. |
| PATCH | /v1/projects/{project}/instances/{instance} | Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics. |
| DELETE | /v1/projects/{project}/instances/{instance} | Deletes a Cloud SQL instance. |
| POST | /v1/projects/{project}/instances/{instance}/addServerCa | Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously |
| GET | /v1/projects/{project}/instances/{instance}/backupRuns | Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time. |
| POST | /v1/projects/{project}/instances/{instance}/backupRuns | Creates a new backup run on demand. |
| GET | /v1/projects/{project}/instances/{instance}/backupRuns/{id} | Retrieves a resource containing information about a backup run. |
| DELETE | /v1/projects/{project}/instances/{instance}/backupRuns/{id} | Deletes the backup taken by a backup run. |
| POST | /v1/projects/{project}/instances/{instance}/clone | Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. |
| GET | /v1/projects/{project}/instances/{instance}/connectSettings | Retrieves connect settings about a Cloud SQL instance. |
| POST | /v1/projects/{project}/instances/{instance}/createEphemeral | Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certi |
| GET | /v1/projects/{project}/instances/{instance}/databases | Lists databases in the specified Cloud SQL instance. |
| POST | /v1/projects/{project}/instances/{instance}/databases | Inserts a resource containing information about a database inside a Cloud SQL instance. |
| GET | /v1/projects/{project}/instances/{instance}/databases/{database} | Retrieves a resource containing information about a database inside a Cloud SQL instance. |
| PUT | /v1/projects/{project}/instances/{instance}/databases/{database} | Updates a resource containing information about a database inside a Cloud SQL instance. |
| PATCH | /v1/projects/{project}/instances/{instance}/databases/{database} | Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics. |
| DELETE | /v1/projects/{project}/instances/{instance}/databases/{database} | Deletes a database from a Cloud SQL instance. |
| POST | /v1/projects/{project}/instances/{instance}/demoteMaster | Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. |
| POST | /v1/projects/{project}/instances/{instance}/export | Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. |
| POST | /v1/projects/{project}/instances/{instance}/failover | Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to t |
| GET | /v1/projects/{project}/instances/{instance}/getDiskShrinkConfig | Get Disk Shrink Config for a given instance. |
| POST | /v1/projects/{project}/instances/{instance}/import | Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. |
| GET | /v1/projects/{project}/instances/{instance}/listServerCas | Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certifi |
| POST | /v1/projects/{project}/instances/{instance}/performDiskShrink | Perform Disk Shrink on primary instance. |
| POST | /v1/projects/{project}/instances/{instance}/promoteReplica | Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart. |
| POST | /v1/projects/{project}/instances/{instance}/rescheduleMaintenance | Reschedules the maintenance on the given instance. |
| POST | /v1/projects/{project}/instances/{instance}/resetReplicaSize | Reset Replica Size to primary instance disk size. |
| POST | /v1/projects/{project}/instances/{instance}/resetSslConfig | Deletes all client certificates and generates a new server SSL certificate for the instance. |
| POST | /v1/projects/{project}/instances/{instance}/restart | Restarts a Cloud SQL instance. |
| POST | /v1/projects/{project}/instances/{instance}/restoreBackup | Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. |
| POST | /v1/projects/{project}/instances/{instance}/rotateServerCa | Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. |
| GET | /v1/projects/{project}/instances/{instance}/sslCerts | Lists all of the current SSL certificates for the instance. |
| POST | /v1/projects/{project}/instances/{instance}/sslCerts | Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance |
| GET | /v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint} | Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creati |
| DELETE | /v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint} | Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted. |
| POST | /v1/projects/{project}/instances/{instance}/startExternalSync | Start External primary instance migration. |
| POST | /v1/projects/{project}/instances/{instance}/startReplica | Starts the replication in the read replica instance. |
| POST | /v1/projects/{project}/instances/{instance}/stopReplica | Stops the replication in the read replica instance. |
| POST | /v1/projects/{project}/instances/{instance}/truncateLog | Truncate MySQL general and slow query log tables MySQL only. |
| GET | /v1/projects/{project}/instances/{instance}/users | Lists users in the specified Cloud SQL instance. |
| POST | /v1/projects/{project}/instances/{instance}/users | Creates a new user in a Cloud SQL instance. |
| PUT | /v1/projects/{project}/instances/{instance}/users | Updates an existing user in a Cloud SQL instance. |
| DELETE | /v1/projects/{project}/instances/{instance}/users | Deletes a user from a Cloud SQL instance. |
Showing the first 100 of 106 endpoints; the full list is in the documentation.
Questions
Does the Cloud SQL Admin API API need an API key?
Yes. The Cloud SQL Admin API API uses OAuth authentication; the documentation explains how to get credentials.
Does the Cloud SQL Admin API API support HTTPS?
Yes, the Cloud SQL Admin API API is served over HTTPS.
How many endpoints does the Cloud SQL Admin API API have?
Its OpenAPI description lists 106 endpoints in version v1. The first 100 are shown on this page.
What are alternatives to the Cloud SQL Admin API API?
Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.
Similar analytics APIs
Compare alternatives →Google Play Integrity API
AnalyticsThe Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.
versionhistory.googleapis.com API
AnalyticsVersion History API - Prod
Doc Converter
AnalyticsThis api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)
Perspective Comment Analyzer API
AnalyticsThe Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.
Safe Browsing API
AnalyticsEnables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.
Web Fonts Developer API
AnalyticsThe Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.
Listed from APIs.guru (CC0).