Skip to content

Validate Rules.

POST
/api/config/namespaces/system/validate_rules
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.

Examples of this operation.

Media typeapplication/json
ValidateRulesReq

Request body of ValidateRulesReq request.

object
namespace
namespace

The name of the namespace which will be system in this case.

string
>= 6 characters <= 1024 characters
validator_evaluation
validator evaluation

Map contains vaidators which needs to be evaluated.

object
value
value

The value to be validated.

string
>= 3 characters <= 1024 characters
Examplegenerated
{
"namespace": "example",
"validator_evaluation": {},
"value": "example"
}

A successful response.

Media typeapplication/json
ValidateRulesResponse

Response body of ValidateRulesReq request.

object
error
error

Error returned in case the value does not match the validator rules.

string
<= 1024 characters
success
success

This will set true if validation is successful on value.

boolean format: boolean
validation_results
Validation Results

This will return a list of validation results based on validators passed as input.

Array<object>
object
message
Messsge

Information message will be returned for inline notification and error messages for validation rules.

string
<= 1024 characters
severity
string
default: ERROR
Allowed values: ERROR INFO WARNING SUCCESS
Example
{
"validation_results": [
{
"severity": "ERROR"
}
]
}

Returned when operation is not authorized.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when there is no permission to access resource.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when resource is not found.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation on resource is conflicting with current value.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation has been rejected as it is happening too frequently.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server encountered an error in processing API.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when service is unavailable temporarily.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server timed out processing request.

Media typeapplication/json
string format: string
Examplegenerated
example