Page tree
Skip to end of metadata
Go to start of metadata

To view the list of HTTP caching rules for a CDN resource, use the following request:

GET /cdn_resources/:cdn_resource_id/http_caching_rules.xml
GET /cdn_resources/:cdn_resource_id/http_caching_rules.json

XML Request example:

curl -i -X GET -u user:userpass -H 'Accept: application/xml' --url "http://onapp.test/cdn_resources/:cdn_resource_id/http_caching_rules.xml"

JSON Request example:

curl -i -X GET -u user:userpass -H 'Accept: application/json' --url "http://onapp.test/cdn_resources/:cdn_resource_id/http_caching_rules.json"

XML Output example

 <?xml version="1.0" encoding="UTF-8"?>
<objects type="array">
  <object>
    <name>2</name>
    <conditions type="array">
      <condition>
        <subject>url</subject>
        <predicate>ends with</predicate>
        <value>gif</value>
      </condition>
    </conditions>
    <actions type="array">
      <action>
        <act>forbid client</act>
      </action>
    </actions>
  </object>
  <object>...</object>
</objects>

Where:

name - the name of the rule

conditions - the array of parameters of the conditions associated with the rule

subject - the subject of the condition. For the list of subjects you can set for a rule refer to The List of Subjects.

predicate - the predicate of the condition. For the list of predicates you can set for a rule refer to The List of Predicates.

value - the value against which the subject is compared.

act - the action associated with the rule. For the list of actions you can set for a rule refer to The list of Actions.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels