Discussion

2
Replies
2262
Views
VenkatVelu Member since 2011 6 posts
Standard Chartered Bank
Posted: 4 years ago
Last activity: 4 years 2 months ago
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
Share this page LinkedIn