Created
August 6, 2015 19:43
-
-
Save saltednut/0341b38d36c6781ae3f5 to your computer and use it in GitHub Desktop.
D7 Restws v D8 Rest - node status change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drupal 8 (Enabled modules: rest, hal, basic_auth, serialization) | |
curl -vX PATCH --user admin:pass http://site.dd/node/1 --header "Content-Type: application/hal+json" -d'{"_links":{"type":{"href":"http://site.dd/rest/type/node/article"}}, "status":[{"value":"0"}]}’ | |
# Drupal 7 (Enabled modules: restws, restws_basic_auth) | |
drush vset restws_basic_auth_user_regex '/.*/' | |
curl -vX PUT --user admin:pass http://site.dd/node/1 --header "Content-Type: application/json" -d'{"status":"0"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment