API Call Conventions

All API calls are done via the /api path on the Syslog Server, for example:

http://localhost:47279/api/sources/list

Parameters can be passed either in the query string:

GET /api/sources/enable?id=abc123

Or as a request body in JSON:

POST /api/sources/enable
{
  "id": "abc123"
}

APIs will return null if the user is not authenticated and the Syslog Server is configured to require authentication.

Sources APIs


/sources/list

Get the sources currently configured in Fastvue Syslog.

Parameters

None.

Returns

Array of syslog sources.

[
  {
    "id": guid,                  // ID of the source
    "enabled": bool,             // Enabled state
    "name": string,              // Source name
    "displayName": string,       // Custom display name for the source (optional)
    "sourceHost": string,        // Hostname of the syslog source
    "sourceIP": ip,              // IP Address of the syslog source
    "port": int,                 // Port number that the syslog source's traffic is received on
    "forwardEnabled": bool,      // True if syslog forwarding is enabled for the source
    "forwardHost": string,       // Hostname to forward syslog traffic to
    "forwardIP": ip,             // IP Address to forward syslog traffic to
    "forwardPort": int,          // Port to forward syslog traffic to
    "forwardTransport": string,  // Transport protocol to forward syslog traffic with
    "logFolder": string,         // Folder path/syntax to write log files to
    "logFilename": string,       // File name/syntax to write log files to
    "archiveEnabled": bool,      // True if log archiving is enabled for the source
    "archiveFolder": string,     // Folder path/syntax to archive log files to
    "archiveFormat": string,     // Compression format to use when archiving logs
    "archivePeriod": int,        // Number of days after which to archive logs for the source
    "error": string              // Last error from source
  },
  ...
]

/sources/enable

Enable specified source.

Parameters

{
  "id": guid // ID of source to be enabled.
}

Returns

True if the source was successfully enabled;

true

Otherwise a string containing an error message;

"Source abc123 does not exist"

/sources/disable

Disable specified source.

Parameters

{
  "id": guid // ID of source to be disabled.
}

Returns

True if the source was successfully disabled;

true

Otherwise a string containing an error message;

"Source abc123 does not exist"

/sources/add

Add/edit a source

Parameters

{
  "id": guid,                  // ID of the existing source to edit, blank to add new source
  "enabled": bool,             // Enabled state
  "name": string,              // Source name
  "displayName": string,       // Custom display name for the source (optional)
  "sourceHost": string,        // Hostname of the syslog source
  "sourceIP": ip,              // IP Address of the syslog source
  "port": int,                 // Port number that the syslog source's traffic is received on
  "forwardEnabled": bool,      // True if syslog forwarding is enabled for the source
  "forwardHost": string,       // Hostname to forward syslog traffic to
  "forwardIP": ip,             // IP Address to forward syslog traffic to
  "forwardPort": int,          // Port to forward syslog traffic to
  "forwardTransport": string,  // Transport protocol to forward syslog traffic with
  "logFolder": string,         // Folder path/syntax to write log files to
  "logFilename": string,       // File name/syntax to write log files to
  "archiveEnabled": bool,      // True if log archiving is enabled for the source
  "archiveFolder": string,     // Folder path/syntax to archive log files to
  "archiveFormat": string,     // Compression format to use when archiving logs
  "archivePeriod": int,        // Number of days after which to archive logs for the source
  "error": string              // Last error from source
}

Returns

True if the source was successfully added/edited.

true

/sources/delete

Delete the specified source

Parameters

{
  "id": guid // ID of source to be deleted.
}

Returns

True if the source was successfully deleted;

true

Otherwise a string containing an error message;

"Source abc123 does not exist"

/sources/stats

Statistics for the specified source

Parameters

{
  "id": guid // ID of the source
}

Returns

Stats of the specified source:

{
  "id": guid,                  // ID of the source
  "displayName": string,       // Custom display name for the source (optional)
  "sourceHost": string,        // Hostname of the syslog source
  "sourceIP": ip,              // IP Address of the syslog source
  "messagesPerSecond": int,    // Number of messages received from source per second
  "messages": int,             // Total number of messages received from source
  "size": int,                 // Total disk size of logs for source
  "archiveSize": int,          // Total disk size of archived logs for source
  "dates": [                   // Per-date Statistics
    {
      "date": date,            // Date of this statistics block
      "messages": int,         // Number of messages received on this date
      "size" : int,            // Disk size of logs for this date
      "archiveSize" : int      // Disk size of archived logs for this date
    },
    ...
  ]
}

/sources/logmetadata

Log information for the specified source

Parameters

{
  "id": guid // ID of the source
}

Returns

Log metadata for the specified source:

{
  "sourceID": guid,               // ID of the source
  "totalLogSize": int,            // Total disk size of logs for source
  "averageDailyLogSize": int,     // Average daily disk size of logs for source
  "totalArchiveSize": int,        // Total disk size of logs for source
  "averageDailyArchiveSize": int, // Average daily disk size of logs for source
  "logs": [                       // Per-log details
    {
      "log": string,              // Log filename
      "messagesCount": int,       // Number of messages in this log
      "size" : int,               // Disk size of this log
      "archiveSize" : int,        // Disk size of archive for this log, if present
      "dates": [                  // Per-date details
        {
          "date": date,           // Date for this block
          "messages": int,        // Number of messages in this log for this date
          "size": int,            // Disk size of data in this log for this date
          "archiveSize": int      // Disk size of archived data in this log for this date
        },
        ...
      ]
    },
    ...
  ],
  "archives": [                   // Per-archived-log details
    {
      "log": string,              // Archive filename
      "messagesCount": int,       // Number of messages in this log
      "size" : int,               // Disk size of this log
      "archiveSize" : int,        // Disk size of archive for this log, if present
      "dates": [                  // Per-date details for log as object props
        {
          "date": date,           // Date for this block
          "messages": int,        // Number of messages in this log for this date
          "size": int,            // Disk size of data in this log for this date
          "archiveSize": int      // Disk size of archived data in this log for this date
        },
        ...
      ]
    },
    ...
  ],
  "dates": [                      // Per-date size statistics
    {
      "date": date,               // Date of entry
      "size": int                 // Disk size of data for date
    },
    ...
  ],
  "archiveDates": [               // Per-date archive size statistics
    {
      "date": date,               // Date of entry
      "size": int                 // Disk size of archived data for date
    },
    ...
  ]
}

