Skip to content

thecaiogama/mongo_rest_interface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A REST layer for MongoDB based on PHP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages