All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
PerformActionsOnMailboxes | Post /mailboxes | Perform actions on mailboxes |
ReindexMailbox | Post /mailboxes/{mailboxId} | Reindex a mailbox |
PerformActionsOnMailboxes201Response PerformActionsOnMailboxes(ctx).Action(action).Execute()
Perform actions on mailboxes
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
action := "action_example" // string | Comma-separated list of actions to perform on mailboxes
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MailboxAPI.PerformActionsOnMailboxes(context.Background()).Action(action).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxAPI.PerformActionsOnMailboxes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PerformActionsOnMailboxes`: PerformActionsOnMailboxes201Response
fmt.Fprintf(os.Stdout, "Response from `MailboxAPI.PerformActionsOnMailboxes`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPerformActionsOnMailboxesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
action | string | Comma-separated list of actions to perform on mailboxes |
PerformActionsOnMailboxes201Response
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PerformActionsOnMailboxes201Response ReindexMailbox(ctx, mailboxId).Task(task).MessagesPerSecond(messagesPerSecond).Mode(mode).Execute()
Reindex a mailbox
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
mailboxId := "mailboxId_example" // string | ID of the mailbox to reindex
task := "task_example" // string | The reindexing task to perform
messagesPerSecond := int32(56) // int32 | The rate at which messages should be processed per second (optional)
mode := "mode_example" // string | The reindexing mode used (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MailboxAPI.ReindexMailbox(context.Background(), mailboxId).Task(task).MessagesPerSecond(messagesPerSecond).Mode(mode).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxAPI.ReindexMailbox``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReindexMailbox`: PerformActionsOnMailboxes201Response
fmt.Fprintf(os.Stdout, "Response from `MailboxAPI.ReindexMailbox`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
mailboxId | string | ID of the mailbox to reindex |
Other parameters are passed through a pointer to a apiReindexMailboxRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
task | string | The reindexing task to perform | messagesPerSecond | int32 | The rate at which messages should be processed per second | mode | string | The reindexing mode used |
PerformActionsOnMailboxes201Response
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]