Dataset and Entities creation via API

Hi @TomJ,

Welcome! When you have a moment, please introduce yourself!

To answer your first two questions, you're correct that there is currently no way to create a dataset or add properties via the API, it must be done through building, and updating and publishing forms. I agree that this is not ideal and it is not the first time it has come up. I will think about how easy it will be for us to add this missing functionality to the API.

To answer your third question, yes, you do need to programmatically generate the UUID yourself when creating entities via the API. Central is expecting a v4 UUID with no "uuid" prefix. In Python, I've used the uuid library and uuid.uuid4().

Here's an example payload I've used to create an entity:

{
  "uuid":"3efd0449-3dd0-449f-9897-dd445a0befd5",
  "label":"My Entity",
  "data":{
    "some_property":"foo"
  }
}
1 Like