Skip to navigation

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} to check whether a connection type supports use as a source.

Authentication

AuthorizationBasic

This is the Polytomic deployment key (on-premises only)

OR
AuthorizationBearer
This is the Polytomic 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

Technical/source field names to publish in the model. Use source names, not model-field UUIDs or display labels. For example, use dealname rather than Deal Name. Omit or pass an empty array to publish all standard source fields.

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
dataobjectOptional
jobobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error