All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| Add | Post /api/v2/users | |
| Delete1 | Delete /api/v2/users/{username} | |
| Get1 | Get /api/v2/users/{username} | |
| GetAll2 | Get /api/v2/users | |
| Update | Put /api/v2/users/{username} |
Add(ctx).ApiUserDTO(apiUserDTO).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
apiUserDTO := *sonatypeiq.NewApiUserDTO() // ApiUserDTO | Specify the user details for the new user to be created. All fields except `realm` are required. (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.Add(context.Background()).ApiUserDTO(apiUserDTO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.Add``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiAddRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| apiUserDTO | ApiUserDTO | Specify the user details for the new user to be created. All fields except `realm` are required. |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Delete1(ctx, username).Realm(realm).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
username := "username_example" // string | Enter the username to be deleted.
realm := "realm_example" // string | Enter the `realm`. Allowed values are `Internal`,`OAUTH2`, and `SAML`. (optional) (default to "Internal")
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.Delete1(context.Background(), username).Realm(realm).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.Delete1``: %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 | Enter the username to be deleted. |
Other parameters are passed through a pointer to a apiDelete1Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|
realm | string | Enter the `realm`. Allowed values are `Internal`,`OAUTH2`, and `SAML`. | [default to "Internal"]
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiUserDTO Get1(ctx, username).Realm(realm).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
username := "username_example" // string | Enter the username.
realm := "realm_example" // string | Enter the `realm`. Allowed values are `Internal`,`OAUTH2`, and `SAML`. (optional) (default to "Internal")
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.Get1(context.Background(), username).Realm(realm).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.Get1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Get1`: ApiUserDTO
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.Get1`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| username | string | Enter the username. |
Other parameters are passed through a pointer to a apiGet1Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|
realm | string | Enter the `realm`. Allowed values are `Internal`,`OAUTH2`, and `SAML`. | [default to "Internal"]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiUserListDTO GetAll2(ctx).Realm(realm).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
realm := "realm_example" // string | Enter the `realm`. Allowed values are `Internal`,`OAUTH2`, and `SAML`. (optional) (default to "Internal")
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.GetAll2(context.Background()).Realm(realm).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetAll2``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAll2`: ApiUserListDTO
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetAll2`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetAll2Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| realm | string | Enter the `realm`. Allowed values are `Internal`,`OAUTH2`, and `SAML`. | [default to "Internal"] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiUserDTO Update(ctx, username).ApiUserDTO(apiUserDTO).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
username := "username_example" // string | Enter the username.
apiUserDTO := *sonatypeiq.NewApiUserDTO() // ApiUserDTO | Specify the user details to be updated. Any unspecified field will remain unchanged. Username, password, and realm cannot be updated. (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.Update(context.Background(), username).ApiUserDTO(apiUserDTO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.Update``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Update`: ApiUserDTO
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.Update`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| username | string | Enter the username. |
Other parameters are passed through a pointer to a apiUpdateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
apiUserDTO | ApiUserDTO | Specify the user details to be updated. Any unspecified field will remain unchanged. Username, password, and realm cannot be updated. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]