Deploy Multiple VXML Applications

This operation updates, deploys, and modifies existing VXML applications on the CVP VXML Server. This deploy operation includes a ZIP file that contains multiple VXML applications.

Parameters of VXML Application - Deploy

URL

https://<ipaddress>:8111/cvp-config/vxmlapp/deploy

HTTP Method

POST

API Type

Synchronous

Input Format

multipart/form-data

Output Format

JSON/XML

Name: servers

Description: List of server reference URLs.

Required: No.

Values: Contains multiple server elements.

Validations: As given in validation design doc

Notes : This is an optional parameter containing the server reference list that is passed in XML/JSON body. If <servers> tag is empty or the tag is missing, then all VXML servers are considered.

Name : server

Description: Reference of individual VXML server. Use the cvp-config/server API to get the refurl of the VXML servers.

Required: No.

Validations: As given in validation design doc.

Notes : This is an optional parameter containing the server reference which is passed in XML/JSON body. The server list should be in the same format as the output format.

Example Request Payload

This server list body is passed as the first part of multipart/form-data. The ZIP file that contains the applications is attached as the second part.

Key

Sample Value

vxmlDeployconfig

XML

<vxmlapp>
	<servers>
		<server>https://10.64.82.5:8111/
		cvp-config/server/
		14b089ea-2eed-4fbb-b789-2fd838c422ef
	</server>
	</servers>
</vxmlapp>
JSON
{ 
	"vxmlapp":{
		"servers": [
       	"https://10.64.82.5:8111/
		cvp-config/server/
		14b089ea-2eed-4fbb-b789-2fd838c422ef"
   	]
	}
}

vxmlapp

The ZIP file that contains the applications.

Response

HTTP status 200 OK.

The response body also includes VXML application reference URLs in accordance with the accept header (JSON/XML) set in the deploy request.

Note
Use GET API for polling the status of the request.
Code Snippets

Sample JAVA code


/**
 * Deploys all the vxml applications placed in the ZIP file.
 * The request has two parts.
 * 1. vxmlDeployConfig - The configuration file containing server details.
 * 2. vxmlapp - The octet stream of the file attached.
 */

private static void deployVxmlAppRequest() {
	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 Vxml App and convert it into JSON/XML
	VxmlUploadConfig config = populateConfig();
	String requestString = convertToJson(config);
	requestString = convertToXml(config);

	// Construct a MultiPart with two body parts
	byte vxmlContent[] = readFile();
	FormDataMultiPart formPart = new FormDataMultiPart();
	formPart.field("vxmlapp", vxmlContent, MediaType.APPLICATION_OCTET_STREAM_TYPE);
	formPart.field("vxmlDeployConfig", requestString, MediaType.APPLICATION_XML_TYPE);


	// POST the request
	ClientResponse clientResponse = webResource.path("/vxmlapp/deploy").
accept(MediaType.APPLICATION_XML_TYPE).type(MediaType.MULTIPART_FORM_DATA).
post(ClientResponse.class, formPart);
}

Sample Response Header

Response HTTP Status : 200
Response Headers : {Transfer-Encoding=[chunked], 
Date=[Mon, 01 Apr 2013 22:20:50 GMT], 
Content-Type=[application/xml;charset=utf-8], Server=[Apache-Coyote/1.1]}

Sample XML Response


Response Content : <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vxmlappResults>
    <vxmlapp>
      <appname>HelloWorld_10</appname>
      <operation>UPDATE</operation>
      <refURL>https://10.78.26.124:8111/cvp-config/vxmlapp/HelloWorld_10</refURL>
    </vxmlapp>
</vxmlappResults>

Sample JSON Response


{
		"vxmlappResults":{
			"vxmlapp" :[
			 {
				"appname": "HelloWorld_10",
   				"operation": "UPDATE",
   				"refURL": "https://10.78.26.124:8111/cvp-config/vxmlapp/HelloWorld_10"
		    }
		 ]
		}
}

List of Errors for VXML File - Deploy Multiple VXML Applications

Category

HTTP Status

Error Code

Error Description

Authentication

401

authorization.unathorized

Unauthorized request.

authentication.notAuthorized

User is not authorized to access the requested resource.

authentication.noAccess

User is not allowed to access the resource. Check the user roles.

Input Output Formatting

400

processing.jsonSyntaxError

JSON syntax error while processing the request attachment.

processing.xmlSyntaxError

XML Syntax error while processing the request attachment.

Deploy VXML App Validation

400

invalid.noOfAttachments

Incorrect number of attachments received.

invalid.format

URL cannot be decoded using UTF-8.

invalid.inputUploadConfig

Input XML/JSON is empty.

invalid.requestAttachment

Malformed JSON in request attachment.

invalid.attachment

Request attachment IO Error.

invalidInput.invalidCharacter

Invalid characters in the input field.

invalidInput.invalidFieldLength

Invalid length of input field.

invalidInput.invalidMediaServerRef

Invalid Media Server Reference URL.

invalidInput.requiredInputfieldMissing

Required Input Field is missing.

invalidInput.incompatibleServerVersion

Listed Media Server version is incompatible.

invalidInput.duplicateServerRef

There is a duplicate entry in the Server list sent in the request.

invalidInput.invalidDirDepth

The Directory dept in the path field is greater than the maximum allowed.

invalid.inputMediaFile

VXML File size out of valid range.

Generic

400

invalid.header

Missing accept header.

invalid.vxmlApplication

VXML Application archive is invalid.

404

invalid.url

Requested URL not found.

406

invalid.acceptHeader

Invalid accept header, it should contain either XML or JSON.

500

processing.failed

Internal Error.

processing.databaseProcessingFailed

Database processing failed.

processing.fileProcessingFailed

File processing failed.

processing.urlGenerationFailed

Failed to generate URL.

processing.internal

Internal server error.