Preview a LAR profile on a sample
POST
/v1/lar-profiles/{id}/preview
const url = 'http://localhost:8080/v1/lar-profiles/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/preview';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"sample":"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 http://localhost:8080/v1/lar-profiles/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/preview \ --header 'Content-Type: application/json' \ --data '{ "sample": "example" }'Applies the profile’s mapping to sample; the LAR document as text for json/csv/xml profiles, or the file’s bytes as base64 for docx; and returns one row per canonical field with the path used, the value found and whether it was found; nothing is stored. Administrators only. 404 for an unknown profile, 400 when the sample is not valid JSON.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
sample
string
Examplegenerated
{ "sample": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
rows
required
Array<object>
object
canonical
required
string
path
required
string
value
required
null | string
found
required
boolean
found
integer | string format: int32
missing
integer | string format: int32
Examplegenerated
{ "rows": [ { "canonical": "example", "path": "example", "value": "example", "found": true } ], "found": 1, "missing": 1}