- Home
- API Enriched
- Tenant And Identity
- config
- Validate Rules.
Validate Rules.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/system/validate_rules';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"namespace":"example","validator_evaluation":{},"value":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/system/validate_rules \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "namespace": "example", "validator_evaluation": {}, "value": "example" }'ValidateRules returns whether the value is valid or not for the specified validator rules.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Request body of ValidateRulesReq request.
object
The name of the namespace which will be system in this case.
Map contains vaidators which needs to be evaluated.
object
The value to be validated.
Examplegenerated
{ "namespace": "example", "validator_evaluation": {}, "value": "example"}Responses
Section titled “Responses”A successful response.
Response body of ValidateRulesReq request.
object
Error returned in case the value does not match the validator rules.
This will set true if validation is successful on value.
This will return a list of validation results based on validators passed as input.
object
Information message will be returned for inline notification and error messages for validation rules.
Example
{ "validation_results": [ { "severity": "ERROR" } ]}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example