Skip to content

Latest commit

 

History

History
325 lines (203 loc) · 7.29 KB

UserApi.md

File metadata and controls

325 lines (203 loc) · 7.29 KB

\UserApi

All URIs are relative to http://api.estuary.tech

Method HTTP request Description
UserApiKeysGet Get /user/api-keys Get API keys for a user
UserApiKeysKeyDelete Delete /user/api-keys/{key} Revoke a User API Key.
UserApiKeysPost Post /user/api-keys Create API keys for a user
UserExportGet Get /user/export Export user data
UserStatsGet Get /user/stats Create API keys for a user

UserApiKeysGet

[]MainGetApiKeysResp UserApiKeysGet(ctx).Execute()

Get API keys for a user

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]MainGetApiKeysResp

Authorization

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]

UserApiKeysKeyDelete

UserApiKeysKeyDelete(ctx, key).Execute()

Revoke a User API Key.

Example

package main

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

func main() {
    key := "key_example" // string | Key

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserApi.UserApiKeysKeyDelete(context.Background(), key).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UserApiKeysKeyDelete``: %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.
key string Key

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

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]

UserApiKeysPost

MainGetApiKeysResp UserApiKeysPost(ctx).Execute()

Create API keys for a user

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

MainGetApiKeysResp

Authorization

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]

UserExportGet

string UserExportGet(ctx).Execute()

Export user data

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

string

Authorization

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]

UserStatsGet

MainUserStatsResponse UserStatsGet(ctx).Execute()

Create API keys for a user

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

MainUserStatsResponse

Authorization

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]