All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
AddDelegatedUser | Put /users/{baseUser}/authorizedUsers/delegatedUser | Add a delegated user to a base user |
ChangeUsername | Post /users/{oldUser}/rename/{newUser} | Change a username |
CreateUserIdentity | Post /users/{username}/identities | Create a JMAP user identity |
DeleteUser | Delete /users/{username} | Delete a user |
ExistsUser | Head /users/{username} | Test user existence |
ListAllowedFromHeaders | Get /users/{givenUser}/allowedFromHeaders | Retrieve the list of allowed From headers for a given user |
ListDelegatedUsers | Get /users/{baseUser}/authorizedUsers | Retrieve the list of delegated users of a base user |
ListUserIdentities | Get /users/{username}/identities | Retrieve the user identities |
ListUsers | Get /users | Retrieve the user list |
RemoveAllDelegatedUsers | Delete /users/{baseUser}/authorizedUsers | Remove all delegated users of a base user |
RemoveDelegatedUser | Delete /users/{baseUser}/authorizedUsers/delegatedUser | Remove a delegated user from a base user |
UpdateUserIdentity | Put /users/{username}/identities/{identityId} | Update a JMAP user identity |
UpsertUser | Put /users/{username} | Create or Update User |
AddDelegatedUser(ctx, baseUser, delegatedUser).Execute()
Add a delegated user to a base user
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
baseUser := "baseUser_example" // string |
delegatedUser := "delegatedUser_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.AddDelegatedUser(context.Background(), baseUser, delegatedUser).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.AddDelegatedUser``: %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. | |
baseUser | string | ||
delegatedUser | string |
Other parameters are passed through a pointer to a apiAddDelegatedUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChangeUsername(ctx, oldUser, newUser).Action(action).Execute()
Change a username
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
oldUser := "oldUser_example" // string |
newUser := "newUser_example" // string |
action := "action_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.ChangeUsername(context.Background(), oldUser, newUser).Action(action).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ChangeUsername``: %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. | |
oldUser | string | ||
newUser | string |
Other parameters are passed through a pointer to a apiChangeUsernameRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
action | string | |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateUserIdentity(ctx, username).CreateUserIdentityRequest(createUserIdentityRequest).Execute()
Create a JMAP user identity
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
username := "username_example" // string |
createUserIdentityRequest := *openapiclient.NewCreateUserIdentityRequest() // CreateUserIdentityRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.CreateUserIdentity(context.Background(), username).CreateUserIdentityRequest(createUserIdentityRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.CreateUserIdentity``: %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. | |
username | string |
Other parameters are passed through a pointer to a apiCreateUserIdentityRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createUserIdentityRequest | CreateUserIdentityRequest | |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteUser(ctx, username).Execute()
Delete a user
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
username := "username_example" // string | The username to be deleted
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.DeleteUser(context.Background(), username).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.DeleteUser``: %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. | |
username | string | The username to be deleted |
Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExistsUser(ctx, username).Execute()
Test user existence
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
username := "username_example" // string | The username to be tested
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.ExistsUser(context.Background(), username).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ExistsUser``: %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. | |
username | string | The username to be tested |
Other parameters are passed through a pointer to a apiExistsUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]string ListAllowedFromHeaders(ctx, givenUser).Execute()
Retrieve the list of allowed From headers for a given user
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
givenUser := "givenUser_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.ListAllowedFromHeaders(context.Background(), givenUser).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ListAllowedFromHeaders``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAllowedFromHeaders`: []string
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ListAllowedFromHeaders`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
givenUser | string |
Other parameters are passed through a pointer to a apiListAllowedFromHeadersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
[]string
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]string ListDelegatedUsers(ctx, baseUser).Execute()
Retrieve the list of delegated users of a base user
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
baseUser := "baseUser_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.ListDelegatedUsers(context.Background(), baseUser).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ListDelegatedUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDelegatedUsers`: []string
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ListDelegatedUsers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
baseUser | string |
Other parameters are passed through a pointer to a apiListDelegatedUsersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
[]string
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ListUserIdentities200ResponseInner ListUserIdentities(ctx, username).Default_(default_).Execute()
Retrieve the user identities
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
username := "username_example" // string |
default_ := true // bool | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.ListUserIdentities(context.Background(), username).Default_(default_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ListUserIdentities``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListUserIdentities`: []ListUserIdentities200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ListUserIdentities`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string |
Other parameters are passed through a pointer to a apiListUserIdentitiesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
default_ | bool | |
[]ListUserIdentities200ResponseInner
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ListUsers200ResponseInner ListUsers(ctx).Execute()
Retrieve the user list
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.ListUsers(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ListUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListUsers`: []ListUsers200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ListUsers`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListUsersRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveAllDelegatedUsers(ctx, baseUser).Execute()
Remove all delegated users of a base user
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
baseUser := "baseUser_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.RemoveAllDelegatedUsers(context.Background(), baseUser).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.RemoveAllDelegatedUsers``: %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. | |
baseUser | string |
Other parameters are passed through a pointer to a apiRemoveAllDelegatedUsersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveDelegatedUser(ctx, baseUser, delegatedUser).Execute()
Remove a delegated user from a base user
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
baseUser := "baseUser_example" // string |
delegatedUser := "delegatedUser_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.RemoveDelegatedUser(context.Background(), baseUser, delegatedUser).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.RemoveDelegatedUser``: %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. | |
baseUser | string | ||
delegatedUser | string |
Other parameters are passed through a pointer to a apiRemoveDelegatedUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateUserIdentity(ctx, username, identityId).UpdateUserIdentityRequest(updateUserIdentityRequest).Execute()
Update a JMAP user identity
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
username := "username_example" // string |
identityId := "identityId_example" // string |
updateUserIdentityRequest := *openapiclient.NewUpdateUserIdentityRequest() // UpdateUserIdentityRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.UpdateUserIdentity(context.Background(), username, identityId).UpdateUserIdentityRequest(updateUserIdentityRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.UpdateUserIdentity``: %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. | |
username | string | ||
identityId | string |
Other parameters are passed through a pointer to a apiUpdateUserIdentityRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateUserIdentityRequest | UpdateUserIdentityRequest | |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpsertUser(ctx, username).UpsertUserRequest(upsertUserRequest).Force(force).Execute()
Create or Update User
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
username := "username_example" // string | The username of the user to be created or updated
upsertUserRequest := *openapiclient.NewUpsertUserRequest("Password_example") // UpsertUserRequest |
force := true // bool | Indicates whether to force update the password (for updating password only) (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.UpsertUser(context.Background(), username).UpsertUserRequest(upsertUserRequest).Force(force).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.UpsertUser``: %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. | |
username | string | The username of the user to be created or updated |
Other parameters are passed through a pointer to a apiUpsertUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
upsertUserRequest | UpsertUserRequest | | force | bool | Indicates whether to force update the password (for updating password only) |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]