Entity definition collection
The Entity Definition Collection Resource contains all of the entity definitions present in the system.
Methods supported: GET, HEAD, POST
GET /api/entitydefinitions{?skip,take}
ViewMode 'Extended' will return an Entity Definition Collection Object that contains all entity definitions in the system. ViewMode 'Basic' will return a Entity Definition Basic Collection Object that contains all entity definitions (no filters applied) in the system with a limited subset of properties.
Chunking
If there are more entity definitions than can fit in a single chunk, a link is included to retrieve the next chunk.
Ranging
If the take parameter is specified, the number of entity definitions returned is limited to that parameter (up to 100). The skip parameter can also be included to further determine which range of entity definitions is returned.
ViewMode
if the 'viewMode' parameter is specified, the collection of returned properties changes. Two options are available: 'Basic' and 'Extended' (default). Basic will return a non-paged subset of Extended with properties: id, name, labels.
Filter
The 'filter' parameter will allow the returned entity definitions to be filtered by a boolean property (IsSystemOwned, IsTaxonomyItemDefinition, etc...). The filter is case-insensitive. E.g.: &filter=issystemowned==true
Example Request:
GET http://<hostname>/api/entitydefinitions
Host: hostname
Accept: application/json
Example Response:
HTTP/1.1 200 OK
Content-Length: content lengtha
Content-Type: application/json; charset=utf-8
ETag: "hash string"
{
"items": [
Entity Definition Objects
],
"next",{
"href":"http://<hostname>/api/entitydefinitions?skip=25"
},
"returned_items":25,
"self":{
"href":"http://<hostname>/api/entitydefinitions"
},
"total_items":33
}
POST /api/entitydefinitions
Adds a new entity definition to the collection of entity definitions in the system. A complete Entity Definition Object is expected in the body. Success is indicated by returning a 201 Created response, where a Location header contains the URL of the newly created resource.
Note: when posting a new entity definition, the properties id, self and entities are ignored and can be omitted.
Example Request:
POST http://<hostname>/api/entitydefinitions
Host: hostname
Content-Type: application/json
{
"name":"New entity definition",
"member_groups":[
{
"name":"New member group",
"labels":{
"en-US":"New member group",
"nl-BE":"Nieuwe onderdeel groep"
},
"members":[
{
"type":"String"
"name":"New string property"
},
...
]
},
...
]
}
Example Response:
HTTP/1.1 201 Created
Location: http://<hostname>/api/entitydefinitons/New%20entity%20definition