Start Sync-Up

Parameters of Start Sync-Up

URL

https://<oampipaddress>:8111/cvp-config/command/synchronize

HTTP Method

POST

API Type

Synchronous

Input/Output Format

JSON, XML

Parameters

Name: servers

Description: List of servers reference URLs.

Required: No.

Values: Contains multiple <server> elements.

Validations:

Notes: Optional parameter containing the server ref list, passed in XML/JSON body.

Name: server

Description: Reference of individual CVP Media/VXML/VXML_STANDALONE Server.

Required: No.

Values : As depicted in Server section.

Validations:

Name: sincetime

Description: sincetime set to 0 or above, the start counting from time = mentioned value.

Required: No.

Values: 0 and above.

Example Request Payload

This server list body is passed as the first part of json/xml as raw.

JSON

<synchronize>
	<servers>
		<server>ref-url of server</server>
		<sincetime>0</sincetime>
	</servers>
</synchronize>
            
JSON

{
	"synchronize": {
		"servers": {
			"server": {
				"refURL": "ref-url of server",
				"sincetime": "0"
			}
		}
	}
}
Code Snippets

Sample JAVA code


/**
 * Starts the sync-ups for all the given servers.
 * Server reference URL's can be sent as a collection.
 */
private static void startSyncUp() {
	Client client = getSSLClient();
	ClientFilter authFilter = new HTTPBasicAuthFilter
("wsmadmin", "<password set during installation>");	
client.addFilter(authFilter);

	WebResource webResource = null;
	webResource = client.resource("https://<OAMP IP Address>:8111/
cvp-config");

	// Populate config for Metadata Syncup and convert it into JSON/XML
	SynchronizeServerList configList = populateMetadataConfig();
	String requestString = convertToJson(configList);
	requestString = convertToXml(configList);

  // POST the request
 ClientResponse clientResponse = webResource.path
("/command/synchronize").accept(MediaType.APPLICATION_XML_TYPE).
type(MediaType.APPLICATION_XML_TYPE).post(ClientResponse.class, 
requestString);
}

Sample Response Header

Response HTTP Status : 202