Skip to content

Latest commit

 

History

History
432 lines (286 loc) · 12 KB

CredentialsApi.md

File metadata and controls

432 lines (286 loc) · 12 KB

\CredentialsApi

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

Method HTTP request Description
CreateCredential Post /v1/credentials Create credential
DeleteCredential Delete /v1/credentials/{id} Delete credential
GetCredential Get /v1/credentials/{id} Get credential
ListCredentials Get /v1/credentials List credentials
UpdateCredential Put /v1/credentials/{id} Update credential
UpdateCredential2 Patch /v1/credentials/{id} Update credential

CreateCredential

CreateCredentialReply CreateCredential(ctx).Credential(credential).Execute()

Create credential

Example

package main

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

func main() {
    credential := *openapiclient.NewCreateCredential() // CreateCredential | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
credential CreateCredential

Return type

CreateCredentialReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

DeleteCredential

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

Delete credential

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.CredentialsApi.DeleteCredential(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CredentialsApi.DeleteCredential``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteCredential`: map[string]interface{}
    fmt.Fprintf(os.Stdout, "Response from `CredentialsApi.DeleteCredential`: %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 apiDeleteCredentialRequest 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]

GetCredential

GetCredentialReply GetCredential(ctx, id).Execute()

Get credential

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

Name Type Description Notes

Return type

GetCredentialReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

ListCredentials

ListCredentialsReply ListCredentials(ctx).Type_(type_).Name(name).OrganizationId(organizationId).UserId(userId).Limit(limit).Offset(offset).Execute()

List credentials

Example

package main

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

func main() {
    type_ := "type__example" // string | (Optional) A filter for type (optional) (default to "INVALID")
    name := "name_example" // string | (Optional) A filter for name (optional)
    organizationId := "organizationId_example" // string | (Optional) Filter for an organization (optional)
    userId := "userId_example" // string | (Optional) Filter for an user (optional)
    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)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CredentialsApi.ListCredentials(context.Background()).Type_(type_).Name(name).OrganizationId(organizationId).UserId(userId).Limit(limit).Offset(offset).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CredentialsApi.ListCredentials``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListCredentials`: ListCredentialsReply
    fmt.Fprintf(os.Stdout, "Response from `CredentialsApi.ListCredentials`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
type_ string (Optional) A filter for type [default to "INVALID"]
name string (Optional) A filter for name
organizationId string (Optional) Filter for an organization
userId string (Optional) Filter for an user
limit string (Optional) The number of items to return
offset string (Optional) The offset in the list of item to return

Return type

ListCredentialsReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

UpdateCredential

UpdateCredentialReply UpdateCredential(ctx, id).Credential(credential).UpdateMask(updateMask).Execute()

Update credential

Example

package main

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

func main() {
    id := "id_example" // string | 
    credential := *openapiclient.NewCredential() // Credential | 
    updateMask := "updateMask_example" // string |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CredentialsApi.UpdateCredential(context.Background(), id).Credential(credential).UpdateMask(updateMask).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CredentialsApi.UpdateCredential``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateCredential`: UpdateCredentialReply
    fmt.Fprintf(os.Stdout, "Response from `CredentialsApi.UpdateCredential`: %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 apiUpdateCredentialRequest struct via the builder pattern

Name Type Description Notes

credential | Credential | | updateMask | string | |

Return type

UpdateCredentialReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

UpdateCredential2

UpdateCredentialReply UpdateCredential2(ctx, id).Credential(credential).UpdateMask(updateMask).Execute()

Update credential

Example

package main

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

func main() {
    id := "id_example" // string | 
    credential := *openapiclient.NewCredential() // Credential | 
    updateMask := "updateMask_example" // string |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CredentialsApi.UpdateCredential2(context.Background(), id).Credential(credential).UpdateMask(updateMask).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CredentialsApi.UpdateCredential2``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateCredential2`: UpdateCredentialReply
    fmt.Fprintf(os.Stdout, "Response from `CredentialsApi.UpdateCredential2`: %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 apiUpdateCredential2Request struct via the builder pattern

Name Type Description Notes

credential | Credential | | updateMask | string | |

Return type

UpdateCredentialReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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