Hi, I am working on dynamic 365 web API and I want to omit properties like "@odata.type" , "@odata.context" and "Attributes@odata.context" from JSON response. The properties i want to omit i have highlited below. Please suggest the way it will be great help.
{
"@odata.context": "jitterbitaccount.crm8.dynamics.com/.../v8.1$metadata#EntityDefinitions(LogicalName,Attributes(AttributeType,LogicalName))/$entity",
"LogicalName": "account",
"MetadataId": "70816501-edb9-4740-a16c-6a5efbc05d84",
"Attributes@odata.context": "jitterbitaccount.crm8.dynamics.com/.../v8.1$metadata#EntityDefinitions(70816501-edb9-4740-a16c-6a5efbc05d84)/Attributes(AttributeType,LogicalName)",
"Attributes": [
{
"AttributeType": "Virtual",
"LogicalName": "preferredcontactmethodcodename",
"MetadataId": "8663b910-af86-4dea-826e-8222706372f4"
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata",
"AttributeType": "String",
"LogicalName": "emailaddress3",
"MetadataId": "97fb4aae-ea5d-427f-9b2b-9a6b9754286e"
}
}
*This post is locked for comments
apiurl?$format=application/json;odata.metadata=none
You can skip few things by mentioning below in the headers to mention what to include in response. Try this:
Content-Type: application/json; odata.metadata=minimal
Just by curiosity, what's annoying to have these extra parts in the JSON result ?
You could skip those lines since i guess what is interesting for you is in the same nodes.
Is it blocking you for any post process ?
Clément
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6