All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateHook | Post /api/hooks | Create a hook |
CreateHookTest | Post /api/hooks/{id}/test | Test hook |
DeleteHook | Delete /api/hooks/{id} | Delete hook |
GetHook | Get /api/hooks/{id} | Get hook |
ListHookRecentLogs | Get /api/hooks/{id}/recent-logs | Get recent logs for a hook |
ListHooks | Get /api/hooks | Get hooks |
UpdateHook | Patch /api/hooks/{id} | Update hook |
UpdateHookSigningKey | Patch /api/hooks/{id}/signing-key | Update signing key for a hook |
CreateHook(ctx).CreateHookRequest(createHookRequest).Execute()
Create a hook
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
createHookRequest := *logto.NewCreateHookRequest(*logto.NewCreateHookRequestConfig("Url_example")) // CreateHookRequest |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.HooksAPI.CreateHook(context.Background()).CreateHookRequest(createHookRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HooksAPI.CreateHook``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiCreateHookRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createHookRequest | CreateHookRequest |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateHookTest(ctx, id).CreateHookTestRequest(createHookTestRequest).Execute()
Test hook
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the hook.
createHookTestRequest := *logto.NewCreateHookTestRequest([]string{"Events_example"}, *logto.NewCreateHookTestRequestConfig("Url_example")) // CreateHookTestRequest |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.HooksAPI.CreateHookTest(context.Background(), id).CreateHookTestRequest(createHookTestRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HooksAPI.CreateHookTest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The unique identifier of the hook. |
Other parameters are passed through a pointer to a apiCreateHookTestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createHookTestRequest | CreateHookTestRequest | |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteHook(ctx, id).Execute()
Delete hook
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the hook.
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.HooksAPI.DeleteHook(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HooksAPI.DeleteHook``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The unique identifier of the hook. |
Other parameters are passed through a pointer to a apiDeleteHookRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListHooks200ResponseInner GetHook(ctx, id).IncludeExecutionStats(includeExecutionStats).Execute()
Get hook
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the hook.
includeExecutionStats := "includeExecutionStats_example" // string | Whether to include execution stats in the response. (optional)
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.HooksAPI.GetHook(context.Background(), id).IncludeExecutionStats(includeExecutionStats).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HooksAPI.GetHook``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHook`: ListHooks200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `HooksAPI.GetHook`: %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 hook. |
Other parameters are passed through a pointer to a apiGetHookRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
includeExecutionStats | string | Whether to include execution stats in the response. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ListHookRecentLogs200ResponseInner ListHookRecentLogs(ctx, id).LogKey(logKey).Page(page).PageSize(pageSize).Execute()
Get recent logs for a hook
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the hook.
logKey := "logKey_example" // string | The log key to filter logs. (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.HooksAPI.ListHookRecentLogs(context.Background(), id).LogKey(logKey).Page(page).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HooksAPI.ListHookRecentLogs``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListHookRecentLogs`: []ListHookRecentLogs200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `HooksAPI.ListHookRecentLogs`: %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 hook. |
Other parameters are passed through a pointer to a apiListHookRecentLogsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
logKey | string | The log key to filter logs. | page | int32 | Page number (starts from 1). | [default to 1] pageSize | int32 | Entries per page. | [default to 20]
[]ListHookRecentLogs200ResponseInner
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ListHooks200ResponseInner ListHooks(ctx).IncludeExecutionStats(includeExecutionStats).Page(page).PageSize(pageSize).Execute()
Get hooks
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
includeExecutionStats := "includeExecutionStats_example" // string | Whether to include execution stats in the response. (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.HooksAPI.ListHooks(context.Background()).IncludeExecutionStats(includeExecutionStats).Page(page).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HooksAPI.ListHooks``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListHooks`: []ListHooks200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `HooksAPI.ListHooks`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListHooksRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
includeExecutionStats | string | Whether to include execution stats in the response. | |
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]
UpdateHook200Response UpdateHook(ctx, id).UpdateHookRequest(updateHookRequest).Execute()
Update hook
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the hook.
updateHookRequest := *logto.NewUpdateHookRequest() // UpdateHookRequest |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.HooksAPI.UpdateHook(context.Background(), id).UpdateHookRequest(updateHookRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HooksAPI.UpdateHook``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateHook`: UpdateHook200Response
fmt.Fprintf(os.Stdout, "Response from `HooksAPI.UpdateHook`: %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 hook. |
Other parameters are passed through a pointer to a apiUpdateHookRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateHookRequest | UpdateHookRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateHook200Response UpdateHookSigningKey(ctx, id).Execute()
Update signing key for a hook
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the hook.
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.HooksAPI.UpdateHookSigningKey(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HooksAPI.UpdateHookSigningKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateHookSigningKey`: UpdateHook200Response
fmt.Fprintf(os.Stdout, "Response from `HooksAPI.UpdateHookSigningKey`: %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 hook. |
Other parameters are passed through a pointer to a apiUpdateHookSigningKeyRequest 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]