Welcome to Centmin Mod Community
Become a Member

Cloudflare API command help

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

  1. pamamolf

    pamamolf Well-Known Member

    4,125
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    8:05 AM
    Nginx-1.29.x
    MariaDB 10.6.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 Well-Known Member

    4,125
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    8:05 AM
    Nginx-1.29.x
    MariaDB 10.6.x
    Forgot to add my own zone :p

    Now is working :)
     
  3. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:05 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Might want to show the working code for other readers :)
     
  4. pamamolf

    pamamolf Well-Known Member

    4,125
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    8:05 AM
    Nginx-1.29.x
    MariaDB 10.6.x