Is it possible to create a new model via the REST API, and at the same time, define the multiple fields it should have?
What Iโm trying to do is convert a block to a model. I can retrieve the block and get its fields, like:
"data": [
{
"id": "7149005",
"type": "field"
},
{
"id": "7149007",
"type": "field"
},
(etc.
]
But the same data format canโt be used to create a new model with the fields intact. The API rejects it:
โ#/data/relationships: failed schema #/definitions/item_type/links/1/schema/properties/data/properties/relationships: "fields" is not a permitted key.โ,
Is the only way to programmatically add fields to a new model looping through them one at a time, waiting for the job response each time? There isnโt a way to define a model and fields in one request?
Thanks!