All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GetLog | Get /api/logs/{id} | Get log |
ListLogs | Get /api/logs | Get logs |
ListLogs200ResponseInner GetLog(ctx, id).Execute()
Get log
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the log.
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.AuditLogsAPI.GetLog(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuditLogsAPI.GetLog``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetLog`: ListLogs200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `AuditLogsAPI.GetLog`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The unique identifier of the log. |
Other parameters are passed through a pointer to a apiGetLogRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ListLogs200ResponseInner ListLogs(ctx).UserId(userId).ApplicationId(applicationId).LogKey(logKey).Page(page).PageSize(pageSize).Execute()
Get logs
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
userId := "userId_example" // string | Filter logs by user ID. (optional)
applicationId := "applicationId_example" // string | Filter logs by application ID. (optional)
logKey := "logKey_example" // string | Filter logs by log key. (optional)
page := int32(56) // int32 | Page number (starts from 1). (optional) (default to 1)
pageSize := int32(56) // int32 | Entries per page. (optional) (default to 20)
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.AuditLogsAPI.ListLogs(context.Background()).UserId(userId).ApplicationId(applicationId).LogKey(logKey).Page(page).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuditLogsAPI.ListLogs``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListLogs`: []ListLogs200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `AuditLogsAPI.ListLogs`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListLogsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
userId | string | Filter logs by user ID. | |
applicationId | string | Filter logs by application ID. | |
logKey | string | Filter logs by log key. | |
page | int32 | Page number (starts from 1). | [default to 1] |
pageSize | int32 | Entries per page. | [default to 20] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]