Some API methods return Entity objects in the Legacy Entity format only. Some API methods may return both formats depending on the value of the input. In general, the MQL Entity format is used whenever there is a "select" property/parameter specified.
API method |
Legacy format |
MQL format |
GET /entities/{objectId} |
If "select" parameter is not specified |
If "select" parameter is specified |
GET /relationships/{objectId} |
If "select" parameter is not specified |
If "select" parameter is specified |
POST /entities/executeMQLQuery |
If "legacyEntityFormat" is set to true |
If "legacyEntityFormat" is set to false |
GET /repository/getContext |
Always |
|
GET /configuration/listModels |
Always |
|
GET /entities/reports/{termId} |
Always |
|
GET /configurations/listConnectedModels |
Always |
The entity objects that the system attributes such as
Context, Source and Destination, may have are always returned in the legacy
entity format even though the object itself may be represented in the MQL entity
format.
Following is a sample Entity object in the MQL Entity Format
which corresponds to the SELECT list: Name, Context:
{
"attributes": [
{
"attributeType": {
"name": "Name",
"displayName": "Name",
"type": "ATTRIBUTE"
},
"value": "Employee Sales by Country"
},
{
"attributeType": {
"name": "Context",
"displayName": "Context",
"type": "SYSTEM_ATTRIBUTE"
},
"value": [
{
"id": "20_1",
"objectType": {
"name": "RDBMS Relational Database (Server).Database Server",
"displayName": "RDBMS Relational Database (Server).Database Server"
},
"name": "Northwind"
},
{
"id": "22_1",
"objectType": {
"name": "RDBMS Relational Database (Database).Database Schema",
"displayName": "RDBMS Relational Database (Database).Database Schema"
},
"name": "dbo"
}
]
}
]
}
The entity objects embedded within the system attributes contain only the following properties: id, name and objectType.