Last active
August 29, 2015 14:06
-
-
Save kevinswiber/4a9258cfb9c80558c7ee to your computer and use it in GitHub Desktop.
Siren example.
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
| { | |
| "class": ["customer", "vip"], | |
| "properties": { | |
| "name": "Howard Duck", | |
| "title": "Mr." | |
| }, | |
| "entities": [ | |
| { | |
| "rel": ["http://example.com/rels/recent-orders"], | |
| "class": ["order-list"], | |
| "properties": { | |
| "count": 5 | |
| }, | |
| "links": [ | |
| { | |
| "rel": ["self"], | |
| "href": "http://api.example.com/orders/recent?customer=1234" | |
| } | |
| ] | |
| } | |
| ], | |
| "actions": [ | |
| { | |
| "name": "deactivate", | |
| "method": "POST", | |
| "href": "http://api.example.com/customer-activations", | |
| "fields": [ | |
| { "name": "action", "type": "hidden", "value": "deactivate" }, | |
| { "name": "id", "type": "hidden", "value": "1234" } | |
| ] | |
| } | |
| ], | |
| "links": [ | |
| { | |
| "rel": ["self"], | |
| "href": "http://api.example.com/customers/1234" | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment