Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.

Zone pause/unpause is making wrong request #17

Closed
Lusitaniae opened this issue Apr 16, 2016 · 2 comments
Closed

Zone pause/unpause is making wrong request #17

Lusitaniae opened this issue Apr 16, 2016 · 2 comments

Comments

@Lusitaniae
Copy link

Lusitaniae commented Apr 16, 2016

https://api.cloudflare.com/#zone-edit-zone-properties

It should be a patch request and send paused as a boolean.

curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353"
--data '{"paused":true}'

@jamesryanbell
Copy link
Owner

Hi

It looks like the Edit Zone Properties method was updated by CloudFlare, they have combined pausing, editing vanity name servers and changing plans together. As the endpoint only allows you to do one at a time I have created individual methods for each one.

Long story short! this should be sorted now in the latest release.

Thanks,
James

@Lusitaniae
Copy link
Author

Lusitaniae commented Apr 18, 2016

I made a pull request regarding this, it needed a few small extra things!

 ["method"]=>
  string(5) "patch"
  ["result"]=>
  string(107) "{"success":false,"errors":[{"code":1022,"message":"Zone is already unpaused"}],"messages":[],"result":null}"
  ["information"]=>
  array(26) {
    ["url"]=>
    string(75) "https://api.cloudflare.com/client/v4/zones/4545456zoneid454545545454545454"

Thanks,
Pedro

jamesryanbell added a commit that referenced this issue Apr 23, 2016
Issue #17: fix edit zone properties with updated API method
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants