Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

[API] GET_BY_ID

padewitte edited this page Nov 7, 2014 · 1 revision

GET rest/{database}/{collection}/{id}

Get an element by his id

Request parameters

Parameter Type Mandatory Comment

{database}

url

yes

database name

{collection}

url

yes

collection name

{id}

url

yes

id of document

FieldsFilter

header

no

Perform a projection as describe in MongoDB documentation. Useful when to discard or only show some fileds of a document.

Result

Parameter Type Mandatory Comment

body

body

yes

Document JSON Object.

A 204 HTTP response code is send with a empty body when id does not exist

Examples

Succesfuly delete quering by field name
{
  "_id" : "1" ,
  "name" : "Sylvain CHAVANEL"
}