Exporting access (proxy) 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=access&responseformat=csv&startdate=2015-10-10T00:00:00Z&cv=1.1.5"
GET /api/bitglassapi/logs/v1/?type=access&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, time, user, email, device, application, ipaddress, location, activity, action, useragent, request, transactionid, emailfrom, emailto, emailsubject, emailcc, emailbcc, emailsenttime, filename, dlppattern, pagetitle, url"
       "<110>1 2015-1-10T17:19:01Z api.bitglass.com NILVALUE NILVALUE api, 1 Oct 2015 5:19:01, Wei Shao,..", ...]}
}

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=access&responseformat=json&nextpagetoken=eyJsb2dfaWQiOiAiMTlqbUh4cWlSX0VrZ1ZNcDRrbjFsNUNJN0xSOVg1RzBoVEpEQXJ4Z2FxU00iLCAiZGF0ZXRpbWUiOiAiMjAxNS0wOS0yOVQwMjowMzozNVoifQ==&cv=1.1.5"
GET /api/bitglassapi/logs/v1/?type=access&responseformat=json&nextpagetoken=eyJsb2dfaWQiOiAiMTlqbUh4cWlSX0VrZ1ZNcDRrbjFsNUNJN0xSOVg1RzBoVEpEQXJ4Z2FxU00iLCAiZGF0ZXRpbWUiOiAiMjAxNS0wOS0yOVQwMjowMzozNVoifQ=="
Host: portal.bitglass.com
Authentication: Basic dXNldm2hbWU6cGFzc3dvcmQ=

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 access",
        "time": "1 Oct 2015 5:19:01",
        "user": "Wei Shao",
        "email": "wshao@bitglass.com",
        "device": "iPhone 5s",
        "application": "Google Apps",
        "ipaddress": "209.36.5.194",
        "location": "campbell||california||ca||us",
        "activity": ["ActiveSync", "Email", "Receive", "Sync"],
        "action": "",
        "useragent": "Apple-iPhone6C1/1208.321",
        "request" : "",
        "transactionid": "VfH7cwoAFScAAD2cP3IAAAKV",
        "emailfrom": "mschuricht@bitglass.com",
        "emailto": "wshao@bitglass.com",
        "emailsubject": "",
        "emailcc": "pm@bitglass.com",
        "emailbcc": "",
        "emailsenttime": "9 Oct 2015 9:45:47",
        "filename": "",
        "dlppattern": "",
        "pagetitle": "",
        "url": "m.google.com/Microsoft-Server-ActiveSync?User=wshao@bitglass.com&DeviceId=MP52SHJH65775AQ0QN4BSR472S&DeviceType=iPhone&Cmd=Sync"
    },....]
}