Skip to content

Latest commit

 

History

History
851 lines (545 loc) · 24.6 KB

OrganizationMainCallsAPI.md

File metadata and controls

851 lines (545 loc) · 24.6 KB

\OrganizationMainCallsAPI

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

Method HTTP request Description
CreateGitToken Post /organization/{organizationId}/gitToken Create a git token
CreateOrganization Post /organization Create an organization
DeleteGitToken Delete /organization/{organizationId}/gitToken/{gitTokenId} Delete a git token
DeleteOrganization Delete /organization/{organizationId} Delete an organization
EditGitToken Put /organization/{organizationId}/gitToken/{gitTokenId} Edit a git token
EditOrganization Put /organization/{organizationId} Edit an organization
GetGitTokenAssociatedServices Get /organization/{organizationId}/gitToken/{gitTokenId}/associatedServices Get organization git token associated services
GetOrganization Get /organization/{organizationId} Get organization by ID
GetOrganizationGitToken Get /organization/{organizationId}/gitToken/{gitTokenId} Get organization git token
ListOrganization Get /organization List user organizations
ListOrganizationAvailableRoles Get /organization/{organizationId}/availableRole List organization available roles
ListOrganizationGitTokens Get /organization/{organizationId}/gitToken List organization git tokens

CreateGitToken

GitTokenResponse CreateGitToken(ctx, organizationId).GitTokenRequest(gitTokenRequest).Execute()

Create a git token

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
	gitTokenRequest := *openapiclient.NewGitTokenRequest("Name_example", openapiclient.GitProviderEnum("BITBUCKET"), "Token_example") // GitTokenRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.OrganizationMainCallsAPI.CreateGitToken(context.Background(), organizationId).GitTokenRequest(gitTokenRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationMainCallsAPI.CreateGitToken``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateGitToken`: GitTokenResponse
	fmt.Fprintf(os.Stdout, "Response from `OrganizationMainCallsAPI.CreateGitToken`: %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 apiCreateGitTokenRequest struct via the builder pattern

Name Type Description Notes

gitTokenRequest | GitTokenRequest | |

Return type

GitTokenResponse

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]

CreateOrganization

Organization CreateOrganization(ctx).OrganizationRequest(organizationRequest).Execute()

Create an organization

Example

package main

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

func main() {
	organizationRequest := *openapiclient.NewOrganizationRequest("Name_example", openapiclient.PlanEnum("FREE")) // OrganizationRequest |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
organizationRequest OrganizationRequest

Return type

Organization

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]

DeleteGitToken

DeleteGitToken(ctx, organizationId, gitTokenId).Execute()

Delete a git token

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
	gitTokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Git Token ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OrganizationMainCallsAPI.DeleteGitToken(context.Background(), organizationId, gitTokenId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationMainCallsAPI.DeleteGitToken``: %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.
organizationId string Organization ID
gitTokenId string Git Token ID

Other Parameters

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

DeleteOrganization

DeleteOrganization(ctx, organizationId).Execute()

Delete an 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)
	r, err := apiClient.OrganizationMainCallsAPI.DeleteOrganization(context.Background(), organizationId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationMainCallsAPI.DeleteOrganization``: %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.
organizationId string Organization ID

Other Parameters

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

EditGitToken

GitTokenResponse EditGitToken(ctx, organizationId, gitTokenId).GitTokenRequest(gitTokenRequest).Execute()

Edit a git token

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
	gitTokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Git Token ID
	gitTokenRequest := *openapiclient.NewGitTokenRequest("Name_example", openapiclient.GitProviderEnum("BITBUCKET"), "Token_example") // GitTokenRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

gitTokenRequest | GitTokenRequest | |

Return type

GitTokenResponse

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]

EditOrganization

Organization EditOrganization(ctx, organizationId).OrganizationEditRequest(organizationEditRequest).Execute()

Edit an 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
	organizationEditRequest := *openapiclient.NewOrganizationEditRequest("Name_example") // OrganizationEditRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.OrganizationMainCallsAPI.EditOrganization(context.Background(), organizationId).OrganizationEditRequest(organizationEditRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationMainCallsAPI.EditOrganization``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `EditOrganization`: Organization
	fmt.Fprintf(os.Stdout, "Response from `OrganizationMainCallsAPI.EditOrganization`: %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 apiEditOrganizationRequest struct via the builder pattern

Name Type Description Notes

organizationEditRequest | OrganizationEditRequest | |

Return type

Organization

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]

GetGitTokenAssociatedServices

GitTokenAssociatedServicesResponseList GetGitTokenAssociatedServices(ctx, organizationId, gitTokenId).Execute()

Get organization git token associated services

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
	gitTokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Git Token ID

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

GitTokenAssociatedServicesResponseList

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]

GetOrganization

Organization GetOrganization(ctx, organizationId).Execute()

Get organization by ID

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.OrganizationMainCallsAPI.GetOrganization(context.Background(), organizationId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationMainCallsAPI.GetOrganization``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetOrganization`: Organization
	fmt.Fprintf(os.Stdout, "Response from `OrganizationMainCallsAPI.GetOrganization`: %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 apiGetOrganizationRequest struct via the builder pattern

Name Type Description Notes

Return type

Organization

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]

GetOrganizationGitToken

GitTokenResponse GetOrganizationGitToken(ctx, organizationId, gitTokenId).Execute()

Get organization git token

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
	gitTokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Git Token ID

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

GitTokenResponse

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]

ListOrganization

OrganizationResponseList ListOrganization(ctx).Execute()

List user organizations

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

OrganizationResponseList

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]

ListOrganizationAvailableRoles

OrganizationAvailableRoleList ListOrganizationAvailableRoles(ctx, organizationId).Execute()

List organization available roles

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.OrganizationMainCallsAPI.ListOrganizationAvailableRoles(context.Background(), organizationId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationMainCallsAPI.ListOrganizationAvailableRoles``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListOrganizationAvailableRoles`: OrganizationAvailableRoleList
	fmt.Fprintf(os.Stdout, "Response from `OrganizationMainCallsAPI.ListOrganizationAvailableRoles`: %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 apiListOrganizationAvailableRolesRequest struct via the builder pattern

Name Type Description Notes

Return type

OrganizationAvailableRoleList

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]

ListOrganizationGitTokens

GitTokenResponseList ListOrganizationGitTokens(ctx, organizationId).Execute()

List organization git tokens

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.OrganizationMainCallsAPI.ListOrganizationGitTokens(context.Background(), organizationId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationMainCallsAPI.ListOrganizationGitTokens``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListOrganizationGitTokens`: GitTokenResponseList
	fmt.Fprintf(os.Stdout, "Response from `OrganizationMainCallsAPI.ListOrganizationGitTokens`: %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 apiListOrganizationGitTokensRequest struct via the builder pattern

Name Type Description Notes

Return type

GitTokenResponseList

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]