Learn about Centmin Mod LEMP Stack today
Register Now

Cloudflare API command help

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

  1. pamamolf

    pamamolf Well-Known Member

    2,767
    245
    63
    May 31, 2014
    Ratings:
    +436
    Local Time:
    7:58 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

    2,767
    245
    63
    May 31, 2014
    Ratings:
    +436
    Local Time:
    7:58 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

    30,577
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,275
    Local Time:
    3:58 PM
    Nginx 1.13.x
    MariaDB 5.5
    Might want to show the working code for other readers :)
     
  4. pamamolf

    pamamolf Well-Known Member

    2,767
    245
    63
    May 31, 2014
    Ratings:
    +436
    Local Time:
    7:58 AM
    Nginx-1.13.x
    MariaDB 10.1.x