The select-record command is used to retrieve records from a collection.
JSON Input Data Format

    {
        "id": string,
        "postdata": string
    }

id * | Specifies the ID of the Serverless.
postdata * | Specifies the JSON input data for the record. For example: { "collection": "contacts", "where": "@name == 'John' || @name == 'Johnathan' && @age > 28 && @insured == true" }

* Indicates a mandatory field.

Code Snippets
Here are several code snippets provided for your direct use. Simply select your preferred tool/language by clicking on it.
Successful Response

    {
        "result": "OK",
        "payload": [
            {
                "name": "John",
                "age": 29,
                "insured": true,
                "cid": 0,
                "$created": "2024-08-23T06:25:18.184Z",
                "$updated": "2024-08-23T06:25:18.184Z"
            },
            ...
        ]
    }

Failed Response

    {
        "result": "ERR",
        "message": "Error message ..."
    }