API Gateway REST call to find applications with specific Identifier

Trying to work out or find an example using the API Gateway REST API (sorry system didn’t let me link to the SoftwareAG documentation page):

*(a) identify applications with a specific “identifier”
*(b) update/suspend applications with a specific “identifier”

https://<myapigateway>/rest/apigateway/applications/_search? << How to retrieve list based on a specific "identifier"

Identifier
Name=Team
Value=alpha

"identifiers":[{"id":<uuid>,"name":"Team","key":"accessProfile","value":["alpha"]}],

Hi Jason,

Are the identifier values going to be dynamic or static from the json string?

If static, then I think you can send Identifier as in header variables (key/value) and form the REST URI during runtime before it hits the target app.

Headerkey value
Name -== Team
Value == alpha

target REST endpoint would look like:
https:///rest/apigateway/applications/_search?Name=Team&Value=aplha

HTH,
RMG

1 Like

@RMG I tried that initially. As the values are nested, I think the search is expecting more (see the JSON which is provided if you query the app by app-UUID).

You need to alwas pass the uuid as identifier then you may pass any additonal fields .UUID generally recognises the app.

1 Like

Run this API admin servier to list down the application

http://apigateway:xxxx/rest/apigateway/applications. Store the JSON result

Use the value under applications > id in the JSON. Recent fix will allow you to see APP id if you have a developer portal.(sample JSON below)

http://apigateway:xxxx/rest/apigateway/applications/7063a71a-da31-4af9-bfdc-c901gg461sdbe

{

"applications": [

    {

        "name": "Test_XX_262397",

        "description": "For internal testing. Account number in FACTS 262397 (BH)",

        "contactEmails": [],

        "identifiers": [

            {

                "id": "d47ef11a-7c00-417b-aee4-dddddgrgfrgfgsg",

                "name": "test mapping",

                "key": "jwtClaims",

                "value": [

                    "test"

                ]

            }

        ],

        "siteURLs": [],

        "jsOrigins": [],

        "authStrategyIds": [

            "0cd98740-d8d8-43s4-8ge3-8cd59554666a"

        ],

        "version": "1.0",

        `"id": "7063a71a-da31-4af9-bfdc-c901gg461sdbe",`
1 Like

We are trying to filter the list of apps, so there is not one UUID.

Resolved, a couple of items to note. Firstly, we had to make use of the Post method instead of Get, and pass in JSON containing the following:

"scope": [{
        "attributeName": "identifiers.namedValues.values",
        "keyword": "Team"
    },
    {
        "attributeName":"identifiers.namedValues.values",
        "keyword":"TEAMNAME"
    }
],

Doing so provided a filtered list of applications with the specified “Team” identifier. I am now trying to filter the list further to just those applications which currently have a status of “Suspended”.

While the returned JSON data shows the following in the JSON for applications which have been suspended.

"isSuspended":true

My attempts to add that as an additional filter criteria have been unsuccessful.

I’ve tried including it as

  • {“attributeName”:“isSuspended”}
  • “isSuspended”:true
  • “isSuspended”:“true”
  • “isSuspended = true”

But no luck. I am going to mark this thread as resolved, as the initial question has been answered. But if anyone knows the correct syntax for retrieving a list of applications filtered by “isSuspended”:true, I would be grateful if you shared below. Thank you.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.