Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
api document
michael-lefebvre edited this page Apr 7, 2013
·
4 revisions
<doc-ref> is the _ref field in MongoDB.
GET - /api/<app-slug>/document/<collection-namespace>
return:
{
"total": 9,
"skip": 0,
"limit": 999999,
"results": [
{
"_ref": "4fd44bfdd3f3f",
"name": "The Road Runner",
"name-given": "Accelleratii incredibus",
"voiced": [
"Paul Julian",
"Mel Blanc",
"Dee Bradley Baker",
"Frank Welker"
]
},
{
"_ref": "5r4cd77bfdd2e2e",
"name": "Wile E. Coyote",
"name-given": "Eatibus anythingus",
"voiced": [
"Silent",
"Mel Blanc",
"Joe Alaskey",
"Dee Bradley Baker",
"Maurice LaMarche"
]
}
]
}
rint the revision numberlstring the locale code, ex: fr_FRqjson MongoDb query
MongoDb query is a JSON formated string, ex:
?q={"select": ["title"], "where":{"title":"hello"}}
Allowed parameters are:
selectarraywhereobjectsortobjectlimitintegerskipinteger
CRUD - /api/<app-slug>/document/<collection-namespace>/<doc-ref>
return:
{
"_ref": "5r4cd77bfdd2e2e",
"name": "Wile E. Coyote",
"name-given": "Eatibus anythingus",
"voiced": [
"Silent",
"Mel Blanc",
"Joe Alaskey",
"Dee Bradley Baker",
"Maurice LaMarche"
]
}
You can get a specific revision with the r argument
GET - /api/<app-namespace>/document/<collection-slug>/<doc-ref>?r=int