All URIs are relative to https://virtserver.swaggerhub.com/perimeter81/public-api-yaml/1.0.0
| Method | HTTP request | Description |
|---|---|---|
| CreateCustomRole | Post /v3/gum/custom-roles | Create a new custom role |
| DeleteCustomRole | Delete /v3/gum/custom-roles/{roleId} | Delete a custom role |
| GetCustomRole | Get /v3/gum/custom-roles/{roleId} | Get a specific custom role by ID |
| GetCustomRoleCategories | Get /v3/gum/custom-roles/categories | Get all permission categories |
| ListCustomRoles | Get /v3/gum/custom-roles | List all custom roles for tenant |
| UpdateCustomRole | Put /v3/gum/custom-roles/{roleId} | Update a custom role |
GumCustomRoleResponse CreateCustomRole(ctx).GumCreateCustomRoleRequest(gumCreateCustomRoleRequest).Execute()
Create a new custom role
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CheckPointSW/perimeter-81-client-sdk/v3"
)
func main() {
gumCreateCustomRoleRequest := *openapiclient.NewGumCreateCustomRoleRequest("Name_example", []openapiclient.CategoryEntry{*openapiclient.NewCategoryEntry("CategoryId_example", "Access_example")}) // GumCreateCustomRoleRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomRolesAPI.CreateCustomRole(context.Background()).GumCreateCustomRoleRequest(gumCreateCustomRoleRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomRolesAPI.CreateCustomRole``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateCustomRole`: GumCustomRoleResponse
fmt.Fprintf(os.Stdout, "Response from `CustomRolesAPI.CreateCustomRole`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateCustomRoleRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| gumCreateCustomRoleRequest | GumCreateCustomRoleRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteCustomRole(ctx, roleId).Execute()
Delete a custom role
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CheckPointSW/perimeter-81-client-sdk/v3"
)
func main() {
roleId := "roleId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.CustomRolesAPI.DeleteCustomRole(context.Background(), roleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomRolesAPI.DeleteCustomRole``: %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. | |
| roleId | string |
Other parameters are passed through a pointer to a apiDeleteCustomRoleRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GumCustomRoleResponse GetCustomRole(ctx, roleId).Execute()
Get a specific custom role by ID
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CheckPointSW/perimeter-81-client-sdk/v3"
)
func main() {
roleId := "roleId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomRolesAPI.GetCustomRole(context.Background(), roleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomRolesAPI.GetCustomRole``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCustomRole`: GumCustomRoleResponse
fmt.Fprintf(os.Stdout, "Response from `CustomRolesAPI.GetCustomRole`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| roleId | string |
Other parameters are passed through a pointer to a apiGetCustomRoleRequest 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]
GumCustomRoleCategoriesResponse GetCustomRoleCategories(ctx).Execute()
Get all permission categories
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CheckPointSW/perimeter-81-client-sdk/v3"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomRolesAPI.GetCustomRoleCategories(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomRolesAPI.GetCustomRoleCategories``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCustomRoleCategories`: GumCustomRoleCategoriesResponse
fmt.Fprintf(os.Stdout, "Response from `CustomRolesAPI.GetCustomRoleCategories`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetCustomRoleCategoriesRequest struct via the builder pattern
GumCustomRoleCategoriesResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GumCustomRolesListResponse ListCustomRoles(ctx).Execute()
List all custom roles for tenant
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CheckPointSW/perimeter-81-client-sdk/v3"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomRolesAPI.ListCustomRoles(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomRolesAPI.ListCustomRoles``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCustomRoles`: GumCustomRolesListResponse
fmt.Fprintf(os.Stdout, "Response from `CustomRolesAPI.ListCustomRoles`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListCustomRolesRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GumCustomRoleResponse UpdateCustomRole(ctx, roleId).GumUpdateCustomRoleRequest(gumUpdateCustomRoleRequest).Execute()
Update a custom role
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CheckPointSW/perimeter-81-client-sdk/v3"
)
func main() {
roleId := "roleId_example" // string |
gumUpdateCustomRoleRequest := *openapiclient.NewGumUpdateCustomRoleRequest() // GumUpdateCustomRoleRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomRolesAPI.UpdateCustomRole(context.Background(), roleId).GumUpdateCustomRoleRequest(gumUpdateCustomRoleRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomRolesAPI.UpdateCustomRole``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCustomRole`: GumCustomRoleResponse
fmt.Fprintf(os.Stdout, "Response from `CustomRolesAPI.UpdateCustomRole`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| roleId | string |
Other parameters are passed through a pointer to a apiUpdateCustomRoleRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
gumUpdateCustomRoleRequest | GumUpdateCustomRoleRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]