Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

Latest commit

 

History

History
285 lines (199 loc) · 8.45 KB

File metadata and controls

285 lines (199 loc) · 8.45 KB

QoveryApi.DatabasesApi

All URIs are relative to https://api.qovery.com

Method HTTP request Description
cloneDatabase POST /database/{databaseId}/clone Clone database
createDatabase POST /environment/{environmentId}/database Create a database
getEnvironmentDatabaseStatus GET /environment/{environmentId}/database/status List all environment databases statuses
listDatabase GET /environment/{environmentId}/database List environment databases
listEnvironmentDatabaseConfig GET /environment/{environmentId}/databaseConfiguration List eligible database types, versions and modes for the environment

cloneDatabase

Database cloneDatabase(databaseId, opts)

Clone database

This will create a new database with the same configuration on the targeted environment Id.

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.DatabasesApi();
let databaseId = "databaseId_example"; // String | Database ID
let opts = {
  'cloneServiceRequest': new QoveryApi.CloneServiceRequest() // CloneServiceRequest | 
};
apiInstance.cloneDatabase(databaseId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
databaseId String Database ID
cloneServiceRequest CloneServiceRequest [optional]

Return type

Database

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createDatabase

Database createDatabase(environmentId, opts)

Create a database

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.DatabasesApi();
let environmentId = "environmentId_example"; // String | Environment ID
let opts = {
  'databaseRequest': new QoveryApi.DatabaseRequest() // DatabaseRequest | 
};
apiInstance.createDatabase(environmentId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
environmentId String Environment ID
databaseRequest DatabaseRequest [optional]

Return type

Database

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getEnvironmentDatabaseStatus

ReferenceObjectStatusResponseList getEnvironmentDatabaseStatus(environmentId)

List all environment databases statuses

Returns a list of databases with only their id and status.

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.DatabasesApi();
let environmentId = "environmentId_example"; // String | Environment ID
apiInstance.getEnvironmentDatabaseStatus(environmentId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
environmentId String Environment ID

Return type

ReferenceObjectStatusResponseList

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listDatabase

DatabaseResponseList listDatabase(environmentId)

List environment databases

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.DatabasesApi();
let environmentId = "environmentId_example"; // String | Environment ID
apiInstance.listDatabase(environmentId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
environmentId String Environment ID

Return type

DatabaseResponseList

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listEnvironmentDatabaseConfig

DatabaseConfigurationResponseList listEnvironmentDatabaseConfig(environmentId)

List eligible database types, versions and modes for the environment

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.DatabasesApi();
let environmentId = "environmentId_example"; // String | Environment ID
apiInstance.listEnvironmentDatabaseConfig(environmentId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
environmentId String Environment ID

Return type

DatabaseConfigurationResponseList

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json