POST /api/deployment/group/configuration/file/{groupID}
Description
Called by the client application to upload a new configuration file (Deployment Archive) to all hosts that run API Servers in the group that this configuration is destined for. This method must be called before the client can invoke the Configuration API in the API Servers (via Node Manager) to load the new configuration.
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 the method described here.
Step 2: Invoke the Configuration API method PUT /api/configuration?archiveId={archiveId} on each API Server in the group via the Routing API in the Node Manager to get the API Server to load the new configuration.
This method offers the same functionality as POST /api/deployment/group/configuration/{groupID}.
With this method, the Deployment Archive is sent as multipart/form-data
instead of application/json
.
This is suited to web-based applications.
Resource URL
https://localhost:8090/api/deployment/group/configuration/file/{groupID}
Parameters
groupID | mandatory | The id of the group that this configuration is destined for. |
file | mandatory | The Deployment Archive file containing the new configuration. This is passed in the request body as multipart/form-data . |
Response Codes
Response Code | Description |
---|---|
200 | Success. Indicates a successful upload of the configuration to all required hosts. The response body contains the id of the Deployment Archive as this will not be visible to the client application. |
500 | The response contains an error e.g. a failure occurred writing to disk, or calling a remote Node Manager. |
Example Request and Response
POST https://localhost:8090/api/deployment/group/configuration/file/group-2
Content-Type: multipart/form-data
--Boundary_1_16329281_1355225008368
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="config.fed"; modification-date="Mon, 10 Dec 2012 09:40:15 GMT"; size=222969; name="file"
<binary data>
--Boundary_1_16329281_1355225008368--
HTTP 1.1 200 OK
{
"result": "87f80129-f06e-4a3f-8931-38eeb12bf217"
}