Asynchronous resource validation
Use RPC to run a validation operation to check a resource conformance
Asynchronous Batch Validation draft
draft
This is a draft API. We appreciate your feedback and ideas in this discussion
It may happen that you updated your profiles when data is already in your database or you want to do efficiently load a batch of data and validate it later. API consists of 4 procedures and a couple of resources:
aidbox.validation/batch-validation - run validation
aidbox.validation/resources-batch-validation-task - run validation with Aidbox Workflow
aidbox.validation/batch-validation-result - inspect results (useful for async mode)
aidbox.validation/clear-batch-validation - clear validation results
Prepare data
To illustrate let's create some invalid data in Aidbox:
Break data from DB Console:
aidbox.validation/batch-validation
You can validate your existing data with our new rpc aidbox.validation/batch-validation
:
aidbox.validation/resources-batch-validation-task
You can run validation workflow with rpc method, which creates task for every resource provided in rpc's params fields include
or exclude
:
You can also run workflow directly to achieve the same result.
If you specify include
param, only types you passed will be validated.
If you specify exclude
param, all types will be validated except the ones you passed.
include
and exclude
params cannot be used together.
You can check a progress of workflow in Aidbox UI or by rpc method:
aidbox.validation/batch-validation-result
If you run validation in async mode or aidbox.validation/resources-batch-validation-task, it will respond instantly and run validation in the background. You can get validation results with RPC aidbox.validation/batch-validation-result
aidbox.validation/clear-batch-validation
When you do not need results of this validation you can clean up resources with:
BatchValidationRun & BatchValidationError Resources
When you run validation operation aidbox internally creates resource BatchValidationRun and put errors of validation in BatchValidationError. You can access these resources through standard CRUD/Search API
If you restart Aidbox you have to start validation over
Last updated