-
Notifications
You must be signed in to change notification settings - Fork 17
RESTful API bookmark
Guido Krömer edited this page Jan 27, 2014
·
3 revisions
Get all bookmarks.
Example response
{
"status": 200,
"response": [
{
"url": "https:\/\/github.com/Cacodaimon/CacoCloud",
"name": "Cacodaimon/CacoCloud",
"date": 1390523848,
"id": 1
},
{
"url": "http:\/\/www.cacodaemon.de",
"name": "Cacomania",
"date": 1390524132,
"id": 2
},
]
}
Create a bookmark
Example request
{
"url": "http:\/\/www.example.com",
"name": "Example Com"
}
Example response
{
"status": 201,
"response": 3 /*Id of newly added bookmark*/
}
Get a bookmark by its id
Example request api/1/bookmark/1
Example response
{
"status": 200,
"response": {
"url": "https:\/\/github.com/Cacodaimon/CacoCloud",
"name": "Cacodaimon/CacoCloud",
"date": 1390523848,
"id": 1
}
}
Edit a bookmark specified by its id
Example request api/1/bookmark/3
{
"url": "http:\/\/www.example.com\/",
"name": "Example Dot Com"
}
Example response
{
"status": 200,
"response": 3
}
Delete a bookmark specified by its id
Example request api/1/bookmark/3
Example response
{
"status": 200,
"response": 3
}