query_document_by_object_id {One4All} | R Documentation |
This function queries a mongodb database using its API to retrieve a document by its ObjectID. Use the MongoDB Atlas Data API to create an API key.
query_document_by_object_id(apiKey, collection, database, dataSource, objectId)
apiKey |
The API key for accessing the MongoDB API. |
collection |
The name of the collection in the MongoDB database. |
database |
The name of the MongoDB database. |
dataSource |
The data source in MongoDB. |
objectId |
The object ID of the document to query. |
The queried document.
## Not run:
apiKey <- 'your_mongodb_api_key'
collection <- 'your_mongodb_collection'
database <- 'your_database'
dataSource <- 'your_dataSource'
objectId <- 'example_object_id'
query_document_by_object_id(apiKey, collection, database, dataSource, objectId)
## End(Not run)