Get the most out of your Centmin Mod LEMP stack
Become a Member

Cloudflare API command help

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

  1. pamamolf

    pamamolf Well-Known Member

    3,117
    295
    83
    May 31, 2014
    Ratings:
    +530
    Local Time:
    5:04 AM
    Nginx-1.13.x
    MariaDB 10.1.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

    3,117
    295
    83
    May 31, 2014
    Ratings:
    +530
    Local Time:
    5:04 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Forgot to add my own zone :p

    Now is working :)
     
    • Funny Funny x 1
  3. eva2000

    eva2000 Administrator Staff Member

    36,331
    7,979
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,287
    Local Time:
    12:04 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Might want to show the working code for other readers :)
     
  4. pamamolf

    pamamolf Well-Known Member

    3,117
    295
    83
    May 31, 2014
    Ratings:
    +530
    Local Time:
    5:04 AM
    Nginx-1.13.x
    MariaDB 10.1.x
..