Want to subscribe to topics you're interested in?
Become a Member

Cloudflare API command help

Discussion in 'System Administration' started by pamamolf, Sep 21, 2017.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,983
    412
    83
    May 31, 2014
    Ratings:
    +799
    Local Time:
    11:12 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hello :)


    I try to test a Cloudflare API command from here:

    Code:
    https://api.cloudflare.com/#zone-settings-change-security-level-setting
    using this:

    Code:
    curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/security_level" \
         -H "X-Auth-Email: mycloudflareemailhere" \
         -H "X-Auth-Key: domainglobalapikeyhere" \
         -H "Content-Type: application/json" \
         --data '{"value":"high"}'
    But it doesn't work and i am getting an html output on ssh:

    The page you are looking for cannot be found.

    Any help please?

    Thank you
     
  2. pamamolf

    pamamolf Premium Member Premium Member

    3,983
    412
    83
    May 31, 2014
    Ratings:
    +799
    Local Time:
    11:12 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Forgot to add my own zone :p

    Now is working :)
     
  3. eva2000

    eva2000 Administrator Staff Member

    48,487
    11,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,303
    Local Time:
    6:12 AM
    Nginx 1.21.x
    MariaDB 10.x
    Might want to show the working code for other readers :)
     
  4. pamamolf

    pamamolf Premium Member Premium Member

    3,983
    412
    83
    May 31, 2014
    Ratings:
    +799
    Local Time:
    11:12 PM
    Nginx-1.17.x
    MariaDB 10.3.x