Skip to content

Instantly share code, notes, and snippets.

@ssfrr
Last active August 29, 2015 14:05
Show Gist options
  • Save ssfrr/c4aa4cba3c4b326bb015 to your computer and use it in GitHub Desktop.
Save ssfrr/c4aa4cba3c4b326bb015 to your computer and use it in GitHub Desktop.
Simplified HAL
{
"self": {"href":"/orders"},
"rel-templates":[
{
"name":"ea",
"href":"http://example.com/docs/rels/{rel}",
"templated":true
}
],
"next":{"href": "/orders?page=2"},
"ea:find":{
"href":"/orders{?id}",
"templated":true
},
"ea:admin":[
{
"href":"/admins/2",
"title":"Fred"
},
{
"href":"/admins/5",
"title":"Kate"
}
],
"currentlyProcessing":14,
"shippedToday":20,
"ea:order":[
{
"self":{"href":"/orders/123"},
"ea:basket":{"href":"/baskets/97212"},
"ea:customer":{"href":"/customers/12368"},
"total":30.00,
"currency":"USD",
"status":"shipped"
},
{
"self":{"href":"/orders/124"},
"ea:basket":{"href":"/baskets/97213"},
"ea:customer":{"href":"/customers/12369"},
"total":20.00,
"currency":"USD",
"status":"processing"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment