WebAPI Reference Guide > Available API Methods > Page Cache Methods > The pagecacheSaveApplicationRule Method

The pagecacheSaveApplicationRule Method

Creates or updates a page cache rule for a specific application.

Version: 1.3

Required Permissions: Full

HTTP method: POST

Supported by Editions: Zend Server

Request Parameters:  

Parameter

 Type

Required

Description

ruleId

integer

No

Required when updating an existing rule

urlPath

string

Yes

Relative to Base URL

matchType

string

Yes

'exactMatch', 'regexMatch' or 'regexlMatch'

lifetime

integer

Yes

 

compress

boolean

No

default TRUE

name

string

No

Non empty string

applicationId

interger

Yes

 

conditionsType

array

No

'and' or 'or'

conditions

array

No

 

splitBy

array

No

 

Expected Response Code: 200 OK. For more information see Response Format.

Response Format: The rule information.

Possible Action Specific Error Codes:

HTTP Code

Error Code

Description

500

internalServerError

Creation of rule failed due to an internal problem

Example

Usage Example

Request

POST /ZendServer/Api/pagecacheSaveApplicationRule

urlHost=myHost&urlPath=index.php&lifetime=360&applicationId=11

Response

<?xml version="1.0" encoding="UTF-8"?>

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

<requestData>

<apiKeyName><![CDATA[Admin]]></apiKeyName>

<method>pagecacheSaveRule</method>

</requestData>

<responseData>

<ruleInfo>

<rule>

<ruleId>1</ruleId>

<urlScheme>http</urlScheme>

<urlHost>myHost</urlHost>

<urlPath>myApp/index.php</urlPath>

<type>exact_match</type>

<application>myApp</application>

<applicationId>11</applicationId>

<name></name>

</rule>

<ruleData>

<ruleId>1</ruleId>

<conditionsType>and</conditionsType>

<conditions></conditions>

<splitby></splitby>

<lifetime>360</lifetime>

<compress>yes</compress>

</ruleData>

</ruleInfo>

</responseData>

</zendServerAPIResponse>

 

 

Related Links

Related Links:

Available API Methods

 

 

 

© 1999-2013 Zend Technologies, Ltd. All rights reserved.