Skip to content

Latest commit

 

History

History
1011 lines (649 loc) · 26.8 KB

ProfileApi.md

File metadata and controls

1011 lines (649 loc) · 26.8 KB

\ProfileApi

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

Method HTTP request Description
AcceptOrganizationInvitation Post /v1/account/organization_invitations/{id}/accept
DeclineOrganizationInvitation Post /v1/account/organization_invitations/{id}/decline
GetCurrentOrganization Get /v1/account/organization
GetCurrentUser Get /v1/account/profile
GetOAuthOptions Get /v1/account/oauth Get OAuth Providers
GetUserOrganizationInvitation Get /v1/account/organization_invitations/{id}
ListUserOrganizationInvitations Get /v1/account/organization_invitations
OAuthCallback Post /v1/account/oauth Authenticate using OAuth
ResendEmailValidation Post /v1/account/resend_validation
ResetPassword Post /v1/account/reset_password
Signup Post /v1/account/signup
UpdatePassword Post /v1/account/update_password
UpdateUser Put /v1/account/profile
UpdateUser2 Patch /v1/account/profile
Validate Post /v1/account/validate/{id}

AcceptOrganizationInvitation

AcceptOrganizationInvitationReply AcceptOrganizationInvitation(ctx, id).Body(body).Execute()

Example

package main

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

func main() {
    id := "id_example" // string | The id of the organization invitation to accept
    body := map[string]interface{}{ ... } // map[string]interface{} | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The id of the organization invitation to accept

Other Parameters

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

Name Type Description Notes

body | map[string]interface{} | |

Return type

AcceptOrganizationInvitationReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

DeclineOrganizationInvitation

DeclineOrganizationInvitationReply DeclineOrganizationInvitation(ctx, id).Body(body).Execute()

Example

package main

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

func main() {
    id := "id_example" // string | The id of the organization invitation to decline
    body := map[string]interface{}{ ... } // map[string]interface{} | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The id of the organization invitation to decline

Other Parameters

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

Name Type Description Notes

body | map[string]interface{} | |

Return type

DeclineOrganizationInvitationReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

GetCurrentOrganization

GetOrganizationReply GetCurrentOrganization(ctx).Execute()

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

GetOrganizationReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

GetCurrentUser

UserReply GetCurrentUser(ctx).Execute()

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

UserReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

GetOAuthOptions

GetOAuthOptionsReply GetOAuthOptions(ctx).Action(action).Metadata(metadata).Execute()

Get OAuth Providers

Example

package main

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

func main() {
    action := "action_example" // string | Which authentication flow is being initiated (optional) (default to "signin")
    metadata := "metadata_example" // string | A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
action string Which authentication flow is being initiated [default to "signin"]
metadata string A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state

Return type

GetOAuthOptionsReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

GetUserOrganizationInvitation

GetUserOrganizationInvitationReply GetUserOrganizationInvitation(ctx, id).Execute()

Example

package main

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

func main() {
    id := "id_example" // string | The id of the organization invitation to get

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The id of the organization invitation to get

Other Parameters

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

Name Type Description Notes

Return type

GetUserOrganizationInvitationReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

ListUserOrganizationInvitations

ListUserOrganizationInvitationsReply ListUserOrganizationInvitations(ctx).Limit(limit).Offset(offset).Statuses(statuses).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)
    statuses := []string{"Statuses_example"} // []string | (Optional) Filter on organization invitation statuses (optional)

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListUserOrganizationInvitationsRequest 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
statuses []string (Optional) Filter on organization invitation statuses

Return type

ListUserOrganizationInvitationsReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

OAuthCallback

OAuthCallbackReply OAuthCallback(ctx).Body(body).SeonFp(seonFp).Execute()

Authenticate using OAuth

Example

package main

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

func main() {
    body := *openapiclient.NewOAuthCallbackRequest() // OAuthCallbackRequest | 
    seonFp := "seonFp_example" // string | Seon Fingerprint (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
body OAuthCallbackRequest
seonFp string Seon Fingerprint

Return type

OAuthCallbackReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

ResendEmailValidation

map[string]interface{} ResendEmailValidation(ctx).Body(body).Execute()

Example

package main

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

func main() {
    body := map[string]interface{}{ ... } // map[string]interface{} | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
body map[string]interface{}

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]

ResetPassword

map[string]interface{} ResetPassword(ctx).Body(body).Execute()

Example

package main

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

func main() {
    body := *openapiclient.NewResetPasswordRequest() // ResetPasswordRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
body ResetPasswordRequest

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]

Signup

LoginReply Signup(ctx).Body(body).SeonFp(seonFp).Execute()

Example

package main

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

func main() {
    body := *openapiclient.NewCreateAccountRequest("Email_example", "Password_example") // CreateAccountRequest | Create new account
    seonFp := "seonFp_example" // string | Seon Fingerprint (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
body CreateAccountRequest Create new account
seonFp string Seon Fingerprint

Return type

LoginReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

UpdatePassword

LoginReply UpdatePassword(ctx).Body(body).SeonFp(seonFp).Execute()

Example

package main

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

func main() {
    body := *openapiclient.NewUpdatePasswordRequest() // UpdatePasswordRequest | 
    seonFp := "seonFp_example" // string | Seon Fingerprint (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
body UpdatePasswordRequest
seonFp string Seon Fingerprint

Return type

LoginReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

UpdateUser

UserReply UpdateUser(ctx).User(user).UpdateMask(updateMask).Execute()

Example

package main

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

func main() {
    user := *openapiclient.NewUpdateUserRequestUserUpdateBody() // UpdateUserRequestUserUpdateBody | 
    updateMask := "updateMask_example" // string |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
user UpdateUserRequestUserUpdateBody
updateMask string

Return type

UserReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

UpdateUser2

UserReply UpdateUser2(ctx).User(user).UpdateMask(updateMask).Execute()

Example

package main

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

func main() {
    user := *openapiclient.NewUpdateUserRequestUserUpdateBody() // UpdateUserRequestUserUpdateBody | 
    updateMask := "updateMask_example" // string |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
user UpdateUserRequestUserUpdateBody
updateMask string

Return type

UserReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

Validate

LoginReply Validate(ctx, id).SeonFp(seonFp).Execute()

Example

package main

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

func main() {
    id := "id_example" // string | 
    seonFp := "seonFp_example" // string | Seon Fingerprint (optional)

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

Name Type Description Notes

seonFp | string | Seon Fingerprint |

Return type

LoginReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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