The jobqueueImportQueues Web API Method

Import action for queues. Upload the backup file using this Web API.

Version: 1.10

Required Permissions: Full

HTTP method: POST

EncType: multipart/form-data

Supported by Editions: Zend Server

Request Parameters:  

Parameter

 Type

Required

Description

delete_current

Integer

Yes

1 or 0. 1 is to delete the current queues before import.

file

FILE

Yes

File multipart data. Must be provided as form multipart file upload.

Expected Response Code: 200 OK - Returned for a successful request.

Possible Action Specific Error Codes: None.

Example

Usage Example

PHP Client Example

$postfields = array('file' => '@'.realpath($filePath), 'delete_current' => '0');

$ch = curl_init();

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 0);

curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_HEADER, true);

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // standard WebAPI headers

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);

curl_close($ch);

Request

POST /ZendServer/Api/jobqueueImportQueues

delete_current=1

Response

<zendServerAPIResponse xmlns="http://www.zend.com/server/api/1.10">

<requestData>

<apiKeyName>

<![CDATA[admin]]>

</apiKeyName>

<method>jobqueueImportQueues</method>

</requestData>

<responseData>

<result>success</result>

</responseData>

</zendServerAPIResponse>