Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Create Model

POST/api/v2/models
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Creates a new Model with no versions.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:models-write.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

CreateModelRequest
object
Hide child attributes

Hide child attributes

name
string
parentFolderRid
string

The unique resource identifier (RID) of a Folder.

Response body

Model
object

The created Model

Hide child attributes

Hide child attributes

rid
string

The Resource Identifier (RID) of a Model.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/models?preview=true" \ -d '{"parentFolderRid":"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791","name":"House Pricing Model"}'

Response

Copied!
1 2 3 { "rid": "ri.models.main.model.f351c142-0e4c-4b12-adc2-6e1539737ae9" }

Error responses

Error Name
CreateModelPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not create the Model.
Parameters