The api/trace Resource

The api/trace resource returns a fragment of the trace file.

For an overview see page eXtremeDB Web Service Resources

To define the size and the location of the trace fragment, the following query arguments can be specified:

The response is a JSON object which always contains the following keys:

With the REST server started (listening on port 8083), the following http request will return the last 100 bytes from the trace file:

 
    GET http://localhost:8083/api/trace?count=100
            
     

The output returned would look like the following:

 
    {
        "trace":
"\/mcobject\/eXtremeDB_8.0\/eXtremeDB\/target\/xsql\/mcoxsql\/mcoxsql.cpp:2916-mcorest started at port 8083\n",
        "from": 5051,
        "to": 5151
    }
 

 

The following http request will return the bytes from offset 5051 to the end of the trace file:

 
    GET http://localhost:8083/api/trace?from=5051
            
     

The output returned would look like the following:

 
    {
        "trace":
"\/mcobject\/eXtremeDB_8.0\/eXtremeDB\/target\/xsql\/mcoxsql\/mcoxsql.cpp:2916-mcorest started at port 8083\n",
        "from": 5051,
        "to": 5151
    }
 

 

The following http request will return the bytes from offset 5051 to offset 5100 of the trace file:

 
    GET http://localhost:8083/api/trace?from=5051&to=5100
            
     

The output returned would look like the following:

 
    {"\/mcobject\/eXtremeDB_8.0\/eXtremeDB\/target\/xsql\/mco",
        ,
        "from": 5051,
        "to": 5100
    }