How to invoke Publish Configuration in API Exchange Gateway without ConfigUI?

How to invoke Publish Configuration in API Exchange Gateway without ConfigUI?

book

Article ID: KB0074251

calendar_today

Updated On:

Products Versions
TIBCO API Exchange 2.x
Not Applicable -

Description

In ConfigUI, the "Publish Configuration" button, on each configuration, can be used to request the engine to reload the configuration( or reread all the .cfg files) it is currently running with.
This article provides options to do this without ConfigUI.

Issue/Introduction

This article provides inputs on reloading the configuration in APIX-G without ConfigUI.

Resolution

1) You can use a REST API from the command line:

#Upto APIX-G v2.2.1
curl -X GET http://<CORE_HOST>:<facade_port>/publishConfiguration/<config_name> --basic --user <user>:<password>

#APIX-G v2.3.0 onwards

curl -X GET "http://<CORE_HOST>:<Facade_Port>/config/reload/<config_name>/<delay_ms>?apikey=internal-config-api-key"  -H "Authorization: Basic YWRtaW46YWRtaW4="

2) If you are using SOAPUI, RestCall with the below information:

#Upto APIX-G v2.2.1
operation: GET
URL: /publishConfiguration/<config_name>
Authorization: Basic YWRtaW46YWRtaW4=
Host: <asg-engine-host>:<facade_port>

#APIX-G v2.3.0 onwards
operation: GET
URL: config/reload/<config_name>
Authorization: Basic YWRtaW46YWRtaW4=
Host: <asg-engine-host>:<facade_port>

Note:
1) facade_port is the port for the Facade HTTP Channel that the asg-engine is listening on.
2) A publish configuration can only be done for a configuration that the asg-engine is running with.
3) The Authorization header has the default ConfigUI credentials: admin:admin