Skip to content

Latest commit

 

History

History
159 lines (102 loc) · 4.54 KB

File metadata and controls

159 lines (102 loc) · 4.54 KB

\ContainersAPI

All URIs are relative to https://dashboard.quantcdn.io

Method HTTP request Description
ListContainers Get /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/containers Get the containers in an environment
UpdateContainer Put /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/containers/{container} Update a container in an environment

ListContainers

ListContainers(ctx, organisation, application, environment).Execute()

Get the containers in an environment

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/quantcdn/quant-admin-go"
)

func main() {
	organisation := "test-org" // string | The organisation ID
	application := "test-app" // string | The application ID
	environment := "test-env" // string | The environment ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ContainersAPI.ListContainers(context.Background(), organisation, application, environment).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContainersAPI.ListContainers``: %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.
organisation string The organisation ID
application string The application ID
environment string The environment ID

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

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]

UpdateContainer

UpdateContainer(ctx, organisation, application, environment, container).Container2(container2).Execute()

Update a container in an environment

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/quantcdn/quant-admin-go"
)

func main() {
	organisation := "test-org" // string | The organisation ID
	application := "test-app" // string | The application ID
	environment := "test-env" // string | The environment ID
	container := "test-container" // string | The container ID
	container2 := *openapiclient.NewContainer("Name_example", *openapiclient.NewContainerImageReference("Type_example", "Identifier_example")) // Container | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ContainersAPI.UpdateContainer(context.Background(), organisation, application, environment, container).Container2(container2).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContainersAPI.UpdateContainer``: %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.
organisation string The organisation ID
application string The application ID
environment string The environment ID
container string The container ID

Other Parameters

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

Name Type Description Notes

container2 | Container | |

Return type

(empty response body)

Authorization

BearerAuth

HTTP request headers

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

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