Extensions and Configuration
Updated On 18 October 2024 | Min(s) read

APIs

This section covers the details of the APIs supported by Generic Configuration microservices.

V1.0.0

ADD GENERIC CONFIGURATION FILE
This API is used to save new generic configuration file.

POST/system/configurationGroups/{groupId}/configuration/{configName}

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config 
Request
{
  "id": "d290f1ee-test123",
  "name": "holdings-pdp-config.xml",
  "version":"1.0.0",
  "configData": {
    "data": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxwZHAgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM9Imh0dHA6Ly9hdXRoemZvcmNlLmdpdGh1Yi5pby9jb3JlL3htbG5zL3BkcC82LjAiDQoJdmVyc2lvbj0iNi4wLjAiPg0KCTxyb290UG9saWN5UHJvdmlkZXIgaWQ9InJvb3RQb2xpY3lQcm92aWRlciINCgkJeHNpOnR5cGU9IlN0YXRpY1Jvb3RQb2xpY3lQcm92aWRlciIgcG9saWN5TG9jYXRpb249ImNsYXNzcGF0aDp4YWNtbC9ob2xkaW5ncy10ZXN0LXBvbGljeS54bWwiIC8+DQo8L3BkcD4=", "configType": "xml"
  }
}
Sample Response
{
    "id": "d290f1ee-test123",
    "name": "holdings-pdp-config.xml",
    "version": "1.0.0"
}
MODIFY GENERIC CONFIGURATION FILE
This API is used to modify the configuration file.

PUT/system/configurationGroups/{groupId}/configuration/{configName}

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config
Request
{
  "version":"2.0.0",
  "configData": {
    "data": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxwZHAgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM9Imh0dHA6Ly9hdXRoemZvcmNlLmdpdGh1Yi5pby9jb3JlL3htbG5zL3BkcC82LjAiDQoJdmVyc2lvbj0iNi4wLjAiPg0KCTxyb290UG9saWN5UHJvdmlkZXIgaWQ9InJvb3RQb2xpY3lQcm92aWRlciINCgkJeHNpOnR5cGU9IlN0YXRpY1Jvb3RQb2xpY3lQcm92aWRlciIgcG9saWN5TG9jYXRpb249ImNsYXNzcGF0aDp4YWNtbC9ob2xkaW5ncy10ZXN0LXBvbGljeS54bWwiIC8+DQo8L3BkcD4="
    
  }
}
Sample Response
{
    "id": "d290f1ee-fr456t",
    "name": "holdings-pdp-config.xml",
    "version": "2.0.0"
}
GET GENERIC CONFIGURATION FILE
This API is used to retrieve the configuration file.

GET/system/configurationGroups/{groupId}/configuration/{configName}

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config
Response
{
  "id": "d290f1ee-test123",
  "name": "holdings-pdp-config.xml",
  "version":"1.0.0",
  "configData": {
    "data": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxwZHAgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM9Imh0dHA6Ly9hdXRoemZvcmNlLmdpdGh1Yi5pby9jb3JlL3htbG5zL3BkcC82LjAiDQoJdmVyc2lvbj0iNi4wLjAiPg0KCTxyb290UG9saWN5UHJvdmlkZXIgaWQ9InJvb3RQb2xpY3lQcm92aWRlciINCgkJeHNpOnR5cGU9IlN0YXRpY1Jvb3RQb2xpY3lQcm92aWRlciIgcG9saWN5TG9jYXRpb249ImNsYXNzcGF0aDp4YWNtbC9ob2xkaW5ncy10ZXN0LXBvbGljeS54bWwiIC8+DQo8L3BkcD4=", "configType": "xml"
  }
}          
GET LIST GENERIC CONFIGURATION FILE
This API is used to retrieve list configuration file.

GET /system/configurationGroups/{groupId}/configuration/

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holdings/configuration/
Response
{
    "items": [
        {
            "id": "d290f1ee-fr456t",
            "name": "holdings-pdp-config.xml",
            "version": "2.0.0"
        }
    ]
}
GET METADATA OF A GROUP
This API is used to fetch metadata and version information of a group.

GET /system/configurationGroups/{groupId}/configurations/metadata

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.T24Transact.policies/configurations/metadata
Response
{
    "items": [
        {
            "id": "d290f1ee-fr456t",
            "name": "holdings-pdp-config.xml",
            "versions": [
                "2.0.0",
                "1.0.0"
            ]
        }
    ]
}
GET ALL VERSIONS OF CONFIGURATION FILES GIVEN IN THE GROUPID AND CONFIGID
This API is used to fetch all the versions of a configuration under a grpup.

