Class RestAPIGovernanceImpl
java.lang.Object
org.wso2.am.integration.test.impl.RestAPIGovernanceImpl
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRestAPIGovernanceImpl(String username, String password, String tenantDomain, String url) Constructor for the RestAPIGovernanceImpl -
Method Summary
Modifier and TypeMethodDescriptioncreatePolicy(APIMGovernancePolicyDTO policyDTO) Create a new governance policycreateRuleset(String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider) Create a new rulesetdeletePolicy(String policyId) Delete a governance policydeleteRuleset(String rulesetId) Delete a rulesetgetAPICompliance(String apiId) Get the compliance details of an artifactgetPolicies(Integer limit, Integer offset, String query) Get all governance policiesGet a governance policygetPolicyAdherence(String poilcyId) Get the policy adherence details of a policygetRuleset(String rulesetId) Get a rulesetgetRulesets(Integer limit, Integer offset, String query) Get all rulesetsupdatePolicy(String policyId, APIMGovernancePolicyDTO policyDTO) Update an existing governance policyupdateRuleset(String rulesetId, String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider) Update an existing ruleset
-
Field Details
-
apiGovernanceClient
-
appName
- See Also:
-
callBackURL
- See Also:
-
tokenScope
- See Also:
-
appOwner
- See Also:
-
grantType
- See Also:
-
username
- See Also:
-
password
- See Also:
-
tenantDomain
-
-
Constructor Details
-
RestAPIGovernanceImpl
Constructor for the RestAPIGovernanceImpl- Parameters:
username- Username of the userpassword- Password of the usertenantDomain- Tenant domain of the userurl- server URL
-
-
Method Details
-
createRuleset
public ApiResponse<RulesetInfoDTO> createRuleset(String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider) throws ApiException Create a new ruleset- Parameters:
name- Name of the rulesetrulesetContent- Content of the rulesetruleType- Type of the ruleartifactType- Type of the artifactdescription- Description of the rulesetruleCategory- Category of the ruledocumentationLink- Documentation link of the rulesetprovider- Provider of the ruleset- Returns:
- RulesetInfoDTO
- Throws:
ApiException- If there is an issue with the API request
-
updateRuleset
public ApiResponse<RulesetInfoDTO> updateRuleset(String rulesetId, String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider) throws ApiException Update an existing ruleset- Parameters:
rulesetId- Id of the rulesetname- Name of the rulesetrulesetContent- Content of the rulesetruleType- Type of the ruleartifactType- Type of the artifactdescription- Description of the rulesetruleCategory- Category of the ruledocumentationLink- Documentation link of the rulesetprovider- Provider of the ruleset- Returns:
- RulesetInfoDTO
- Throws:
ApiException- If there is an issue with the API request
-
deleteRuleset
Delete a ruleset- Parameters:
rulesetId- Id of the ruleset- Returns:
- Void
- Throws:
ApiException- If there is an issue with the API request
-
getRuleset
Get a ruleset- Parameters:
rulesetId- Id of the ruleset- Returns:
- RulesetInfoDTO
- Throws:
ApiException- If there is an issue with the API request
-
getRulesets
public ApiResponse<RulesetListDTO> getRulesets(Integer limit, Integer offset, String query) throws ApiException Get all rulesets- Parameters:
limit- Limit of the rulesetsoffset- Offset of the rulesetsquery- Query to search for rulesets- Returns:
- RulesetListDTO
- Throws:
ApiException- If there is an issue with the API request
-
createPolicy
public ApiResponse<APIMGovernancePolicyDTO> createPolicy(APIMGovernancePolicyDTO policyDTO) throws ApiException Create a new governance policy- Parameters:
policyDTO- APIMGovernancePolicyDTO object- Returns:
- APIMGovernancePolicyDTO
- Throws:
ApiException- If there is an issue with the API request
-
updatePolicy
public ApiResponse<APIMGovernancePolicyDTO> updatePolicy(String policyId, APIMGovernancePolicyDTO policyDTO) throws ApiException Update an existing governance policy- Parameters:
policyId- Id of the policypolicyDTO- APIMGovernancePolicyDTO object- Returns:
- APIMGovernancePolicyDTO
- Throws:
ApiException- If there is an issue with the API request
-
deletePolicy
Delete a governance policy- Parameters:
policyId- Id of the policy- Returns:
- Void
- Throws:
ApiException- If there is an issue with the API request
-
getPolicy
Get a governance policy- Parameters:
policyId- Id of the policy- Returns:
- APIMGovernancePolicyDTO
- Throws:
ApiException- If there is an issue with the API request
-
getPolicies
public ApiResponse<APIMGovernancePolicyListDTO> getPolicies(Integer limit, Integer offset, String query) throws ApiException Get all governance policies- Parameters:
limit- Limit of the policiesoffset- Offset of the policiesquery- Query to search for policies- Returns:
- APIMGovernancePolicyListDTO
- Throws:
ApiException- If there is an issue with the API request
-
getAPICompliance
Get the compliance details of an artifact- Parameters:
apiId- Id of the API- Returns:
- ArtifactComplianceDetailsDTO
- Throws:
ApiException- If there is an issue with the API request
-
getPolicyAdherence
public ApiResponse<PolicyAdherenceDetailsDTO> getPolicyAdherence(String poilcyId) throws ApiException Get the policy adherence details of a policy- Parameters:
poilcyId- Id of the policy- Returns:
- PolicyAdherenceDetailsDTO
- Throws:
ApiException- If there is an issue with the API request
-