/entityType.create
Create a new entityType with the specified set of attributes.
EntityType JSON Structure for attr_defs
Here is a basic example of a small, JSON formatted schema:
attr_defs=[{"name":"Name","type":"string","case-sensitive":false},{"name":"Description","type":"string","length":1000,"case-sensitive":false}]
This creates a new schema with the required default attributes such as id, uuid, as well as the two new ones defined in the JSON above: name and description.
URL
https://{yourdomain}.com/entityType.create
Request
| Parameter | Required | Description |
|---|---|---|
type_namestring | Yes | A new (unique) name for the entityType. |
attr_defsstring | Yes | An initial set of attributes (as JSON) to add to the entityType. (See the Attributes section for details on attribute definitions.) |
client_idstring | Yes | The client identifier. |
client_secretstring | Yes | The shared secret paired with the client_id. |
Example Response
Create an entityType called user with attributes birthday, zipcode, and a name object containing firstName, and lastName.
{ "schema" : { "attr_defs" : [ { "description" : "simple identifier for this entity",
"name" : "id",
"type" : "id"
},
{ "description" : "globally unique indentifier for this entity",
"name" : "uuid",
"type" : "uuid"
},
{ "description" : "when this entity was created",
"name" : "created",
"type" : "dateTime"
},
{ "description" : "when this entity was last updated",
"name" : "lastUpdated",
"type" : "dateTime"
},
{ "case-sensitive" : false,
"length" : 1000,
"name" : "Description",
"type" : "string"
},
{ "case-sensitive" : false,
"length" : null,
"name" : "Name",
"type" : "string"
}
],
"name" : "user3"
},
"stat" : "ok"
}