Skip to content

Latest commit

 

History

History
219 lines (141 loc) · 6.17 KB

ProjectsAPI.md

File metadata and controls

219 lines (141 loc) · 6.17 KB

\ProjectsAPI

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

Method HTTP request Description
CreateProject Post /organization/{organizationId}/project Create a project
GetOrganizationProjectStats Get /organization/{organizationId}/project/stats List total number of services and environments for each project of the organization
ListProject Get /organization/{organizationId}/project List projects

CreateProject

Project CreateProject(ctx, organizationId).ProjectRequest(projectRequest).Execute()

Create a project

Example

package main

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

func main() {
	organizationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Organization ID
	projectRequest := *openapiclient.NewProjectRequest("Name_example") // ProjectRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

projectRequest | ProjectRequest | |

Return type

Project

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]

GetOrganizationProjectStats

ProjectStatsResponseList GetOrganizationProjectStats(ctx, organizationId).Execute()

List total number of services and environments for each project of the organization

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

ProjectStatsResponseList

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]

ListProject

ProjectResponseList ListProject(ctx, organizationId).Execute()

List projects

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

ProjectResponseList

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]