All URIs are relative to /service/rest
| Method | HTTP request | Description |
|---|---|---|
| CreateSecuritySamlUsers | Post /v1/security/saml/users | Create a new SAML user. This allows administrators to pre-create SAML users with roles before their first login. |
| DeleteSecuritySamlUsers | Delete /v1/security/saml/users/{userId} | Delete a SAML user. |
| GetSecuritySamlUsers | Get /v1/security/saml/users/{userId} | Retrieve a SAML user by userId. |
| ListSecuritySamlUsers | Get /v1/security/saml/users | Retrieve a list of SAML users. The response is limited to 1,000 users. |
| UpdateSecuritySamlUsers | Put /v1/security/saml/users/{userId} | Update a SAML user's roles and attributes. |
CreateSecuritySamlUsers(ctx).SamlUserXO(samlUserXO).Execute()
Create a new SAML user. This allows administrators to pre-create SAML users with roles before their first login.
package main
import (
"context"
"fmt"
"os"
sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go/v395"
)
func main() {
samlUserXO := *sonatyperepo.NewSamlUserXO("Status_example", "UserId_example") // SamlUserXO | The SAML user to create
configuration := sonatyperepo.NewConfiguration()
apiClient := sonatyperepo.NewAPIClient(configuration)
r, err := apiClient.SecurityManagementSAMLUsersAPI.CreateSecuritySamlUsers(context.Background()).SamlUserXO(samlUserXO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityManagementSAMLUsersAPI.CreateSecuritySamlUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiCreateSecuritySamlUsersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| samlUserXO | SamlUserXO | The SAML user to create |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteSecuritySamlUsers(ctx, userId).Execute()
Delete a SAML user.
package main
import (
"context"
"fmt"
"os"
sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go/v395"
)
func main() {
userId := "userId_example" // string | The userid the request should apply to.
configuration := sonatyperepo.NewConfiguration()
apiClient := sonatyperepo.NewAPIClient(configuration)
r, err := apiClient.SecurityManagementSAMLUsersAPI.DeleteSecuritySamlUsers(context.Background(), userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityManagementSAMLUsersAPI.DeleteSecuritySamlUsers``: %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. | |
| userId | string | The userid the request should apply to. |
Other parameters are passed through a pointer to a apiDeleteSecuritySamlUsersRequest 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]
SamlUserXO GetSecuritySamlUsers(ctx, userId).Execute()
Retrieve a SAML user by userId.
package main
import (
"context"
"fmt"
"os"
sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go/v395"
)
func main() {
userId := "userId_example" // string | The userid the request should apply to.
configuration := sonatyperepo.NewConfiguration()
apiClient := sonatyperepo.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityManagementSAMLUsersAPI.GetSecuritySamlUsers(context.Background(), userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityManagementSAMLUsersAPI.GetSecuritySamlUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSecuritySamlUsers`: SamlUserXO
fmt.Fprintf(os.Stdout, "Response from `SecurityManagementSAMLUsersAPI.GetSecuritySamlUsers`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| userId | string | The userid the request should apply to. |
Other parameters are passed through a pointer to a apiGetSecuritySamlUsersRequest 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]
[]SamlUserXO ListSecuritySamlUsers(ctx).UserId(userId).Execute()
Retrieve a list of SAML users. The response is limited to 1,000 users.
package main
import (
"context"
"fmt"
"os"
sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go/v395"
)
func main() {
userId := "userId_example" // string | An optional term to search userids for. (optional)
configuration := sonatyperepo.NewConfiguration()
apiClient := sonatyperepo.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityManagementSAMLUsersAPI.ListSecuritySamlUsers(context.Background()).UserId(userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityManagementSAMLUsersAPI.ListSecuritySamlUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSecuritySamlUsers`: []SamlUserXO
fmt.Fprintf(os.Stdout, "Response from `SecurityManagementSAMLUsersAPI.ListSecuritySamlUsers`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListSecuritySamlUsersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | string | An optional term to search userids for. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateSecuritySamlUsers(ctx, userId).SamlUserXO(samlUserXO).Execute()
Update a SAML user's roles and attributes.
package main
import (
"context"
"fmt"
"os"
sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go/v395"
)
func main() {
userId := "userId_example" // string | The userid the request should apply to.
samlUserXO := *sonatyperepo.NewSamlUserXO("Status_example", "UserId_example") // SamlUserXO | The SAML user to update
configuration := sonatyperepo.NewConfiguration()
apiClient := sonatyperepo.NewAPIClient(configuration)
r, err := apiClient.SecurityManagementSAMLUsersAPI.UpdateSecuritySamlUsers(context.Background(), userId).SamlUserXO(samlUserXO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityManagementSAMLUsersAPI.UpdateSecuritySamlUsers``: %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. | |
| userId | string | The userid the request should apply to. |
Other parameters are passed through a pointer to a apiUpdateSecuritySamlUsersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
samlUserXO | SamlUserXO | The SAML user to update |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]