GET /system/configurationGroups/{groupId}/configurations/{configName}/versions:

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config/versions
Response
{
    "items": [
        {
            "id": "d290f1ee-test456",
            "name": "holdings-pdp-config.xml",
            "version": "2.0.0",
            "configData": {
                "data": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxwZHAgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM9Imh0dHA6Ly9hdXRoemZvcmNlLmdpdGh1Yi5pby9jb3JlL3htbG5zL3BkcC82LjAiDQoJdmVyc2lvbj0iNi4wLjAiPg0KCTxyb290UG9saWN5UHJvdmlkZXIgaWQ9InJvb3RQb2xpY3lQcm92aWRlciINCgkJeHNpOnR5cGU9IlN0YXRpY1Jvb3RQb2xpY3lQcm92aWRlciIgcG9saWN5TG9jYXRpb249ImNsYXNzcGF0aDp4YWNtbC9ob2xkaW5ncy10ZXN0LXBvbGljeS54bWwiIC8+DQo8L3BkcD4=",
                "configType": "xml"
            }
        },
        {
            "id": "d290f1ee-test123",
            "name": "holdings-pdp-config.xml",
            "version": "1.0.0",
            "configData": {
                "data": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxwZHAgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM9Imh0dHA6Ly9hdXRoemZvcmNlLmdpdGh1Yi5pby9jb3JlL3htbG5zL3BkcC82LjAiDQoJdmVyc2lvbj0iNi4wLjAiPg0KCTxyb290UG9saWN5UHJvdmlkZXIgaWQ9InJvb3RQb2xpY3lQcm92aWRlciINCgkJeHNpOnR5cGU9IlN0YXRpY1Jvb3RQb2xpY3lQcm92aWRlciIgcG9saWN5TG9jYXRpb249ImNsYXNzcGF0aDp4YWNtbC9ob2xkaW5ncy10ZXN0LXBvbGljeS54bWwiIC8+DQo8L3BkcD4=",
                "configType": "xml"
            }
        }
    ]
}
DELETE CONFIGURATION FILE
This API is used to deletes the application configuration details for provided group Id and configuration name.

DELETE /system/configurationGroups/{groupId}/configurations/{configName}:

Case 1: Deletes the latest version of the config if versionId is not provided in the query params

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config
Response
{
  "id": "holdings-pdp-config",
  "name": "holdings-pdp-config",
  "version": "3.0.0",
}

Case 2: Deletes the mentioned version of the config if versionId is provided in the query params

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config?versionId=2.0.0
Response
{
  "id": "holdings-pdp-config",
  "name": "holdings-pdp-config",
  "version": "2.0.0",
}

Case 3: Deletes all the versions of the config if deleteAll param is set to true in the query params.

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config?deleteAll=true
Response
{
  "id": "holdings-pdp-config",
  "name": "holdings-pdp-config"
}

V2.0.0

ADD GENERIC CONFIGURATION FILE
This API is used to save new generic configuration file.



POST/system/configurationGroups/{groupId}/configuration/{configName}

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v2.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config 
Request
{
    "id": "d290f1ee-fr456t",
    "name": "holdings-pdp-config.xml",
    "version": "2.0.0",
    "configData": {
        "data": {
            "field1": "value1",
            "field2": "value2"
        },
        "configType": "json"
    }
}
Sample Response
{
    "id": "d290f1ee-fr456t",
    "name": "holdings-pdp-config.xml",
    "version": "2.0.0"
}
MODIFY GENERIC CONFIGURATION FILE
This API is used to modify the configuration file.



PUT/system/configurationGroups/{groupId}/configuration/{configName}

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v2.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config
Request
{
    "version": "2.0.0",
    "configData": {
        "data": {
            "field1": "value1",
            "field2": "value2"
        },
        "configType": "json"
    }
}
Sample Response
{
    "id": "d290f1ee-fr456t",
    "name": "holdings-pdp-config.xml",
    "version": "2.0.0"
}
GET GENERIC CONFIGURATION FILE
This API is used to retrieve the configuration file.



GET/system/configurationGroups/{groupId}/configuration/{configName}

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v2.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config
Response
{
    "id": "default",
    "name": "root policy file",
    "version": "2.0.0",
    "configData": {
        "data": {
            "field1": "value1",
            "field2": "value2"
        },
        "configType": "json"
    }
}
GET LIST GENERIC CONFIGURATION FILE
This API is used to retrieve list configuration file.



GET /system/configurationGroups/{groupId}/configuration/

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v2.0.0/system/configurationGroups/xacml.policy.holdings/configuration?showData=true
Response
{
    "items": [
        {
            "id": "d290f1ee-fr456t",
            "name": "holdings-pdp-config.xml",
            "version": "2.0.0",
            "configData": {
                "data": {
                    "field1": "value1",
                    "field2": "value2"
                },
                "configType": "json"
            }
        }
    ]
}
GET ALL VERSIONS OF CONFIGURATION FILES GIVEN IN THE GROUPID AND CONFIGID
This API is used to fetch all the versions of a configuration under a grpup.

GET /system/configurationGroups/{groupId}/configurations/{configName}/versions:

Sample URL
http://localhost:7006/ms-genericconfig-api/api/v2.0.0/system/configurationGroups/xacml.policy.holdings/configuration/holdings-pdp-config/versions
Response
{
    "items": [
        {
            "id": "d290f1ee-fr456t",
            "name": "holdings-pdp-config.xml",
            "version": "2.0.0",
            "configData": {
                "data": {
                    "field1": "value1",
                    "field2": "value2"
                },
                "configType": "json"
            }
        },
        {
            "id": "d290f1ee-fr4532l",
            "name": "holdings-pdp-config.xml",
            "version": "1.0.0",
            "configData": {
                "data": {
                    "field1": "value1",
                    "field2": "value2"
                },
                "configType": "json"
            }
        }
    ]
}

In this topic

Copyright © 2020- Temenos Headquarters SA

Published on :
Sunday, March 23, 2025 2:59:25 PM IST