Discussion

2
Replies
2350
Views
Close popover
Venkatesh Velu (VenkatVelu)
Standard Chartered Bank
Pega Development Solution Architect
Standard Chartered Bank
SG
VenkatVelu Member since 2011 6 posts
Standard Chartered Bank
Posted: July 28, 2016
Last activity: July 29, 2016
Closed

Unauthorized access: If-Match does not match ETag

 

For most of beginners who are trying to use PUT API call, they will get stuck what value they have to put in If-Match attribute. Below information will help them to overcome that issue.

 

What is the value you have to give in If-Match field of PUT /cases/{ID} API call?

Value of the entity tag that is received as ETag header in responses to create case and get case details APIs

When you want to update a case using PUT API call, you have to give an etag value in If-Match request attribute. You can get the etag from Create Case or Get Case Reponse Header. I have highlighted in bold in the below response header.

 

Response Header of Get Case ID:

{
  "date": "Thu, 28 Jul 2016 04:00:01 GMT",
  "content-encoding": "gzip",
  "server": "Apache-Coyote/1.1",
  "x-powered-by": "Servlet 2.5; JBoss-5.0/JBossWeb-2.1",
  "etag": "\"20160728T024035.456 GMT\"",
  "warning": "299 uklvadcsc01a.uk.standardchartered.com \"Use of TLS/SSL is strongly recommended for services using Basic Authentication\"",
  "content-type": "application/json;charset=UTF-8",
  "cache-control": "no-cache, proxy-revalidate",
  "proxy-connection": "Keep-Alive",
  "connection": "Keep-Alive",
  "content-length": "2348"}

 

If you give wrong value you will get the below error.

{

  "pxObjClass": "Pega-API-CaseManagement-Case",

  "errors": [

    {

      "ID": "Pega_API_021",

      "message": "Unauthorized access: If-Match does not match ETag",

      "pxObjClass": "Pega-API-Error"

    }

  ]

}

 

 

Low-Code App Development Data Integration
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Discussion, please write a new Discussion.