For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Dan_Markhasin_1's avatar
Dan_Markhasin_1
Icon for Nimbostratus rankNimbostratus
Jun 07, 2015

Associating XML validation files with RESTful API

Hi again,

 

I tried to follow the steps in the user guide to upload an XML schema and associate it with an XML profile, and was able to successfully upload the schema files, but I am having problems associating them with the XML Profile. Specifically, I am getting the following error:

 

"code": 400,
    "message": "Could not parse/validate the Associate Xml Validation Files Task.  Unknown field 'xmlValidationFileReferences'",

This is the POST request I am sending to

 

   {
"primaryXmlValidationFileReference": {
"link":
"https://localhost/mgmt/tm/asm/policies/5H6ZguLK3BsaliiKcGynRg/xml-validation-files/hsbng7o3s4EcfjbcIxSusA"
},
"xmlProfileReference": {
"link":
"https://localhost/mgmt/tm/asm/policies/5H6ZguLK3BsaliiKcGynRg/xml-profile/Xxxm4pIvMK8k0En0YHYkOQ"
},
 "xmlValidationFileReferences": [
{"link":
"https://localhost/mgmt/tm/asm/policies/5H6ZguLK3BsaliiKcGynRg/xml-validation-files/ca3uNeQm-BuP_la3FygnYA"}
],
"followSchemaLinks": true
}

Any idea what is the problem? I am running BIG-IP 11.6.0 Build 0.0.401 Final

 

1 Reply

  • In case someone runs into the same issue, here is the correct method that I received from F5 Support.

    {
        "primaryXmlValidationFileReference": {
            "link": "https://localhost/mgmt/tm/asm/policies/hFFwyy98lK9hFoBHKgke5A/xml-validation-files/xekk_k838ORZDXis01Vavw"
        },
        "xmlProfileReference": {
            "link": "https://localhost/mgmt/tm/asm/policies/hFFwyy98lK9hFoBHKgke5A/xml-profiles/-XV1HuV32kFcbamdZrC_WQ"
        },
        "xmlValidationFiles": [{
            "importUrl": "",
            "xmlValidationFileReference": {
                "link": "https://localhost/mgmt/tm/asm/policies/hFFwyy98lK9hFoBHKgke5A/xml-validation-files/2uRuW9432F5iQzeNMr9Fzg"
            }
        },
        {
            "importUrl": "",
            "xmlValidationFileReference": {
                "link": "https://localhost/mgmt/tm/asm/policies/hFFwyy98lK9hFoBHKgke5A/xml-validation-files/2uRuW9432F5iQzeNMr9Fzg"
            }
        }
    
        ]
    }