Replication Now REST Service

Use Replication Now REST Service to immediately run the IBM Security Guardium Key Lifecycle Manager replication task, and to force a backup to be sent to the configured clones.

Operation
POST
URL
https://<host>:<port>/SKLM/rest/v1/replicate/now

By default, Guardium Key Lifecycle Manager server listens to the secure port 9443 (HTTPS) for communication. During IBM Security Guardium Key Lifecycle Manager installation, you can modify this default port.

Request

Request Parameters
Parameter Description
host Specify the IP address or hostname of the IBM Security Guardium Key Lifecycle Manager server.
port Specify the port number on which the IBM Security Guardium Key Lifecycle Manager server listens for requests.
Request Headers
Header name Value
Content-Type application/json
Accept application/json
Authorization SKLMAuth userAuthId=<authIdValue>
Accept-Language Any valid locale that is supported by IBM Security Guardium Key Lifecycle Manager. For example, en or de.
Request body

JSON object with the following specification:

JSON property name Description
replicationTargetFromConfig Conditional. If you specify the value yes, the values for the hostname and port are taken from the configuration file. Else, you must specify the value for hostname and port.
hostname Conditional. Specify the host name or IP of replication target. If you specify this parameter, the port parameter is required. The value is ignored if the value of the replicationTargetFromConfig parameter is yes.
port Conditional. Specify the port number to connect to the replication clone system. If you specify this parameter, the hostname parameter is required. The value is ignored if the value of the replicationTargetFromConfig parameter is yes.
Note: If hostname and port are not specified in the request body, then all the clone servers that are configured with the master server are forced for data replication.

You can use Replication Now REST Service to force a replication only from the master server.

Response

Response Headers
Header name Value and description
Status Code
200 OK
The request was successful. The response body contains the requested representation.
400 Bad Request
The authentication information was not provided in the correct format.
401 Unauthorized
The authentication credentials were missing or incorrect.
404 Not Found Error
The processing of the request fails.
500 Internal Server Error
The processing of the request fails because of an unexpected condition on the server.
Content-Type application/json
Content-Language Locale for the response message.
Success response body

JSON array that contains JSON objects with the following specification:

JSON property name Description
code Returns the value that is specified by the message property.
message Returns the status message that indicates whether the replication task is run:
CTGKM2200I
Replication has been successful for the host listed.
CTGKM2201W
Replication already in progress.
CTGKM2202E
Replication has failed for the host listed.
CTGKM2203E
Replication has failed for the host listed with a connection error.
CTGKM2204E
Replication has failed for the host listed with a validation error.
CTGKM2212E
Replication for the specified host timed out.
CTGKM2243E
Replication can only be invoked on the master machine.
CTGKM2222E
No valid replication config file exists.
Error Response Body

JSON object with the following specification.

JSON property name Description
code Returns the application error code.
message Returns a message that describes the error.

Examples

Service request to run the replication task
POST https://localhost:<port>/SKLM/rest/v1/replicate/now
Content-Type: application/json
Accept: application/json
Authorization: SKLMAuth userAuthId=139aeh34567m
{"hostname":"remotehost","port":"2222"}
Success response
Status Code : 200 OK
[
	{ "code":"CTGKM2200I","message":" CTGKM2200I Replication successful 
		for remotehost:2222” }
]
Service request to run the replication task without specifying the port number
POST https://localhost:<port>/SKLM/rest/v1/replicate/now
Content-Type: application/json
Accept: application/json
Authorization: SKLMAuth userAuthId=139aeh34567m
{"hostname":"remotehost"} 
Error response
Status Code : 200 OK
{"code":"CTGKM0631E","message":"CTGKM0631E Missing required 
parameter 
\"  port  \" ."}