Skip to main content

Get Single Document

GET 

/collections/:collectionName/documents/:docId

Query a single document by its _id. Supports field projection and in-transaction queries. Returns 404 if the document does not exist.

Request

Path Parameters

    collectionName stringrequired

    Collection name

    docId stringrequired

    Document ID (supports both ObjectId strings and plain strings)

Query Parameters

    projection string

    Field projection (JSON string), e.g. {"name":1,"email":1}

    transactionId string

    Transaction ID

Responses

Query successful

Schema

    object

Loading...