/sources/globalstats

Statistics for all sources

Parameters

None.

Returns

Statistics for all sources

{
  "totalLogSize": int,               // Total disk size of all logs
  "totalArchiveSize": int,           // Total disk size of all archived logs
  "totalMessages": int,              // Total messages stored
  "totalMessagesPerSecond": int,     // Current total messages per second
  "totalMessagesPerSecondMax": int,  // Peak total messages per second
  "sources": [                       // Per-source details
    {
      "id": guid,                    // Source ID
      "displayName": string,         // Custom display name for source
      "sourceHost" : string,         // Hostname of syslog source
      "size" : int,                  // Total disk size of logs for source
      "messages" : int,              // Total messages received from source
      "archiveSize" : int,           // Total disk size of archived logs for source
      "dates": [                     // Per-date details
        {
          "date": date,              // Date for this block
          "messages": int,           // Number of messages for this source for this date
          "size": int,               // Disk size of data for this source for this date
          "archiveSize": int         // Disk size of archived data for this source for this date
        },
        ...
      ]
    },
    ...
  ]
}

/sources/filelist

List of files for the specified source

Parameters

{
  "id": guid // ID of the source
}

Returns

List of log file information

[
  {
    "log": string,         // Log file path
    "name": string,        // Log filename
    "modified": date,      // Timestamp of last write
    "sha": string,         // Path to SHA256 file
    "size": int,           // Disk size of log
    "messageCount": int,   // Number of messages in log
    "dates": [             // Per-date statistics
      {
        "date": date,      // Date for this block
        "messages": int,   // Messages for this date in this log
        "size": int        // Disk size of data for this date in this log
      },
      ...
    ]
  },
  ...
]

/sources/getfile

Retrieve a log file

Parameters

{
  "id": guid,     // ID of the source
  "file": string  // Name of file to retrieve
}

Returns

If the request is valid and the file exists in the correct location, the file is returned directly in the response as Content-Type: application/x-octet-stream.

Otherwise a string containing an error message;

"Source abc123 does not exist"

Or False;

false

/sources/archivelist

List of archived files for the specified source

Parameters

{
  "id": guid // ID of the source
}

Returns

List of archived log file information

[
  {
    "log": string,         // Archive file path
    "name": string,        // Archive filename
    "modified": date,      // Timestamp of last write
    "sha": string,         // Path to SHA256 file
    "size": int,           // Disk size of archived log
    "messageCount": int,   // Number of messages in archived log
    "dates": [             // Per-date statistics
      {
        "date": date,      // Date for this block
        "messages": int,   // Messages for this date in this archived log
        "size": int        // Disk size of data for this date in this archived log
      },
      ...
    ]
  },
  ...
]

/sources/getarchive

Retrieve an archived log file

Parameters

{
  "id": guid,     // ID of the source
  "file": string  // Name of file to retrieve
}

Returns

If the request is valid and the file exists in the correct location, the file is returned directly in the response as Content-Type: application/x-octet-stream.

Otherwise a string containing an error message;

"Source abc123 does not exist"

Or False;

false

Auth APIs


/auth/login

Submit login info for authentication

Parameters

{
  "u": string, // Username
  "p": string  // Password
}

Returns

Session token guid if the login was accepted;

"abc123"

Otherwise a blank string

""

If a token is returned, this token should be provided as a cookie named t with each subsequent request.


/auth/logout

Log out current user

Parameters

None.

Returns

True if the user was successfully logged out.

true

AppInfo APIs


/appinfo/version

The version of the application for display in the UI

Parameters

None.

Returns

Application version as a string.

"2.0.0.1"

Settings APIs

Global settings information


/settings/ports

Get default listening ports.

Parameters

None.

Returns

Array of default listening ports.

[514, 50514]

/settings/setports

Set the list of default listening ports.

Parameters

Array of listening ports to set.

[514, 50514]

Returns

True if the default listening ports were changed.

true

/settings/globalsettings

Retrieve the current global settings.

Parameters

None

Returns

Current global settings.

{
  "defaultLogPath": string,     // Current default log path
  "defaultArchivePath": string, // Current default archive path
  "autoDiscover": bool,         // True if automatic source discovery is enabled
  "authEnabled": bool,          // True if authentication is required to access Syslog Server
  "authUsername": string        // Username to use for authentication
}

/settings/setglobalsettings

Set global settings.

Parameters

{
  "defaultLogPath": string,     // Default log path
  "defaultArchivePath": string, // Default archive path
  "autoDiscover": bool,         // True to enable automatic source discovery
  "authEnabled": bool,          // True to require authentication to access Syslog Server
  "authUsername": string,       // Username to use for authentication
  "authPassword": string        // (optional) New password to set for authentication
}

Returns

True if global settings were applied.

true

/settings/getinitconfigured

Get the initial configuration status.

Parameters

None.

Returns

True if initial configuration has been completed:

true

Otherwise false:

false

/settings/setinitconfigured

Set the initial configuration status.

Parameters

{
  "initConfigured": bool // True to indicate that the initial configuration has been completed
}

Returns

True if initial configuration status was applied.

true