The jobqueueCreateQueue Web API Method

Add a new queue to Job Queue queues list, and get back the new created ID.

Version: 1.10

Required Permissions: Full

HTTP method: POST

Supported by Editions: Zend Server

Request Parameters:  

Parameter

 Type

Required

Description

name

String

Yes

The name of the new queue (unique). 2 - 32 characters.

status

Integer

No

Default 1 (JobQueueInterface::QUEUE_ACTIVE). Can be 1 (active) or 2 (suspended).

priority

Integer

No

Default 2. Value between 0 and 4. (4 is highest priority).

max_http_jobs

Integer

No

Default 5. Max concurrent jobs in this queue.

max_wait_time

Integer

No

Default 5. Max waiting time for a job inside a queue. Used to avoid starvation.

connection_timeout

Integer

No

Default 30. Number of seconds the daemon tries to establish a connection with a back-end server

http_job_timeout

Integer

No

Default 120. Number of seconds a URL-based job must be completed in

http_job_retry_count

Integer

No

Default 10. Number of retries for failed HTTP jobs

http_job_retry_timeout

Integer

No

Default 1. The number of seconds between retries for failed HTTP jobs

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

Possible Action Specific Error Codes: None.

Example

Usage Example

Request

POST /ZendServer/Api/jobqueueCreateQueue

name=qwerty, priority=1

Response

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

<requestData>

<apiKeyName>

<![CDATA[admin]]>

</apiKeyName>

<method>jobqueueCreateQueue</method>

</requestData>

<responseData>

<result>success</result>

<id>98</id>

</responseData>

</zendServerAPIResponse>