All URIs are relative to https://localhost:9200/graph
| Method | HTTP request | Description |
|---|---|---|
| UserCreateAppRoleAssignments | Post /v1.0/users/{user-id}/appRoleAssignments | Grant an appRoleAssignment to a user |
| UserDeleteAppRoleAssignments | Delete /v1.0/users/{user-id}/appRoleAssignments/{appRoleAssignment-id} | Delete the appRoleAssignment from a user |
| UserListAppRoleAssignments | Get /v1.0/users/{user-id}/appRoleAssignments | Get appRoleAssignments from a user |
AppRoleAssignment UserCreateAppRoleAssignments(ctx, userId).AppRoleAssignment(appRoleAssignment).Execute()
Grant an appRoleAssignment to a user
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opencloud-eu/libre-graph-api-go"
)
func main() {
userId := "userId_example" // string | key: id of user
appRoleAssignment := *openapiclient.NewAppRoleAssignment("AppRoleId_example", "PrincipalId_example", "ResourceId_example") // AppRoleAssignment | New app role assignment value
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserAppRoleAssignmentApi.UserCreateAppRoleAssignments(context.Background(), userId).AppRoleAssignment(appRoleAssignment).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserAppRoleAssignmentApi.UserCreateAppRoleAssignments``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UserCreateAppRoleAssignments`: AppRoleAssignment
fmt.Fprintf(os.Stdout, "Response from `UserAppRoleAssignmentApi.UserCreateAppRoleAssignments`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| userId | string | key: id of user |
Other parameters are passed through a pointer to a apiUserCreateAppRoleAssignmentsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
appRoleAssignment | AppRoleAssignment | New app role assignment value |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserDeleteAppRoleAssignments(ctx, userId, appRoleAssignmentId).IfMatch(ifMatch).Execute()
Delete the appRoleAssignment from a user
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opencloud-eu/libre-graph-api-go"
)
func main() {
userId := "userId_example" // string | key: id of user
appRoleAssignmentId := "appRoleAssignmentId_example" // string | key: id of appRoleAssignment. This is the concatenated {user-id}:{appRole-id} separated by a colon.
ifMatch := "ifMatch_example" // string | ETag (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserAppRoleAssignmentApi.UserDeleteAppRoleAssignments(context.Background(), userId, appRoleAssignmentId).IfMatch(ifMatch).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserAppRoleAssignmentApi.UserDeleteAppRoleAssignments``: %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 | key: id of user | |
| appRoleAssignmentId | string | key: id of appRoleAssignment. This is the concatenated {user-id}:{appRole-id} separated by a colon. |
Other parameters are passed through a pointer to a apiUserDeleteAppRoleAssignmentsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
ifMatch | string | ETag |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CollectionOfAppRoleAssignments UserListAppRoleAssignments(ctx, userId).Execute()
Get appRoleAssignments from a user
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opencloud-eu/libre-graph-api-go"
)
func main() {
userId := "userId_example" // string | key: id of user
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserAppRoleAssignmentApi.UserListAppRoleAssignments(context.Background(), userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserAppRoleAssignmentApi.UserListAppRoleAssignments``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UserListAppRoleAssignments`: CollectionOfAppRoleAssignments
fmt.Fprintf(os.Stdout, "Response from `UserAppRoleAssignmentApi.UserListAppRoleAssignments`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| userId | string | key: id of user |
Other parameters are passed through a pointer to a apiUserListAppRoleAssignmentsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
CollectionOfAppRoleAssignments
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]