web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

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

I have the same question (0)
  • Clem Profile Picture
    2,541 on at

    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

  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    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

  • Suggested answer
    Raju Gudipalli Profile Picture
    185 on at

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans