I am using PUT method of document rest api for inserting document but I want to validate xml document before ingestion using schema if it fails I have to report it back. How can I achieve this within Marklogic using rest api similiar to xdmp:validate() in xquery ?
I have come across approach like pre-commit triggers, creating rest transformation etc..looking for your inputs.