Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.76 KB

README.md

File metadata and controls

51 lines (39 loc) · 1.76 KB

A REST interface between PHP and MongoDB

This layer was create with the intention of retrieving and including data, it does not have the hability do create databases or collections.

Required steps to make it work:

- configure user, password and host on /Mongo/MongoConf.php

AVALIABLE ACTIONS

GET /

Response: HTTP/1.0 400
Message: Provide me a DB and a Collection

GET /db

Response: HTTP/1.0 400
Message: Provide me a Collection

GET /db/collection

List all the Object of that Collection Response: HTTP/1.0 200
Structure: [ {object} ]

POST /db/collection

Create an Object Request: Object information
Response: HTTP/1.0 200
Structure: [ {object} ]

GET /db/collection/id

List one item based on the MongoID informed Response: HTTP/1.0 200
Structure: {object}

PUT /db/collection/id

Replace data completely based on the Mongo ID informed Request: MongoID and Object information
Response: HTTP/1.0 200
Structure: {object}

PATH /db/collection/id

Replace part of the Object based on the information sent Request: MongoID and Object information
Response: HTTP/1.0 200
Structure: {object}

DELETE /db/collection/id

Delete one Object based on the Mongo ID informed Request: MongoID
Response: HTTP/1.0 200