Description

This function returns the metadata for a ModSecurity™ vendor rule set.

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/modsec_preview_vendor?api.version=1&url=https%3A%2F%2Fwww.example.com%2Fvendor1rules%2Fmeta_vendor1.yaml




https://hostname.example.com:2087/cpsess##########/xml-api/modsec_preview_vendor?api.version=1&url=https%3A%2F%2Fwww.example.com%2Fvendor1rules%2Fmeta_vendor1.yaml




whmapi1 modsec_preview_vendor url=https%3A%2F%2Fwww.example.com%2Fvendor1rules%2Fmeta_vendor1.yaml



 {
    "data": {
        "vendor_url": "http://www.example.com",
        "vendor_id": "vendor1",
        "installed": 1,
        "cpanel_provided": 0,
        "name": "Vendor1 ModSecurity Core Rule Set",
        "path": "/usr/local/apache/conf/modsec_vendor_configs/vendor1",
        "installed_from": "https://www.example.com/vendor1rules/meta_vendor1.yaml",
        "description": "This is the Vendor1 ModSecurity Core Rule Set.",
        "archive_url": "https://www.example.com/vendor1.zip",
        "dist_md5": "307cb5320441ebd712e5581d12100dc9"
    },
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "modsec_preview_vendor"
    }
}




 <result>
   <data>
      <archive_url>https://www.example.com/vendor1.zip</archive_url>
      <cpanel_provided>0</cpanel_provided>
      <description>This is the Vendor1 ModSecurity Core Rule Set.</description>
      <dist_md5>307cb5320441ebd712e5581d12100dc9</dist_md5>
      <installed>1</installed>
      <installed_from>https://www.example.com/vendor1rules/meta_vendor1.yaml</installed_from>
      <name>Vendor1 ModSecurity Core Rule Set</name>
      <path>/usr/local/apache/conf/modsec_vendor_configs/vendor1</path>
      <vendor_id>vendor1</vendor_id>
      <vendor_url>http://www.example.com</vendor_url>
   </data>
   <metadata>
      <command>modsec_preview_vendor</command>
      <reason>OK</reason>
      <result>1</result>
      <version>1</version>
   </metadata>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample
urlstring

Required

The YAML metadata's URL, which describes the vendor and how to obtain its rules.

A valid URL to the metadata YAML file.

  • The metadata file uses the YAML format.
  • The filename must use the meta_ prefix.
  • The filename must match the vendor_id value for your vendor.
  • The filename must end with the . yaml extension.



https://www.example.com/vendor1rules/meta_vendor1.yaml


Returns

ReturnTypeDescriptionPossible valuesExample
vendor_urlstringThe vendor's website URL.A valid URL.

http://www.example.com

vendor_idstring

The vendor's unique short name.

A valid string.

vendor1

installedBooleanWhether the vendor is installed.
  • 1 — Installed.
  • 0Not installed.
1
cpanel_providedBooleanWhether cPanel, Inc. provided the vendor.
  • 1 — cPanel-provided.
  • 0Not cPanel-provided.
0
namestringThe vendor's nameA valid string.

Vendor1 ModSecurity Core Rule Set

pathstringThe absolute path to the directory that contains the vendor's configuration files.A valid directory path.


/usr/local/apache/conf/modsec_vendor_configs/vendor1


installed_fromstringThe vendor's metadata file URL.A valid URL.


https://www.example.com/vendor1rules/meta_vendor1.yaml


descriptionstringThe vendor's description.A valid string.


This is the Vendor1 ModSecurity Core Rule Set.


archive_urlstring

The URL to the vendor's rule set archive.

A valid URL.


https://www.example.com/vendor1.zip


dist_md5stringThe download's MD5 checksum value.A valid string.


307cb5320441ebd712e5581d12100dc9