Skip to content

Instantly share code, notes, and snippets.

@DarcInc
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DarcInc/9799691 to your computer and use it in GitHub Desktop.
Save DarcInc/9799691 to your computer and use it in GitHub Desktop.
{
"class": ["project", "list"],
"entities": [
{
"class": ["member", "project"],
"rel": ["http://darcinc.net/api/v1/project"]
"properties": {
"name": "Project name",
"description": "A handy description.",
"scheduledCost": 1000000,
"scheduledDuration": 100
},
"entities": [
{
"class": ["owner"],
"rel": "http://darcinc.net/api/v1/owner",
"links": [
{ "rel": ["self"], "href": "http://darcinc.net/api/v1/users/12345" }
]
}
],
"links": {
{ "rel": ["self"], "href": "http://darcinc.net/api/v1/projects/12345" }
}
}
...
],
"actions": [
{
"name": "add-project",
"title": "Add a new project",
"method": "POST",
"href": "http://darcinc.net/api/v1/projects",
"fields": [
{ "name": "name", "type": "text" },
{ "name": "description", "type": "text" },
...
]
},
{
"name": "logout",
"title": "Destroy authorization key",
"method": "DELETE",
"href": "http://darcinc.net/api/vi/users/12345"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment