Specify an entity alias
Auto-generated aliases in the response are not straightforward. For example, Community0
, Responsibility1
or User2
. For this reason, you must specify an alias.
- JSON
- YAML
{
"ViewConfig": {
"Resources": {
"Community": {
"name": "community",
"Id": { "name": "community id" },
"Name": { "name": "community name" },
"Responsibility": {
"name": "responsibility",
"User": {
"name": "employee",
"Id": { "name": "user id" },
"FirstName": { "name": "first name" },
"LastName": { "name": "last name" }
},
"Role": {
"name": "role",
"Signifier": { "name": "role name" }
}
}
}
}
}
}
---
ViewConfig:
Resources:
Community:
name: "community"
Id:
name: "community id"
Name:
name: "community name"
Responsibility:
name: "responsibility"
User:
name: "employee"
Id:
name: "user id"
FirstName:
name: "first name"
LastName:
name: "last name"
Role:
name: "role"
Signifier:
name: "role name"
The results should then parse like the example below.
{
"view": {
"community": [
{
"communityId": "c87f166e-041f-4bea-8ff7-c1ffbab2ceeb",
"communityName": "First Community"
},
{
"communityId": "12345678-0020-0000-0000-000000000000",
"communityName": "Second Community",
"responsibility": [
{
"employee": [
{
"userId": "00000000-0000-0000-0000-000000900002",
"firstName": "Admin",
"lastName": "Istrator"
}
],
"role": [
{
"roleName": "Admin"
}
]
},
{
"employee": [
{
"userId": "00000000-0000-0000-0000-000000900002",
"firstName": "Admin",
"lastName": "Istrator"
}
],
"role": [
{
"roleName": "Steward"
}
]
}
]
}
]
}
}