Models

Returns a sample of records from a model.

Synchronous requests must complete within 10 seconds. If the source query or enrichment step can exceed that budget, use the asynchronous option so the work runs as a background job.

get/api/models/{id}/sample

Request

  • Base URL
    https://app.polytomic.com
  • Auth
    • HTTP bearer
    • or HTTP basic

Path parameters

idstring uuid required

Model ID

Example:248df4b7-aa70-47b8-a036-33ac447e668d

Query parameters

asyncboolean

Run in the background and return a job instead of the result.

Headers

X-Polytomic-Versionstring

Response

OK

Example response

{
  "data": {
    "records": [
      {
        "enricher-uuid": {
          "name": "James"
        },
        "model-uuid": {
          "name": "Jim"
        }
      }
    ],
    "warnings": [
      "Enrichment failed for 4 records: you have ran out of credits"
    ]
  },
  "job": {
    "error": "error message",
    "job_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
    "type": "createmodel"
  }
}

Changes

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status