AnsweredAssumed Answered

So How to do this below transformation in policy manager? & How to Maintain Global Configuration?

Question asked by Sathish2306 on Jun 5, 2015
Latest reply on Jun 9, 2015 by Beiming

Hi,

 

So i have a JSON Like this,

 

{

  "glossary": {

    "title": "example glossary",

    "GlossDiv": {

      "title": "S",

      "GlossList": {

        "GlossEntry": {

          "ID": "SGML",

          "SortAs": "SGML",

          "GlossTerm": "Standard Generalized Markup Language",

          "Acronym": "SGML",

          "Abbrev": "ISO 8879:1986",

          "GlossSee": "markup"

        }

      }

    }

  }

}

 

I want to remove this key from the json,

 

"GlossEntry": {

          "ID": "SGML",

          "SortAs": "SGML",

          "GlossTerm": "Standard Generalized Markup Language",

          "Acronym": "SGML",

          "Abbrev": "ISO 8879:1986",

          "GlossSee": "markup"

        }

 

After removing that key i need to transform that json into,

 

{

  "gloss_entry": {

    "id": "SGML",

    "sort_as": "SGML",

    "gloss_Term": "Standard Generalized Markup Language",

    "acronym": "SGML",

    "abbrev": "ISO 8879:1986",

    "gloss_see": "markup"

  }

}

 

And the remaining json should be in a sperate context variable.

 

{

  "glossary": {

    "title": "example glossary",

    "GlossDiv": {

      "title": "S",

      "key":"value"

    }

  }

}.

 

So, What i have done to achieve this till now:

 

1. Applied JSON Path extraction for almost all keys and saved in a context variable and changed that into a JSON. (Bad Way!!!! I Know).

 

Questions:

 

1. How can this be achieved?

2. is there any JSON Mapping assertion available? (But i searched i didn't find, may be i haven't noticed).

 

P.S:

 

Extra Question:

 

1. So i 100 Services written in JAVA, and i want to expose them via layer 7.

 

Till Now What i have done:

 

1. Used the REST API Publish Proxy Wizard

2. Configured manually all services with the full url  of proxy (E.g https://host:port/1/2/3)

 

Questions:

 

1. How to maintain global host name and port? So that i can just go ahead changed that configuration it will get reflected to all the proxy services.

Outcomes