Skip to content

Latest commit

 

History

History
617 lines (403 loc) · 16.8 KB

SessionManagementApi.md

File metadata and controls

617 lines (403 loc) · 16.8 KB

\SessionManagementApi

All URIs are relative to http://localhost

Method HTTP request Description
ApiLogin Post /api/v1/api_login Authenticate user using email and password
ApiToken Put /api/v1/customers/{cUUID}/api_token Regenerate and fetch API token
AppVersion Get /api/v1/app_version appVersion
CustomerCount Get /api/v1/customer_count customerCount
GetAdminNotifications Get /api/v1/customers/{cUUID}/admin_notifications Current list of notifications for admin
GetFilteredLogs Get /api/v1/logs getFilteredLogs
GetLogs Get /api/v1/logs/{maxLines} getLogs
GetSessionInfo Get /api/v1/session_info Get current user and customer uuid. This will not generate or return the API token, use /api_token API for that.
RegisterCustomer Post /api/v1/register Register a customer

ApiLogin

SessionInfo ApiLogin(ctx).CustomerLoginFormData(customerLoginFormData).Request(request).Execute()

Authenticate user using email and password

Example

package main

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

func main() {
    customerLoginFormData := *openapiclient.NewCustomerLoginFormData("Email_example", "Password_example") // CustomerLoginFormData | 
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.SessionManagementApi.ApiLogin(context.Background()).CustomerLoginFormData(customerLoginFormData).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionManagementApi.ApiLogin``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ApiLogin`: SessionInfo
    fmt.Fprintf(os.Stdout, "Response from `SessionManagementApi.ApiLogin`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
customerLoginFormData CustomerLoginFormData
request interface{}

Return type

SessionInfo

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

ApiToken

SessionInfo ApiToken(ctx, cUUID).ApiTokenVersion(apiTokenVersion).Request(request).Execute()

Regenerate and fetch API token

Example

package main

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

func main() {
    cUUID := TODO // string | 
    apiTokenVersion := int64(789) // int64 |  (optional) (default to -1)
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.SessionManagementApi.ApiToken(context.Background(), cUUID).ApiTokenVersion(apiTokenVersion).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionManagementApi.ApiToken``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ApiToken`: SessionInfo
    fmt.Fprintf(os.Stdout, "Response from `SessionManagementApi.ApiToken`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

apiTokenVersion | int64 | | [default to -1] request | interface{} | |

Return type

SessionInfo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

AppVersion

map[string]string AppVersion(ctx).Execute()

appVersion

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

map[string]string

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

CustomerCount

CustomerCountResp CustomerCount(ctx).Execute()

customerCount

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

CustomerCountResp

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

GetAdminNotifications

CurrentAdminNotificationMessages GetAdminNotifications(ctx, cUUID).Execute()

Current list of notifications for admin

Example

package main

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

func main() {
    cUUID := TODO // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

CurrentAdminNotificationMessages

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

GetFilteredLogs

string GetFilteredLogs(ctx).MaxLines(maxLines).UniverseName(universeName).QueryRegex(queryRegex).StartDate(startDate).EndDate(endDate).Execute()

getFilteredLogs

Example

package main

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

func main() {
    maxLines := int32(56) // int32 |  (optional) (default to 10000)
    universeName := "universeName_example" // string |  (optional) (default to "null")
    queryRegex := "queryRegex_example" // string |  (optional) (default to "null")
    startDate := "startDate_example" // string |  (optional) (default to "null")
    endDate := "endDate_example" // string |  (optional) (default to "null")

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.SessionManagementApi.GetFilteredLogs(context.Background()).MaxLines(maxLines).UniverseName(universeName).QueryRegex(queryRegex).StartDate(startDate).EndDate(endDate).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionManagementApi.GetFilteredLogs``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetFilteredLogs`: string
    fmt.Fprintf(os.Stdout, "Response from `SessionManagementApi.GetFilteredLogs`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
maxLines int32 [default to 10000]
universeName string [default to "null"]
queryRegex string [default to "null"]
startDate string [default to "null"]
endDate string [default to "null"]

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

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

GetLogs

LogData GetLogs(ctx, maxLines).Execute()

getLogs

Example

package main

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

func main() {
    maxLines := int32(56) // int32 | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

LogData

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

GetSessionInfo

SessionInfo GetSessionInfo(ctx).Request(request).Execute()

Get current user and customer uuid. This will not generate or return the API token, use /api_token API for that.

Example

package main

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

func main() {
    request := TODO // interface{} |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
request interface{}

Return type

SessionInfo

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

RegisterCustomer

SessionInfo RegisterCustomer(ctx).CustomerRegisterFormData(customerRegisterFormData).GenerateApiToken(generateApiToken).Request(request).Execute()

Register a customer

Example

package main

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

func main() {
    customerRegisterFormData := *openapiclient.NewCustomerRegisterFormData("Code_example", "Email_example", "Name_example", "Password_example") // CustomerRegisterFormData | 
    generateApiToken := true // bool |  (optional) (default to false)
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.SessionManagementApi.RegisterCustomer(context.Background()).CustomerRegisterFormData(customerRegisterFormData).GenerateApiToken(generateApiToken).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionManagementApi.RegisterCustomer``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `RegisterCustomer`: SessionInfo
    fmt.Fprintf(os.Stdout, "Response from `SessionManagementApi.RegisterCustomer`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
customerRegisterFormData CustomerRegisterFormData
generateApiToken bool [default to false]
request interface{}

Return type

SessionInfo

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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