Skip to content

FileApi

All URIs are relative to http://localhost

MethodHTTP requestDescription
deleteFileDELETE /mongodb/buckets/{bucketName}/files/Delete File from Bucket
findFilesPOST /mongodb/buckets/{bucketName}/filesFiles in Bucket
getFileGET /mongodb/buckets/{bucketName}/files/{fileId}/fileFile from Bucket
getFileInformationGET /mongodb/buckets/{bucketName}/files/FileInformation from Bucket
insertFilePUT /mongodb/buckets/{bucketName}/filesInsert File
listFilesGET /mongodb/buckets/{bucketName}/filesFiles in Bucket
updateFileInformationPATCH /mongodb/buckets/{bucketName}/files/Update FileInformation in Bucket

deleteFile

DeleteResponse deleteFile(bucketName, fileId)

Delete File from Bucket

Delete one File from given Bucket

Parameters

NameTypeDescriptionNotes
bucketNameStringThe name of your MongoDb Collection[default to null]
fileIdStringfileId to delete[default to null]

Return type

DeleteResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

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

findFiles

List findFiles(bucketName, MongoFindRequest, rowsPerPage, page)

Files in Bucket

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

Parameters

NameTypeDescriptionNotes
bucketNameStringThe 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

getFile

File getFile(bucketName, fileId)

File from Bucket

Get File from given Bucket

Parameters

NameTypeDescriptionNotes
bucketNameStringThe name of your MongoDb Collection[default to null]
fileIdStringFileId to read[default to null]

Return type

File

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream, application/json

getFileInformation

FileInformation getFileInformation(bucketName, fileId)

FileInformation from Bucket

Get one FileInformation from given Bucket

Parameters

NameTypeDescriptionNotes
bucketNameStringThe name of your MongoDb Collection[default to null]
fileIdStringfileId to read[default to null]

Return type

FileInformation

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

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

insertFile

InsertResponse insertFile(bucketName, file, metaData, fileName)

Insert File

Insert one File in given Bucket

Parameters

NameTypeDescriptionNotes
bucketNameStringThe name of your MongoDb Collection[default to null]
fileFile[default to null]
metaDataString[default to null]
fileNameStringoverride filename of uploaded file[optional] [default to null]

Return type

InsertResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

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

listFiles

List listFiles(bucketName, filter, sort, projection, rowsPerPage, page)

Files in Bucket

Get Files paginated from given Bucket

Parameters

NameTypeDescriptionNotes
bucketNameStringThe 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

updateFileInformation

UpdateResponse updateFileInformation(bucketName, fileId, UpdateFileInformationRequest)

Update FileInformation in Bucket

Replace MetaData and potential update FileName

Parameters

NameTypeDescriptionNotes
bucketNameStringThe name of your MongoDb Collection[default to null]
fileIdStringfileId to update[default to null]
UpdateFileInformationRequestUpdateFileInformationRequest

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.