Discover Centmin Mod today
Register Now

Cloudflare API command help

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

  1. pamamolf

    pamamolf Well-Known Member

    3,080
    293
    83
    May 31, 2014
    Ratings:
    +525
    Local Time:
    5:55 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,080
    293
    83
    May 31, 2014
    Ratings:
    +525
    Local Time:
    5:55 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

    33,771
    7,469
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,482
    Local Time:
    12:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    Might want to show the working code for other readers :)
     
  4. pamamolf

    pamamolf Well-Known Member

    3,080
    293
    83
    May 31, 2014
    Ratings:
    +525
    Local Time:
    5:55 AM
    Nginx-1.13.x
    MariaDB 10.1.x
..