mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Merge branch 'master' into more-encompassing-number-skips
This commit is contained in:
55
samples/API Blueprint/actions.apib
Normal file
55
samples/API Blueprint/actions.apib
Normal file
@@ -0,0 +1,55 @@
|
||||
FORMAT: 1A
|
||||
|
||||
# Advanced Action API
|
||||
A resource action is – in fact – a state transition. This API example demonstrates an action - state transition - to another resource.
|
||||
|
||||
## API Blueprint
|
||||
+ [Previous: Resource Model](11.%20Resource%20Model.md)
|
||||
+ [This: Raw API Blueprint](https://raw.github.com/apiaryio/api-blueprint/master/examples/11.%20Advanced%20Action.md)
|
||||
|
||||
# Tasks [/tasks/tasks{?status,priority}]
|
||||
|
||||
+ Parameters
|
||||
+ status (string)
|
||||
+ priority (number)
|
||||
|
||||
## List All Tasks [GET]
|
||||
|
||||
+ Response 200 (application/json)
|
||||
|
||||
[
|
||||
{
|
||||
"id": 123,
|
||||
"name": "Exercise in gym",
|
||||
"done": false,
|
||||
"type": "task"
|
||||
},
|
||||
{
|
||||
"id": 124,
|
||||
"name": "Shop for groceries",
|
||||
"done": true,
|
||||
"type": "task"
|
||||
}
|
||||
]
|
||||
|
||||
## Retrieve Task [GET /task/{id}]
|
||||
This is a state transition to another resource
|
||||
|
||||
+ Parameters
|
||||
+ id (string)
|
||||
|
||||
+ Response 200 (application/json)
|
||||
|
||||
{
|
||||
"id": 123,
|
||||
"name": "Go to gym",
|
||||
"done": false,
|
||||
"type": "task"
|
||||
}
|
||||
|
||||
## Delete Task [DELETE /task/{id}]
|
||||
|
||||
+ Parameters
|
||||
+ id (string)
|
||||
|
||||
+ Response 204
|
||||
Reference in New Issue
Block a user