0

I want to request entities metadata from Dynamics 365 database. I want to get LogicalName, DisplayName and list of Attributes with their Logical and Display names as well. My current request looks like that:

https://<organization_name>.api.crm.dynamics.com/api/data/v9.2/EntityDefinitions?
$select=LogicalName,DisplayName
&$expand=Attributes($select=LogicalName,DisplayName)
&LabelLanguages=1033

DisplayName is of a complex type that consists of a list of LocalizedLabels and a UserLocalizedLabel. UserLocalizedLabel is also of a complex type that has Label property.

"value": [
  {
    "LogicalName": "<name>",
    "DisplayName": {
      "LocalizedLabels": [
        {
          "Label": "<Pretty Name>",
           ...
        }
      ],
      "UserLocalizedLabel": {
        "Label": "<Pretty Name>",
        ...
      }
    }
    "Attributes": [
      {
        "LogicalName": "<name>",
        "DisplayName": {
          "LocalizedLabels": [
            {
              "Label": "<Pretty Name>",
              ...
            }
          ],
          "UserLocalizedLabel": {
            "Label": "<Pretty Name>",
            ...
          }
      }
    ]
  },
  ...
}

The only property I really need from DisplayName is Label from UserLocalizedLabel. The response would look like this:

"value": [
  {
    "LogicalName": "<name>",
    "Label": "<Pretty Name>",
    "Attributes": [
      {
        "LogicalName": <name>,
        "Label": "<Pretty Name>"
      },
      ...
    ]
  },
  ...
  }
]

How do I make such request?

Sun of A beach
  • 171
  • 1
  • 10

0 Answers0