Skip to content

Latest commit

 

History

History
430 lines (278 loc) · 11.4 KB

DomainsApi.md

File metadata and controls

430 lines (278 loc) · 11.4 KB

\DomainsApi

All URIs are relative to https://app.koyeb.com

Method HTTP request Description
CreateDomain Post /v1/domains
DeleteDomain Delete /v1/domains/{id}
GetDomain Get /v1/domains/{id}
ListDomains Get /v1/domains
RefreshDomainStatus Post /v1/domains/{id}/refresh
UpdateDomain Patch /v1/domains/{id}

CreateDomain

CreateDomainReply CreateDomain(ctx).Domain(domain).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    domain := *openapiclient.NewCreateDomain() // CreateDomain | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
domain CreateDomain

Return type

CreateDomainReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

DeleteDomain

map[string]interface{} DeleteDomain(ctx, id).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

map[string]interface{}

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

GetDomain

GetDomainReply GetDomain(ctx, id).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

GetDomainReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

ListDomains

ListDomainsReply ListDomains(ctx).Limit(limit).Offset(offset).Types(types).Statuses(statuses).AppIds(appIds).Name(name).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    limit := "limit_example" // string | (Optional) The number of items to return (optional)
    offset := "offset_example" // string | (Optional) The offset in the list of item to return (optional)
    types := []string{"Types_example"} // []string | (Optional) A filter for types   - AUTOASSIGNED: Domain like <appName>-<orgName>.koyeb.app (optional)
    statuses := []string{"Statuses_example"} // []string | (Optional) A filter for statuses (optional)
    appIds := []string{"Inner_example"} // []string | (Optional) A filter for apps (optional)
    name := "name_example" // string | (Optional) A filter for name (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainsApi.ListDomains(context.Background()).Limit(limit).Offset(offset).Types(types).Statuses(statuses).AppIds(appIds).Name(name).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainsApi.ListDomains``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListDomains`: ListDomainsReply
    fmt.Fprintf(os.Stdout, "Response from `DomainsApi.ListDomains`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
limit string (Optional) The number of items to return
offset string (Optional) The offset in the list of item to return
types []string (Optional) A filter for types - AUTOASSIGNED: Domain like <appName>-<orgName>.koyeb.app
statuses []string (Optional) A filter for statuses
appIds []string (Optional) A filter for apps
name string (Optional) A filter for name

Return type

ListDomainsReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

RefreshDomainStatus

map[string]interface{} RefreshDomainStatus(ctx, id).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

map[string]interface{}

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

UpdateDomain

UpdateDomainReply UpdateDomain(ctx, id).Domain(domain).UpdateMask(updateMask).DryRun(dryRun).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 
    domain := *openapiclient.NewUpdateDomain() // UpdateDomain | 
    updateMask := "updateMask_example" // string |  (optional)
    dryRun := true // bool | If set, run validation and check that the domain is available. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainsApi.UpdateDomain(context.Background(), id).Domain(domain).UpdateMask(updateMask).DryRun(dryRun).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainsApi.UpdateDomain``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateDomain`: UpdateDomainReply
    fmt.Fprintf(os.Stdout, "Response from `DomainsApi.UpdateDomain`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

domain | UpdateDomain | | updateMask | string | | dryRun | bool | If set, run validation and check that the domain is available. |

Return type

UpdateDomainReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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