# Logs Controller Resource

The API allows you to list and download logs.

### GET /logs

Returns a list of log file directories.

Response Body
media type | data type | description
--- | --- | ---
application/json | array of LogFileListRecord (JSON) | list of log file directories

#### Example

##### Request

    GET /logs
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    [ {
      "modified" : 1451649601000
    } ]

### GET /logs/download-all

Download all zipped logs.

#### Example

##### Request

    GET /logs/download-all
    Content-Type: application/json

    ...

##### Response

    HTTP/1.1 200 OK

### GET /logs/{dirName}

Returns list of log files from specified directory name.

Request Parameters
name | type | description
--- | --- | ---
dirName | path | specify directory name

Response Body
media type | data type | description
--- | --- | ---
application/json | array of LogFileListRecord (JSON) | list of log files from specified directory name

#### Example

##### Request

    GET /logs/{dirName}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    [ {
      "modified" : 1451649601000
    } ]

### GET /logs/backups/{guid}

Download log file with entries of specified backup.

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for backup (use by vProtect)

#### Example

##### Request

    GET /logs/backups/{guid}
    Content-Type: */*

    ...

##### Response

    HTTP/1.1 200 OK

### GET /logs/inventory-syncs/{guid}

Request Parameters
name | type | description
--- | --- | ---
guid | path |

#### Example

##### Request

    GET /logs/inventory-syncs/{guid}
    Content-Type: */*

    ...

##### Response

    HTTP/1.1 200 OK

### GET /logs/{dirName}/{fileName}

Download log file from specified path.

Request Parameters
name | type | description
--- | --- | ---
dirName | path | specify directory name to log file
fileName | path | specify log file name

Response Body
media type | data type | description
--- | --- | ---
application/octet-stream | object | log file from specified path

#### Example

##### Request

    GET /logs/{dirName}/{fileName}
    Content-Type: */*
    Accept: application/octet-stream

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/octet-stream

    ...