Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Etag value not valid on PUT request

Posted on by Microsoft Employee

Hello,

i am having problems trying to update records through NAV 2015 OData WS.

I am getting: "The etag value '28;X8MAAAJ7/0EARAAwADAAMQAAAAAA9;7238058930;' specified in one of the request headers is not valid. Please make sure only one etag value is specified and is valid."

This is what i get if i do a GET:

GET   http://*******:****/****/Odata/Company('***')/Socios('AD001')?$format=json

{
"odata.metadata": "http://*********.es:****/******/OData/$metadata#Socios/@Element",
"N_x00BA_": "AD001",
"Nombre": "JESUS",
"ETag": "28;X8MAAAJ7/0EARAAwADAAMQAAAAAA9;7238058930;"
}


I am trying to update with this call:


PUT http://********.*****.es:****/*****/Odata/Company('****')/Socios('AD001') HTTP/1.1 Accept-Encoding: gzip,deflate Authorization: Basic bGlmZXVzZXI6QXRhbWExYXRhbWEx OData-MaxVersion: 4.0 OData-Version: 4.0 If-Match: 28;X8MAAAJ7/0EARAAwADAAMQAAAAAA9;7238058930; Content-Type: application/json Accept: application/json Content-Length: 107 Host: **********.*****.es:**** Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) { "N_x00BA_": "AD001", "Nombre": "JESUS", "ETag": "28;X8MAAAJ7/0EARAAwADAAMQAAAAAA9;7238058930;" }

Can i get some help?

Thx you very much.

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Etag value not valid on PUT request

    I found the solution:

    The If-math header must have this format:

    W / " ' EtagValue ' "

    In my example: If-Match: W/"'28;X8MAAAJ7/0EARAAwADAAMQAAAAAA9;7238058930;'"

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans