Exporting cloud (API) logs - examples
You can pull logs in csv and json formats.
Pulling logs in csv format
Begin a new session for pulling logs in csv format.
Request
curl -u bob@acme.com "https://portal.bitglass.com/api/bitglassapi/logs/v1/?type=cloudsummary&responseformat=csv&startdate=2015-10-10T00:00:00Z&cv=1.1.5"
GET /api/bitglassapi/logs/v1/?type=cloudsummary&responseformat=csv&startdate=2015-10-10T00:00:00Z
Host: portal.bitglass.com
Authentication: Basic dXNldm2hbWU6cGFzc3dvcmQ=
Response
{
"status": "Success",
"nextpagetoken": "eyJsb2dfaWQiOiAiMTlqbUh4cWlSX0VrZ1ZNcDRrbjFsNUNJN0xSOVg1RzBoVEpEQXJ4Z2FxU00iLCAiZGF0ZXRpbWUiOiAiMjAxNS0wOS0yOVQwMjowMzozNVoifQ==",
"response": {
"dataformat": "csv",
"dataencoding": "utf-8",
"data": ["syslogheader, filename, time, size, owner, application, status, action, folder, fileid, patterns, sharedwith",
"<110>1 2015-10-01T00:25:19Z api.bitglass.com NILVALUE NILVALUE cloud",\"State-Health-Bitglass.docx\",\"2015-10-01T00:25:19Z\",\"2217241\",\"user@bitglass.com\",\"Google Drive\",\"private,scanned\",\"\",\"/My Drive\",\"0BzrM-rhCHvkacHFNXBfZ3NfbnVhZm5Ebk5VVGNoZ0ZZ\",\"\",\"\",\"\"", ....]
}
Pulling logs in json format
Begin a new session for pulling logs in json format.
Request
curl -u bob@acme.com "https://portal.bitglass.com/api/bitglassapi/logs/v1/?type=cloudsummary&responseformat=json&nextpagetoken=eyJsb2dfaWQiOiAiMTlqbUh4cWlSX0VrZ1ZNcDRrbjFsNUNJN0xSOVg1RzBoVEpEQXJ4Z2FxU00iLCAiZGF0ZXRpbWUiOiAiMjAxNS0wOS0yOVQwMjowMzozNVoifQ==&cv=1.1.5"
GET /api/bitglassapi/logs/v1/?type=cloudsummary&responseformat=json&nextpagetoken=eyJsb2dfaWQiOiAiMTlqbUh4cWlSX0VrZ1ZNcDRrbjFsNUNJN0xSOVg1RzBoVEpEQXJ4Z2FxU00iLCAiZGF0ZXRpbWUiOiAiMjAxNS0wOS0yOVQwMjowMzozNVoifQ=="
Host: portal.bitglass.com
Authentication: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Response
{
"status": "Success",
"nextpagetoken": "eyJsb2dfaWQiOiAiMTlqbUh4cWlSX0VrZ1ZNcDRrbjFsNUNJN0xSOVg1RzBoVEpEQXJ4Z2FxU00iLCAiZGF0ZXRpbWUiOiAiMjAxNS0wOS0yOVQwMjowMzozNVoifQ==",
"response": {
"dataformat": "json",
"dataencoding": "utf-8",
"data": [{
"syslogheader": "<110>1 2015-1-10T17:19:01Z api.bitglass.com NILVALUE NILVALUE cloud",
"filename": "Report.xls",
"time": "2015-1-10T17:19:01Z",
"size": "",
"owner": "joedoe@emaildomain.com",
"application": "Google Drive",
"status": ["shared", "internal"],
"action": ,
"folder": "/My Drive/Reports",
"fileid": "1BZ8VVq3NnEVyGc1WXYZ8Ifa5ZckYdRBcYX0QgeVscoc",
"patterns": [],
"filelink": "",
"sharedwith": ["employees@emaildomain.com"]
},....]
}