PUT /api/configuration
Description
This method is used during deployment to get the API Server to load a new Deployment Archive, i.e. update its currently loaded configuration. If the API Server fails to load the configuration, it will rollback to its previous configuration.
Note that the Deployment Archive must have been loaded to the host that the API Server is running on prior to this method being invoked. The steps for deployment to a group of API Servers are as follows:-
Step 1: Upload Deployment Archive to all hosts running API Servers in the group, i.e. invoke Deployment API method POST /api/deployment/group/configuration/{groupID}, or, POST /api/deployment/group/configuration/file/{groupID}.
Step 2: Invoke the method described here on each API Server in the group to get the API Server to load the new configuration.
This API method resides in the API Servers, therefore it must be invoked via the Routing API in the Admin Node Manager, e.g. https://localhost:8090/api/router/service/instance-1/api/configuration?archiveId={archiveId}.
Resource URL
https://localhost:8090/api/router/service/{serviceID}/api/configuration?archiveId={archiveId}
Parameters
archiveId | mandatory | The id of the Deployment Archive to load. |
Response Codes
Response Code | Description |
---|---|
200 | The response contains an indication of the success or failure of the load of the configuration, the number of errors, failure reason, and trace data. |
Example Request and Response
PUT https://localhost:8090/api/router/service/instance-1/api/configuration?archiveId=05e8d765-0a64-4977-aa50-c42449c8a7ab
HTTP 1.1 200 OK
{
"result": {
"status": true,
"errorCount": 0,
"traceData": {
"traceRecords": [
{
"dateTime": 1355306889383,
"level": 3,
"message": "Attempting to connect to entity store at federated:file:///C:\\code\\HEAD-GIT\\staging\\images\\apiserver\\groups\\group-2\\conf\\05e8d765-0a64-4977-aa50-c42449c8a7ab\\configs.xml"
},
{
"dateTime": 1355306889734,
"level": 3,
"message": "Starting environmentalization of '0' entities..."
},
{
"dateTime": 1355306889735,
"level": 3,
"message": "Completed environmentalization of '0' entities"
},
{
"dateTime": 1355306890449,
"level": 3,
"message": "unload 46 modules from [local]-0-[local]"
},
{
"dateTime": 1355306890449,
"level": 3,
"message": "close DB handle\n"
},
{
"dateTime": 1355306890450,
"level": 3,
"message": "operations commit thread exiting\n"
},
{
"dateTime": 1355306890451,
"level": 3,
"message": "Flushing Web Service cache"
},
{
"dateTime": 1355306890498,
"level": 3,
"message": "Realtime monitoring enabled"
},
{
"dateTime": 1355306890499,
"level": 3,
"message": "Storing metrics in database disabled"
},
{
"dateTime": 1355306891208,
"level": 3,
"message": "cert store configured"
},
{
"dateTime": 1355306891211,
"level": 3,
"message": "keypairs configured"
},
{
"dateTime": 1355306891219,
"level": 3,
"message": "ClientApplicationRegistry: Initializing store. Type is: AppDetails"
},
{
"dateTime": 1355306891220,
"level": 3,
"message": "Oauth Scope: Initializing store. Type is: ScopeInfo"
},
{
"dateTime": 1355306891222,
"level": 3,
"message": "ApiKeyStore: Initializing store. Type is: ApiKeys"
},
{
"dateTime": 1355306891837,
"level": 3,
"message": "opened database conf/opsdb.d/data.sdb\n"
},
{
"dateTime": 1355306891837,
"level": 3,
"message": "traffic monitor details: data directory: conf/opsdb.d\n"
},
{
"dateTime": 1355306891841,
"level": 3,
"message": "TCP interface"
},
{
"dateTime": 1355306891842,
"level": 3,
"message": "checking invariants for interface *:8081"
},
{
"dateTime": 1355306891842,
"level": 3,
"message": "interface is disabled"
},
{
"dateTime": 1355306891912,
"level": 3,
"message": "conf/opsdb.d currently using 0 bytes in 0 live files (0 orphaned)\n"
},
{
"dateTime": 1355306892058,
"level": 3,
"message": "TCP interface"
},
{
"dateTime": 1355306892058,
"level": 3,
"message": "checking invariants for interface *:8080"
},
{
"dateTime": 1355306892075,
"level": 3,
"message": "serving content from C:\\code\\HEAD-GIT\\staging\\images\\apiserver/webapps/apiadmin/lib/ at URI prefix /lib\n"
},
{
"dateTime": 1355306892078,
"level": 3,
"message": "serving content from C:\\code\\HEAD-GIT\\staging\\images\\apiserver/webapps/apiadmin/ at URI prefix /\n"
},
{
"dateTime": 1355306892469,
"level": 3,
"message": "SSL/TCP interface"
},
{
"dateTime": 1355306892470,
"level": 3,
"message": "checking invariants for interface *:8089"
},
{
"dateTime": 1355306892470,
"level": 3,
"message": "interface is disabled"
},
{
"dateTime": 1355306892470,
"level": 3,
"message": "no EDH key exchange"
},
{
"dateTime": 1355306892472,
"level": 3,
"message": "SSL session cache size for this interface: 32"
},
{
"dateTime": 1355306892472,
"level": 3,
"message": "interface ciphers: DEFAULT"
},
{
"dateTime": 1355306892473,
"level": 3,
"message": "SSL context certificate { subject: /CN=Change this for production }\n"
},
{
"dateTime": 1355306892532,
"level": 3,
"message": "Successfully loaded configuration 'federated:file:///C:\\code\\HEAD-GIT\\staging\\images\\apiserver\\groups\\group-2\\conf\\05e8d765-0a64-4977-aa50-c42449c8a7ab\\configs.xml'"
}
]
},
"archiveId": "05e8d765-0a64-4977-aa50-c42449c8a7ab"
}
}