Create Model

Creates a new model. A model defines a query or view over a connection's data — for example, a SQL query, a filtered object, or a joined dataset. Models are used as sources when creating model syncs. The connection referenced by `connection_id` must have source capabilities. Use [`GET /api/connection_types/{id}`](../../api-reference/connections/get-connection-type-schema) to check whether a connection type supports use as a source.

Authentication

AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic

Basic organization-scoped API key

Headers

X-Polytomic-VersionstringRequired

Query parameters

asyncbooleanOptional

Request

This endpoint expects an object.
configurationmap from strings to anyRequired
connection_idstringRequiredformat: "uuid"
namestringRequired
additional_fieldslist of objects or nullOptional
enricherobjectOptional
fieldslist of strings or nullOptional
identifierstringOptional
labelslist of strings or nullOptional
organization_idstring or nullOptionalformat: "uuid"
policieslist of strings or nullOptional
relationslist of objects or nullOptional
tracking_columnslist of strings or nullOptional

Response

OK
dataobject
jobobject

Errors

400
Bad Request Error
403
Forbidden Error
500
Internal Server Error