Models

Sample Records

GET
Returns sample records from the model. The first ten records that the source provides will be returned after being enriched (if applicable). Synchronous requests must complete within 10s. If either querying or enrichment exceeds 10s, please use the async option.

Path parameters

idstringRequired

Query parameters

asyncbooleanOptional

Response

This endpoint returns an object
data
objectOptional
job
objectOptional

Errors

GET
1curl https://app.polytomic.com/api/models/248df4b7-aa70-47b8-a036-33ac447e668d/sample \
2 -H "Authorization: Bearer <token>"
1{
2 "data": {
3 "records": [
4 {
5 "enricher-uuid": {
6 "name": "James"
7 },
8 "model-uuid": {
9 "name": "Jim"
10 }
11 }
12 ],
13 "warnings": [
14 "Enrichment failed for 4 records: you have ran out of credits"
15 ]
16 },
17 "job": {
18 "error": "error message",
19 "job_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
20 "result": {
21 "key": "value"
22 },
23 "status": "running",
24 "type": "createmodel"
25 }
26}