0

I have the below message from where I want to remove the field "Status Code"

{
    "Details": {
        "UT_LL": 22235,
        "UT_ZZ": 512,
        "Status Code": 206,
        "UT_DATE": "2019-10-02-11.36.16.353965",
        "UT_TOTAL_REC": 132
    }
}

Appreciate your help as I am new to API connect. Also kindly note that I have already went through IBM portal and Knowledge center for the same use case..But none of those options work.

1 Answer 1

0

Not sure if you already solved, as it has been some time since this post. But nevertheless the solution for the wider community.

I was using API Connect 2018.4.1.9 (but should work same with earlier versions too) and was using DataPower API Gateway Service

1] I created a mock endpoint to respond with the above JSON data

2] Response w/o redact policy

{
    "Details": {
        "UT_LL": 22235,
        "UT_ZZ": 512,
        "Status Code": 206,
        "UT_DATE": "2019-10-02-11.36.16.353965",
        "UT_TOTAL_REC": 132
    }
}

3] Response with redact policy. As you could see the Status Code field is removed (redacted), you could choose

{
  "Details": {
    "UT_LL": 22235,
    "UT_ZZ": 512,    
    "UT_DATE": "2019-10-02-11.36.16.353965",
    "UT_TOTAL_REC": 132
  }
}

API Yaml file i used.

https://github.com/pramodvallanur/samples/blob/master/redact-sample.yaml

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the response Pramodh..I tried and it worked..However if I want to redact more than one field can I do that by adding comma after each field? like message.body.Details."Status Code", message.body.Details."UT_DATE"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.