Validate From Schema
Requires enable-data-models-feature feature flag. Validate data against a json schema, either by schema definition or schema ID. jsonSchema or schemaId are required parameters.
Authorization Required:
- Authenticated
Request
- Base URLhttps://env.unqork.io/api/1.0
- AuthOAuth 2Client credentialsPasswordToken URLhttps://xyzfinancial.unqork.io/api/1.0/oauth2/access_token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
If false, ignore required fields of a schema and validate the format only
Request body
Response
Successful
An object with a key of data, with a value that is an object. That object has keys that are the fieldMapping field with the matching data property as the value. If no fieldMapping is passed, then the passed data is returned if no errors are encountered. e.g. Given the data below plus the fieldMapping example -
data: { name1: 'shirt', price1: 1, addProp: 'extra' }
jsonSchema: { title: 'Sample Schema', type: 'object', properties: { name: { type: 'string' }, price: { type: 'number' } }, required: ['name'] }
Response:
{ data: { 'modelId': { name: 'shirt', price: 1 } } }
Changes
No recorded changes to this operation across all 6 revisions of this API.