Skip to content

DocumentApi

All URIs are relative to http://localhost

MethodHTTP requestDescription
deleteDELETE /mongodb/collections/{collectionName}/documents/Delete Document from Collection
deleteManyDELETE /mongodb/collections/{collectionName}/documents/many/deleteDelete Many in Collection
findPOST /mongodb/collections/{collectionName}/documentsDocuments in Collection
getDocumentGET /mongodb/collections/{collectionName}/documents/Document from Collection
insertPUT /mongodb/collections/{collectionName}/documentsInsert Document
insertManyPUT /mongodb/collections/{collectionName}/documents/many/insertInsert many Documents
listDocumentsGET /mongodb/collections/{collectionName}/documentsDocuments in Collection
updatePATCH /mongodb/collections/{collectionName}/documents/Update Document in Collection
updateDocumentPartialPATCH /mongodb/collections/{collectionName}/documents/{documentId}/partialUpdate Document Parts in Collection
updateManyPATCH /mongodb/collections/{collectionName}/documents/many/updateUpdate many in Collection

delete

DeleteResponse delete(collectionName, documentId)

Delete Document from Collection

Delete one Document from given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
documentIdStringDocumentId to delete[default to null]

Return type

DeleteResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

deleteMany

DeleteResponse deleteMany(collectionName, request_body)

Delete Many in Collection

Delete many Document in given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
request_bodyMap

Return type

DeleteResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

find

List find(collectionName, MongoFindRequest, rowsPerPage, page)

Documents in Collection

Alternative to GET Route for more complex queries and URL max. Length

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
MongoFindRequestMongoFindRequest
rowsPerPageLongCount elements per page[optional] [default to null]
pageLongRequested page of the ResultSets[optional] [default to null]

Return type

List

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

getDocument

Map getDocument(collectionName, documentId)

Document from Collection

Get one Document from given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
documentIdStringDocumentId to read[default to null]

Return type

Map

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

insert

InsertResponse insert(collectionName, request_body)

Insert Document

Insert one Document in given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
request_bodyMapJSON Representation for your Document.

Return type

InsertResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

insertMany

InsertResponse insertMany(collectionName, request_body)

Insert many Documents

Insert many documents in given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
request_bodyList[optional]

Return type

InsertResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

listDocuments

List listDocuments(collectionName, filter, sort, projection, rowsPerPage, page)

Documents in Collection

Get Documents paginated from given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
filterStringMongoDB Filter Query by Default all filter[optional] [default to null]
sortStringMongoDB sorting[optional] [default to null]
projectionStringMongoDB projection[optional] [default to null]
rowsPerPageLongCount elements per page[optional] [default to null]
pageLongRequested page of the ResultSets[optional] [default to null]

Return type

List

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain

update

UpdateResponse update(collectionName, documentId, request_body)

Update Document in Collection

'Replace' one Document with the new document from Request in Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
documentIdStringDocumentId to update[default to null]
request_bodyMap

Return type

UpdateResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

updateDocumentPartial

UpdateResponse updateDocumentPartial(collectionName, documentId, request_body)

Update Document Parts in Collection

Update the document Parts with the values from the Request

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
documentIdStringDocumentId to update[default to null]
request_bodyMap

Return type

UpdateResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

updateMany

UpdateResponse updateMany(collectionName, UpdateRequest)

Update many in Collection

Update many Document in given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
UpdateRequestUpdateRequest

Return type

UpdateResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

Released under the Apache License 2.0.