Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Can we omit "@odata.type" and "@odata.context" elements from dynamic 365 web API response by filtering the query?

(0) ShareShare
ReportReport
Posted on by

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

  • Suggested answer
    Raju Gudipalli Profile Picture
    185 on at
    RE: Can we omit "@odata.type" and "@odata.context" elements from dynamic 365 web API response by filtering the query?

    apiurl?$format=application/json;odata.metadata=none

  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at
    RE: Can we omit "@odata.type" and "@odata.context" elements from dynamic 365 web API response by filtering the query?

    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

  • Clem Profile Picture
    2,541 on at
    RE: Can we omit "@odata.type" and "@odata.context" elements from dynamic 365 web API response by filtering the query?

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans