Skip to content

Latest commit

 

History

History
359 lines (233 loc) · 10.1 KB

File metadata and controls

359 lines (233 loc) · 10.1 KB

\ApplicationsAPI

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

Method HTTP request Description
CreateApplication Post /api/v3/organizations/{organisation}/applications Create a new application
DeleteApplication Delete /api/v3/organizations/{organisation}/applications/{application} Delete an application
GetApplication Get /api/v3/organizations/{organisation}/applications/{application} Get a single application
GetEcrLoginCredentials Get /api/v3/organizations/{organisation}/applications/ecr-login Get ECR login credentials
ListApplications Get /api/v3/organizations/{organisation}/applications Get all applications for an organisation

CreateApplication

Application CreateApplication(ctx, organisation).CreateApplicationRequest(createApplicationRequest).Execute()

Create a new application

Example

package main

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

func main() {
	organisation := "organisation_example" // string | The organisation ID
	createApplicationRequest := *openapiclient.NewCreateApplicationRequest("my-app", *openapiclient.NewCompose()) // CreateApplicationRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

createApplicationRequest | CreateApplicationRequest | |

Return type

Application

Authorization

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]

DeleteApplication

DeleteApplication(ctx, organisation, application).Execute()

Delete an application

Example

package main

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

func main() {
	organisation := "organisation_example" // string | The organisation ID
	application := "application_example" // string | The application ID

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

Other Parameters

Other parameters are passed through a pointer to a apiDeleteApplicationRequest 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]

GetApplication

Application GetApplication(ctx, organisation, application).Execute()

Get a single application

Example

package main

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

func main() {
	organisation := "organisation_example" // string | The organisation ID
	application := "application_example" // string | The application ID

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

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

Other Parameters

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

Name Type Description Notes

Return type

Application

Authorization

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]

GetEcrLoginCredentials

GetEcrLoginCredentials200Response GetEcrLoginCredentials(ctx, organisation).Execute()

Get ECR login credentials

Example

package main

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

func main() {
	organisation := "organisation_example" // string | The organisation ID

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

GetEcrLoginCredentials200Response

Authorization

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]

ListApplications

[]Application ListApplications(ctx, organisation).Execute()

Get all applications for an organisation

Example

package main

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

func main() {
	organisation := "organisation_example" // string | The organisation ID

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

[]Application

Authorization

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]