Documentation

FairCom Database Engine REST API

Previous Topic

Next Topic

Querying Records

Inside the test folder create a new file called query_records.txt. See the Query section for more about Query and Find.

Insert this text into the new file:

{

"find": {

"country": {

"operator": "=",

"value": "USA"

}

}

}

Now execute the following command (in a single line):

curl -u admin:ADMIN -d @query_records.txt https://localhost:8443/ctree/api/v1/query/ctreeSQL/books/c_index?top=100

This should result in:

{

"_records": [{

"_id": 3,

"id": null,

"name": "Adventures of Huckleberry Finn",

"author": "Mark Twain",

"country": "USA",

"language": "English",

"published": 1884,

"pages": 366

}, {

"_id": 4,

"id": null,

"name": "To Kill a Mockingbird",

"author": "Harper Lee",

"country": "USA",

"language": "English",

"published": 1960,

"pages": 281

}, {

"_id": 6,

"id": null,

"name": "The Great Gatsby",

"author": "F. Scott Fitzgerald",

"country": "USA",

"language": "English",

"published": 1925,

"pages": 180

}, {

"_id": 7,

"id": null,

"name": "Moby Dick",

"author": "Herman Melville",

"country": "USA",

"language": "English",

"published": 1851,

"pages": 822

}]

}

See also:

  • The Query section in the c-treeACE IoT Database Developer's Guide

TOCIndex