All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| DescribePermissions | Get /security/permissions/{subject} | Describe permissions |
| GetPermissions | Get /security/permissions/list | List permissions |
| GrantPermissions | Post /security/permissions/{subject} | Grant permissions |
| RevokePermissions | Delete /security/permissions/{subject} | Revoke permissions |
PermissionDescription DescribePermissions(ctx, subject).Resource(resource).Permission(permission).Execute()
Describe permissions
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subject := "subject_example" // string |
resource := "resource_example" // string | (optional)
permission := "permission_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PermissionsApi.DescribePermissions(context.Background(), subject).Resource(resource).Permission(permission).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PermissionsApi.DescribePermissions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DescribePermissions`: PermissionDescription
fmt.Fprintf(os.Stdout, "Response from `PermissionsApi.DescribePermissions`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| subject | string |
Other parameters are passed through a pointer to a apiDescribePermissionsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
resource | string | | permission | string | |
ApiToken, ServiceBearer, ServiceToken
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Permissions GetPermissions(ctx).Execute()
List permissions
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PermissionsApi.GetPermissions(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PermissionsApi.GetPermissions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPermissions`: Permissions
fmt.Fprintf(os.Stdout, "Response from `PermissionsApi.GetPermissions`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetPermissionsRequest struct via the builder pattern
ApiToken, ServiceBearer, ServiceToken
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GrantPermissions(ctx, subject).GrantPermission(grantPermission).Execute()
Grant permissions
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subject := "subject_example" // string |
grantPermission := *openapiclient.NewGrantPermission("Permission_example", "ResourceName_example") // GrantPermission |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PermissionsApi.GrantPermissions(context.Background(), subject).GrantPermission(grantPermission).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PermissionsApi.GrantPermissions``: %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. | |
| subject | string |
Other parameters are passed through a pointer to a apiGrantPermissionsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
grantPermission | GrantPermission | |
(empty response body)
ApiToken, ServiceBearer, ServiceToken
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RevokePermissions(ctx, subject).Resource(resource).Permission(permission).Execute()
Revoke permissions
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subject := "subject_example" // string |
resource := "resource_example" // string | (optional)
permission := "permission_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PermissionsApi.RevokePermissions(context.Background(), subject).Resource(resource).Permission(permission).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PermissionsApi.RevokePermissions``: %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. | |
| subject | string |
Other parameters are passed through a pointer to a apiRevokePermissionsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
resource | string | | permission | string | |
(empty response body)
ApiToken, ServiceBearer, ServiceToken
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]