Extensions and Configuration
R24 AMR | Min(s) read

APIs

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

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

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

Sample URL
http://localhost:8095/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holidings/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:8095/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holidings/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:8095/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holidings/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:8095/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/xacml.policy.holidings/configuration/
Response
{
    "items": [
        {
            "id": "d290f1ee-fr456t",
            "name": "holdings-pdp-config.xml",
            "version": "2.0.0"
        }
    ]
}          
DELETE CONFIG BY NAME WITHOUT ANY QUERY PARAM
This API is used to delete the latest version of the config if versionId is not provided in the query param.

DELETE /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": "holdings-pdp-config",
  "name": "holdings-pdp-config",
  "version": "3.0.0",
}
DELETE CONFIG BY NAME WITH QUERY PARAM VERSIONID
This API is used to delete the mentioned version of the config if versionId is provided in the query param.

DELETE /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?versionId=2.0.0
Response
{
  "id": "holdings-pdp-config",
  "name": "holdings-pdp-config",
  "version": "2.0.0",
}
DELETE CONFIG BY NAME WITH QUERY PARAM DELETEALL
This API is used to delete all the versions of the config if deleteAll param is set to true in the query param.

DELETE /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?deleteAll=true
Response
{
  "id": "holdings-pdp-config",
  "name": "holdings-pdp-config"
}

In this topic

Copyright © 2020- Temenos Headquarters SA

Published on :
Friday, May 31, 2024 10:43:00 AM IST