All URIs are relative to https://localhost:8080
Method | HTTP request | Description |
---|---|---|
GetOPARules | Get /api/org/opa | List OPA rules. |
UpdateOrgOPARules | Put /api/org/opa | Update OPA rules. |
NewOPARules GetOPARules(ctx).Execute()
List OPA rules.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/TykTechnologies/dashboard-sdk"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OpenPolicyAgentAPI.GetOPARules(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OpenPolicyAgentAPI.GetOPARules``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOPARules`: NewOPARules
fmt.Fprintf(os.Stdout, "Response from `OpenPolicyAgentAPI.GetOPARules`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetOPARulesRequest 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]
ApiResponse UpdateOrgOPARules(ctx).NewOPARules(newOPARules).Execute()
Update OPA rules.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/TykTechnologies/dashboard-sdk"
)
func main() {
newOPARules := *openapiclient.NewNewOPARules() // NewOPARules | Create rule to prevent creation of keyless APIs. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OpenPolicyAgentAPI.UpdateOrgOPARules(context.Background()).NewOPARules(newOPARules).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OpenPolicyAgentAPI.UpdateOrgOPARules``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateOrgOPARules`: ApiResponse
fmt.Fprintf(os.Stdout, "Response from `OpenPolicyAgentAPI.UpdateOrgOPARules`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUpdateOrgOPARulesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
newOPARules | NewOPARules | Create rule to prevent creation of keyless APIs. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]