Skip to content

Latest commit

 

History

History
290 lines (186 loc) · 8.58 KB

EnvironmentsAPI.md

File metadata and controls

290 lines (186 loc) · 8.58 KB

\EnvironmentsAPI

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

Method HTTP request Description
CreateEnvironment Post /project/{projectId}/environment Create an environment
GetProjectEnvironmentServiceNumber Get /project/{projectId}/environment/stats List total number of services for each environment of the project
GetProjectEnvironmentsStatus Get /project/{projectId}/environment/status List environments statuses
ListEnvironment Get /project/{projectId}/environment List environments

CreateEnvironment

Environment CreateEnvironment(ctx, projectId).CreateEnvironmentRequest(createEnvironmentRequest).Execute()

Create an environment

Example

package main

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

func main() {
    projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project ID
    createEnvironmentRequest := *openapiclient.NewCreateEnvironmentRequest("Name_example") // CreateEnvironmentRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

createEnvironmentRequest | CreateEnvironmentRequest | |

Return type

Environment

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]

GetProjectEnvironmentServiceNumber

EnvironmentStatsResponseList GetProjectEnvironmentServiceNumber(ctx, projectId).Execute()

List total number of services for each environment of the project

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

EnvironmentStatsResponseList

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]

GetProjectEnvironmentsStatus

EnvironmentStatusList GetProjectEnvironmentsStatus(ctx, projectId).Execute()

List environments statuses

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

EnvironmentStatusList

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]

ListEnvironment

EnvironmentResponseList ListEnvironment(ctx, projectId).Execute()

List environments

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

EnvironmentResponseList

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]