The API class that is needed for entity, entity meta and field creation is EntityManager
with its CreateEntity
method. To initiate this, you need to be in Administrator
role. You can create an entity with a code similar to:
var userEntity = new InputEntity();
userEntity.Name = "user";
userEntity.Label = "User";
userEntity.LabelPlural = "Users";
userEntity.System = true;
userEntity.Color = "#f44336";
userEntity.IconName = "ti-user";
EntityResponse response = new EntityManager().CreateEntity(userEntity);
To initiate this web request, you need to be in Administrator
role.
POST https://<YOUR_DOMAIN>/api/v3/en_US/meta/entity
No query parameters are required with this method.
You need to post a InputEntity
object as a request body.
If successful, this method returns a response JSON with the following structure:
{
"timestamp": "2014-03-03T23:20:23Z",
"success": false,
"message": "Aliqua anim consequat amet cupidatat proident amet amet.",
"errors": [
{
"key": "fieldName",
"value": "evaluated value",
"message": "Error message"
}
],
"object": {
/// The newly created entity
}
}
Important: This page describes a process of creating an entity using the WebVella SDK Plugin
web interface