Last active
December 21, 2015 07:48
-
-
Save semmons99/6273370 to your computer and use it in GitHub Desktop.
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
{ | |
first_name: "Shane", | |
last_name: "Emmons", | |
_links: { | |
"self": {"href": "/users/1"}, | |
"disable": {"href": "/users/1/disable"} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm working on a new Hypermedia API. We've chosen hal+json for our representation and have our state machine sketched out for our initial interactions. What we're having trouble with is representing our transitions as links. In the example JSON below I want to have a link that allows a user to be disabled.
I have two questions.
As I write this I'm thinking perhaps the default for a client should be to try a GET on any link and in the case of disable be returned some type of templated object that is the used to POST and disable a user?