Skip to main content

I am trying to call an Action which has a required header parameter. Thought the Action command might fix this (instead of Post), but I get an error when running the script:

API Doc:

 

My Script:

ApplyJson Into getResult1

{}

Action PartConfigurationRevisionHandling.svc/ConfigPartSpecRevSet(PartNo={#input.PartNo},SpecRevisionNo=1)/IfsApp.PartConfigurationRevisionHandling.ConfigPartSpecRev_Release Using getResult1 Into actionResult1

{}

 

Resulting error:

2025-02-07 08:21:26 Application exception error: {"error":{"code":"ODP_MISSING_PRECONDITION","message":"A precondition is missing in the request."}}  POST PartConfigurationRevisionHandling.svc/ConfigPartSpecRevSet(PartNo='TEST1',SpecRevisionNo=1)/IfsApp.PartConfigurationRevisionHandling.ConfigPartSpecRev_Release failed with 428

 

Any ideas on how to fix this? I can get it to work in Postman by adding the required Header Parameter. But in SAR there is only one Header Parameter available.

Hi ​@addaneh 

If-Match header parameter is applying from Using keyword, could you please check the getResult1 contains etag property. It should contain "@odata.etag" property 

Also, you can use “LogLevel=diag” command line argument to evaluate the values on request headers


Hi ​@addaneh 

If-Match header parameter is applying from Using keyword, could you please check the getResult1 contains etag property. It should contain "@odata.etag" property 

Also, you can use “LogLevel=diag” command line argument to evaluate the values on request headers

Thanks! This did the trick! I updated the getResult1 to:

ApplyJson Into getResult1

{

"@odata.etag" : *

}


Reply