/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_name
string
Yes

A new (unique) name for the entityType.

attr_defs
string
Yes

An initial set of attributes (as JSON) to add to the entityType. (See the Attributes section for details on attribute definitions.)

client_id
string
Yes

The client identifier.

client_secret
string
Yes

The shared secret paired with the client_id.

Example Response
https://yourdomain.com/entityType.create?type_name=user&attr_defs=[{"name":"Name","type":"string","case-sensitive":false},{"name":"Description","type":"string","length":1000,"case-sensitive":false}]&client_id=12345678912345678912345678912345&client_secret=98765432198765432198765432198765

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"
}

Help Us Improve!

Give us your feedback