Forum Discussion

Dan_Markhasin_1's avatar
Dan_Markhasin_1
Icon for Nimbostratus rankNimbostratus
Feb 16, 2016

Modifying ASM custom response pages programmatically

Hi,

 

I am looking for a way to modify ASM custom response pages without using the GUI to support automation of building security policies. There doesn't seem to be an API for editing them, and I was unable to find where the files are stored on the box itself.

 

Does anyone know of a way to edit the custom response pages programmatically?

 

Thanks, Dan

 

  • It might have been delivered on a later hotfix for 11.5.3, but the best version to run for REST API support with ASM would be 11.6.x

     

  • Tzoori_Tamam_95's avatar
    Tzoori_Tamam_95
    Historic F5 Account

    Hi, There is a REST API call for the response pages:

     

    https://MGMT_IP_ADDR/mgmt/tm/asm/policies/POLICY_NAME_MD5HASH/response-pages

     

    You can find your policies if you GET https://MGMT_IP_ADDR/mgmt/tm/asm/policies/

     

    And you can find the usage of the Response Pages collection if you GET https://MGMT_IP_ADDR/mgmt/tm/asm/policies/POLICY_NAME_MD5HASH/response-pages/example

     

    Please note that you should be running 11.6.x for the /example URI, and 11.5.2+HF1 for the rest.

     

    Hope this helps, Tzoori

     

  • Hi Tzoori,

     

    We are running 11.5.3 and there's no /asm/policies//response-pages REST API. It seems that it exists only in 11.6 (we have a lab instance running 11.6 and I confirmed it is present there).

     

  • Tzoori_Tamam_95's avatar
    Tzoori_Tamam_95
    Historic F5 Account

    It might have been delivered on a later hotfix for 11.5.3, but the best version to run for REST API support with ASM would be 11.6.x

     

  • Well we are running 1.5.3 HF2 which is the latest one. Anyway thanks for the answer, I'll look into the 11.6 implementation and see if it gives us what we need.

     

    Thanks!