Question
Last activity: 19 Jun 2017 7:44 EDT
Pega API : unable to update case
Hi,
Please clarify on below points that are related to Pega API.
- Get Case operation:
>> what is the pattern of input parameter {id} to get the case details ? Is it Case Id or Inskey?.
>> we can call the API operations directly from external application with out alter the existing mechanism of get case api operation, but how do we keep needed attributes on response structure instead complete JSON format of service page as I would like to send status of
of object to external request.
Update case operation:
Unable to update the case status by using REST api since getting the below exceptions.
1) MyServicePage.pxObjClass (Pega-API-CaseManagement-Case)InvalidClassForInstance Abstract.
2) Getting HTTP Status code :403 , Here is the response , "pxObjClass":"Pega-API-CaseManagement-Case" ,"errors":[ { "ID":"Pega_API_020" ,"message":"Missing If-Match request header" ,"pxObjClass":"Pega-API-Error" } ] }
The following parameters are being passed in to service request
{ID} as Inskey of case id and
Request Body : { "content":{ "pyStatusWork":"Resolved-Completed"}}
Any inputs are most welcome.
PRPC version :7.2
-
Likes (1)
Siripuram Mahesh -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Pegasystems Inc.
US
ok, check further your user's access group. If you login as the pega default admin user, are you getting the same 403 error?
Getting the error : "Unauthorized access: If-Match does not match ETag" even tried with pega default admin user.
Looks like problem with If-Match request parameter , the If-Match param value is not match ETag param value that is set up from work page.
what is the significance of If-Match parameter value for update case api .Can't we skip the If-Match comparison ?
Activity : Work-.svcPerformFlowAction .
Pegasystems Inc.
US
Praneeth Purighalla, can you comment when you get a chance?
Updated: 18 Mar 2016 12:27 EDT
Pegasystems Inc.
CA
- Get Case operation:
>> what is the pattern of input parameter {id} to get the case details ? Is it Case Id or Inskey?.
It must be InsKey and since that would contain a space character, you need to URL encode it.
>> we can call the API operations directly from external application with out alter the existing mechanism of get case api operation, but how do we keep needed attributes on response structure instead complete JSON format of service page as I would like to send status of object to external request.
At this point we don't have a filter mechanism on this API. It returns all the case details and you cannot customize it.
Update case operation:
Unable to update the case status by using REST api since getting the below exceptions.
1) MyServicePage.pxObjClass (Pega-API-CaseManagement-Case)InvalidClassForInstance Abstract.
Never seen that error before. Is it only in the logs?
- Get Case operation:
>> what is the pattern of input parameter {id} to get the case details ? Is it Case Id or Inskey?.
It must be InsKey and since that would contain a space character, you need to URL encode it.
>> we can call the API operations directly from external application with out alter the existing mechanism of get case api operation, but how do we keep needed attributes on response structure instead complete JSON format of service page as I would like to send status of object to external request.
At this point we don't have a filter mechanism on this API. It returns all the case details and you cannot customize it.
Update case operation:
Unable to update the case status by using REST api since getting the below exceptions.
1) MyServicePage.pxObjClass (Pega-API-CaseManagement-Case)InvalidClassForInstance Abstract.
Never seen that error before. Is it only in the logs?
2) Getting HTTP Status code :403 , Here is the response , "pxObjClass":"Pega-API-CaseManagement-Case" ,"errors":[ { "ID":"Pega_API_020" ,"message":"Missing If-Match request header" ,"pxObjClass":"Pega-API-Error" } ] }
As the error indicates, your request is missing If-Match header. This header is mandatory to prevent stale updates. The value of this header must be equivalent to the value in the ETag response header of Create Case or Get Case APIs.
Updated: 6 Apr 2016 12:29 EDT
Pegasystems Inc.
FR
Hi,
You can get the If-Match value from the header in the response of your REST call (in the bottom of the Swagger page):
1) Make your REST call with a dummy If-Match value
2) Retrieve the ETag from the response (N.B. this ETag can be retrieved from any method call on this particular case, e.g. GET /cases/{ID} is also working)
3) Enter the ETag value in the If-Match input
4) Try it out
Hi,
You can get the If-Match value from the header in the response of your REST call (in the bottom of the Swagger page):
1) Make your REST call with a dummy If-Match value
2) Retrieve the ETag from the response (N.B. this ETag can be retrieved from any method call on this particular case, e.g. GET /cases/{ID} is also working)
3) Enter the ETag value in the If-Match input
4) Try it out
You can get the requestBody input structure calling the GET /cases/{ID} method
You have to reuse the content parameter value
My 2 cents,
Gilles
-
Reshmi Krishnamayi
Coforge
US
When I try to create a case using the default api api.v1.cases with post to create a case, it does create the case without any issues. But in the tracer it throws an error message (Pega-API-CaseManagement-Case)InvalidClassForInstance Abstract
When I try to create a case using the default api api.v1.cases with post to create a case, it does create the case without any issues. But in the tracer it throws an error message (Pega-API-CaseManagement-Case)InvalidClassForInstance Abstract
This comment has been branched out as a new node and the new thread can be followed here
Pegasystems Inc.
IN
Hi Imranullah,
You have replied to an older thread which lacks activity. To gather better visibility for your question, I have branched it to create a new question. You may continue your conversation on this thread: https://collaborate.pega.com/question/tracer-error-pega-api-casemanagement-caseinvalidclassforinstance-abstract
Hope the information is helpful.
Thanks!