Rest APIs : REST API : Observer REST : Extracting GigaStor data : How to extract data to a temporary file
How to extract data to a temporary file
By default, files are extracted to a temporary location in the Observer Web Server and kept for 24 hours.
Prerequisite(s):  
Knowledge of your base URI
 
A temporary file gives you access to the data you need for reports without you needing to worry about trace files filling your hard drive. If you need to use the same data in the future and the temporary has been deleted, simply rerun the GET request.
1. To create a session, send a POST command to /obs/api/v1/session using the following request body object .
 
Figure 6: Select All
{
"username": "admin",
"password": ""
}
 
2. Send a POST command to /obs/api/v1/gs/traces using the following request body object.
 
Figure 7: Select All
{
"instanceName": "Instance 1",
"traceFormat": "pcap",
"traceFileName": "MyFileName",
"saveTo": "tempStorage",
"extractionTimeRange": {
"timeStart": "2016-01-27T00:00:00.000Z",
"timeEnd": "2016-01-28T00:00:00.000Z"
},
"filter": "ip 10.1.20.50[tcp/80]"
}
 
On success, a 202 Accepted response is returned along with a jobs object in the response body. Inside of the job, the location field indicates where the final location of the trace file will be.
 
Traces extracted to temporary storage expire and are deleted after 24 hours along with their corresponding jobs objects.