Skip to content

Latest commit

 

History

History
497 lines (321 loc) · 13.8 KB

DatabaseMainCallsAPI.md

File metadata and controls

497 lines (321 loc) · 13.8 KB

\DatabaseMainCallsAPI

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

Method HTTP request Description
DeleteDatabase Delete /database/{databaseId} Delete a database
EditDatabase Put /database/{databaseId} Edit a database
EditDatabaseCredentials Put /database/{databaseId}/masterCredentials Edit database master credentials
GetDatabase Get /database/{databaseId} Get database by ID
GetDatabaseMasterCredentials Get /database/{databaseId}/masterCredentials Get master credentials of the database
GetDatabaseStatus Get /database/{databaseId}/status Get database status
ListDatabaseVersion Get /database/{databaseId}/version List eligible versions for the database

DeleteDatabase

DeleteDatabase(ctx, databaseId).Execute()

Delete a database

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.DatabaseMainCallsAPI.DeleteDatabase(context.Background(), databaseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseMainCallsAPI.DeleteDatabase``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiDeleteDatabaseRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EditDatabase

Database EditDatabase(ctx, databaseId).DatabaseEditRequest(databaseEditRequest).Execute()

Edit a database

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID
	databaseEditRequest := *openapiclient.NewDatabaseEditRequest() // DatabaseEditRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatabaseMainCallsAPI.EditDatabase(context.Background(), databaseId).DatabaseEditRequest(databaseEditRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseMainCallsAPI.EditDatabase``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `EditDatabase`: Database
	fmt.Fprintf(os.Stdout, "Response from `DatabaseMainCallsAPI.EditDatabase`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiEditDatabaseRequest struct via the builder pattern

Name Type Description Notes

databaseEditRequest | DatabaseEditRequest | |

Return type

Database

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EditDatabaseCredentials

Credentials EditDatabaseCredentials(ctx, databaseId).CredentialsRequest(credentialsRequest).Execute()

Edit database master credentials

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID
	credentialsRequest := *openapiclient.NewCredentialsRequest("Login_example", "Password_example") // CredentialsRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatabaseMainCallsAPI.EditDatabaseCredentials(context.Background(), databaseId).CredentialsRequest(credentialsRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseMainCallsAPI.EditDatabaseCredentials``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `EditDatabaseCredentials`: Credentials
	fmt.Fprintf(os.Stdout, "Response from `DatabaseMainCallsAPI.EditDatabaseCredentials`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiEditDatabaseCredentialsRequest struct via the builder pattern

Name Type Description Notes

credentialsRequest | CredentialsRequest | |

Return type

Credentials

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDatabase

Database GetDatabase(ctx, databaseId).Execute()

Get database by ID

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatabaseMainCallsAPI.GetDatabase(context.Background(), databaseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseMainCallsAPI.GetDatabase``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDatabase`: Database
	fmt.Fprintf(os.Stdout, "Response from `DatabaseMainCallsAPI.GetDatabase`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiGetDatabaseRequest struct via the builder pattern

Name Type Description Notes

Return type

Database

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDatabaseMasterCredentials

Credentials GetDatabaseMasterCredentials(ctx, databaseId).Execute()

Get master credentials of the database

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatabaseMainCallsAPI.GetDatabaseMasterCredentials(context.Background(), databaseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseMainCallsAPI.GetDatabaseMasterCredentials``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDatabaseMasterCredentials`: Credentials
	fmt.Fprintf(os.Stdout, "Response from `DatabaseMainCallsAPI.GetDatabaseMasterCredentials`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiGetDatabaseMasterCredentialsRequest struct via the builder pattern

Name Type Description Notes

Return type

Credentials

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDatabaseStatus

Status GetDatabaseStatus(ctx, databaseId).Execute()

Get database status

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatabaseMainCallsAPI.GetDatabaseStatus(context.Background(), databaseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseMainCallsAPI.GetDatabaseStatus``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDatabaseStatus`: Status
	fmt.Fprintf(os.Stdout, "Response from `DatabaseMainCallsAPI.GetDatabaseStatus`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiGetDatabaseStatusRequest struct via the builder pattern

Name Type Description Notes

Return type

Status

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListDatabaseVersion

VersionResponseList ListDatabaseVersion(ctx, databaseId).Execute()

List eligible versions for the database

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatabaseMainCallsAPI.ListDatabaseVersion(context.Background(), databaseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseMainCallsAPI.ListDatabaseVersion``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListDatabaseVersion`: VersionResponseList
	fmt.Fprintf(os.Stdout, "Response from `DatabaseMainCallsAPI.ListDatabaseVersion`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiListDatabaseVersionRequest struct via the builder pattern

Name Type Description Notes

Return type

VersionResponseList

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]