Foglight REST API Reference

Foglight REST API Reference

Overview

The Foglight REST API provides programmatic access to Foglight functionality, allowing you to integrate Foglight with external systems, automate operations, and build custom integrations. This RESTful API uses standard HTTP methods and returns responses in JSON or XML format.

API Version

Current API Version: v1

Base URL

http://<foglight-server>:<port>/api/v1/

Default Ports:

  • Cloud: Port 443 (HTTPS)
  • On-Premises: Port 8080 (HTTP) or 8443 (HTTPS)

Prerequisites

  • API Access Role: Users must have the “API Access” role assigned in Foglight
  • Authentication: Valid credentials or authentication token
  • Network Access: Connectivity to the Foglight Management Server

Table of Contents

Core Resources

Reference


Authentication

The Foglight REST API uses token-based authentication. You must obtain an authentication token before accessing protected resources.

Obtaining an Authentication Token

Endpoint: POST /api/v1/security/login

Request Parameters:

  • username (string, required): User name
  • pwd (string, required): Password

Example Request:

curl -X POST "http://localhost:8080/api/v1/security/login" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "username=admin&pwd=password"

Example Response:

{
  "result": "OK",
  "data": {
    "access-token": "7d8e9f1a2b3c4d5e6f7g8h9i0j1k2l3m",
    "user": {
      "name": "admin",
      "email": "admin@company.com"
    }
  }
}

Using the Authentication Token

Include the token in the Auth-Token header for all subsequent requests:

curl -X GET "http://localhost:8080/api/v1/agent/allAgents" \
  -H "Auth-Token: 7d8e9f1a2b3c4d5e6f7g8h9i0j1k2l3m" \
  -H "Accept: application/json"

Logging Out

Endpoint: GET /api/v1/security/logout

Invalidates the current authentication token.

Example Request:

curl -X GET "http://localhost:8080/api/v1/security/logout" \
  -H "Auth-Token: 7d8e9f1a2b3c4d5e6f7g8h9i0j1k2l3m"

Cloud vs On-Premises Authentication:

  • Cloud: Supports OAuth 2.0 and SAML in addition to token-based authentication
  • On-Premises: Supports built-in authentication and LDAP integration

Request Format

HTTP Methods

The API uses standard HTTP methods:

  • GET: Retrieve resources
  • POST: Create resources or execute actions
  • PUT: Update resources
  • DELETE: Remove resources

Headers

Required Headers:

HeaderValueDescription
Auth-TokenToken stringAuthentication token (except for login endpoint)
Acceptapplication/json or application/xmlResponse format preference

Optional Headers:

HeaderValueDescription
Content-Typeapplication/json or application/xmlRequest body format

Content Types

The API supports two content types for request and response bodies:

  • JSON (application/json) - Default and recommended
  • XML (application/xml) - Alternative format

Response Format

Success Response Structure

{
  "result": "OK",
  "data": {
    // Response data
  }
}

Error Response Structure

{
  "result": "ERROR",
  "message": "Error description",
  "errorCode": "ERROR_CODE"
}

HTTP Status Codes

Status CodeDescription
200OK - Request succeeded
201Created - Resource created successfully
204No Content - Request succeeded with no response body
400Bad Request - Invalid request parameters
401Unauthorized - Authentication required or failed
403Forbidden - Insufficient permissions
404Not Found - Resource not found
500Internal Server Error - Server-side error
503Service Unavailable - Service temporarily unavailable

API Resources

This section describes the available REST API resources organized by functional area:

Core Resources

  1. Security - Authentication and authorization
  2. Agents - Agent management and monitoring
  3. Topology - Topology objects and queries
  4. Alarms - Alarm management and queries
  5. Rules - Rule configuration and management
  6. Cartridges - Cartridge information
  7. Registry - Configuration registry access

Security API

The Security API provides endpoints for authentication, authorization, and session management.

Login

Endpoint: POST /api/v1/security/login

Authenticates a user and returns an authentication token.

Parameters:

ParameterTypeRequiredDescription
usernamestringYesUser name
pwdstringYesPassword

Response:

{
  "result": "OK",
  "data": {
    "access-token": "string",
    "user": {
      "name": "string",
      "email": "string"
    }
  }
}

Example:

curl -X POST "http://localhost:8080/api/v1/security/login" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "username=admin&pwd=password"

Logout

Endpoint: GET /api/v1/security/logout

Logs out the current user and invalidates the authentication token.

Response:

{
  "result": "OK"
}

Example:

curl -X GET "http://localhost:8080/api/v1/security/logout" \
  -H "Auth-Token: your-token-here"

Agent API

The Agent API provides endpoints for managing and monitoring Foglight agents.

Get All Agents

Endpoint: GET /api/v1/agent/allAgents

Retrieves information about all agents.

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "agent-id",
      "name": "Agent Name",
      "host": "hostname",
      "state": "RUNNING",
      "version": "6.3.0"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/agent/allAgents" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Active Agents

Endpoint: GET /api/v1/agent/active

Retrieves information about all active agents.

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "agent-id",
      "name": "Active Agent",
      "host": "hostname",
      "state": "COLLECTING_DATA",
      "version": "6.3.0"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/agent/active" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Inactive Agents

Endpoint: GET /api/v1/agent/inactive

Retrieves information about all inactive agents.

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "agent-id",
      "name": "Inactive Agent",
      "host": "hostname",
      "state": "NOT_RUNNING",
      "version": "6.3.0"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/agent/inactive" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Agent by ID

Endpoint: GET /api/v1/agent/agentId/{agentId}

Retrieves information about a specific agent.

Parameters:

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent

Response:

{
  "result": "OK",
  "data": {
    "id": "agent-id",
    "name": "Agent Name",
    "host": "hostname",
    "state": "RUNNING",
    "version": "6.3.0",
    "cartridges": []
  }
}

Example:

curl -X GET "http://localhost:8080/api/v1/agent/agentId/my-agent-id" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Start Agent

Endpoint: POST /api/v1/agent/start/agentId/{agentId}

Starts a stopped agent.

Parameters:

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent

Response:

{
  "result": "OK",
  "message": "Agent started successfully"
}

Example:

curl -X POST "http://localhost:8080/api/v1/agent/start/agentId/my-agent-id" \
  -H "Auth-Token: your-token-here"

The start operation may take up to 3 minutes to complete. The default timeout is 180 seconds.

Stop Agent

Endpoint: POST /api/v1/agent/stop/agentId/{agentId}

Stops a running agent.

Parameters:

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent

Response:

{
  "result": "OK",
  "message": "Agent stopped successfully"
}

Example:

curl -X POST "http://localhost:8080/api/v1/agent/stop/agentId/my-agent-id" \
  -H "Auth-Token: your-token-here"

Delete Agent

Endpoint: DELETE /api/v1/agent/delete/agentId/{agentId}

Deletes an agent from the system.

Parameters:

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent

Response:

{
  "result": "OK",
  "message": "Agent deleted successfully"
}

Example:

curl -X DELETE "http://localhost:8080/api/v1/agent/delete/agentId/my-agent-id" \
  -H "Auth-Token: your-token-here"

Deleting an agent is a permanent operation and cannot be undone. All associated data will be removed.


Topology API

The Topology API provides access to the Foglight topology model, allowing you to query objects, retrieve properties, and access observations.

Get Topology Object by ID

Endpoint: GET /api/v1/topology/{topologyId}

Retrieves a specific topology object by its ID.

Parameters:

ParameterTypeRequiredDescription
topologyIdstringYesThe unique identifier of the topology object

Response:

{
  "result": "OK",
  "data": {
    "id": "topology-object-id",
    "name": "Object Name",
    "type": "ObjectType",
    "properties": {}
  }
}

Example:

curl -X GET "http://localhost:8080/api/v1/topology/my-topology-id" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Multiple Topology Objects by IDs

Endpoint: GET /api/v1/topology/topologyIds

Retrieves multiple topology objects by their IDs.

Query Parameters:

ParameterTypeRequiredDescription
Idstring[]YesArray of topology object IDs

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "topology-object-id-1",
      "name": "Object 1",
      "type": "ObjectType"
    },
    {
      "id": "topology-object-id-2",
      "name": "Object 2",
      "type": "ObjectType"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/topology/topologyIds?Id=obj1&Id=obj2&Id=obj3" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Topology Object Property by Path

Endpoint: GET /api/v1/topology/{topologyId}/{path}

Retrieves a property or nested property value using a path expression.

Parameters:

ParameterTypeRequiredDescription
topologyIdstringYesThe unique identifier of the topology object
pathstringYesProperty path (e.g., “properties” or “properties/name”)

Response:

{
  "result": "OK",
  "data": "property-value"
}

Example:

curl -X GET "http://localhost:8080/api/v1/topology/my-topology-id/properties/name" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Multiple Properties by Paths

Endpoint: GET /api/v1/topology/{topologyId}/paths

Retrieves multiple property values using path expressions.

Parameters:

ParameterTypeRequiredDescription
topologyIdstringYesThe unique identifier of the topology object
pathstring[]YesArray of property paths

Response:

{
  "result": "OK",
  "data": {
    "properties/name": "Object Name",
    "properties/state": "RUNNING",
    "properties/cpu_usage": 45.5
  }
}

Example:

curl -X GET "http://localhost:8080/api/v1/topology/my-topology-id/paths?path=properties/name&path=properties/state" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Query Topology Objects

Endpoint: POST /api/v1/topology/query

Executes a Foglight Query Language (FQL) query to retrieve topology objects.

Request Body:

{
  "queryText": "!Host",
  "caseSensitive": false
}

Parameters:

ParameterTypeRequiredDescription
queryTextstringYesFQL query string
caseSensitivebooleanNoWhether the query is case-sensitive

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "topology-object-id",
      "name": "Object Name",
      "type": "Host",
      "properties": {}
    }
  ]
}

Example:

curl -X POST "http://localhost:8080/api/v1/topology/query" \
  -H "Auth-Token: your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "queryText": "!Host",
    "caseSensitive": false
  }'

Common FQL Queries:

  • !Host - All hosts
  • !Database - All databases
  • !Agent - All agents
  • !Host where name = :hostname - Host by name

Query Observations

Endpoint: POST /api/v1/topology/observationQuery

Retrieves observation data (metrics) for topology objects.

Request Body:

{
  "includes": [
    {
      "ids": ["object-id-1", "object-id-2"],
      "observationName": "cpu_usage"
    }
  ],
  "startTime": 1697452800000,
  "endTime": 1697456400000,
  "retrievalType": "LATEST"
}

Parameters:

ParameterTypeRequiredDescription
includesarrayYesArray of observation requests
startTimelongNoStart timestamp (milliseconds since epoch)
endTimelongNoEnd timestamp (milliseconds since epoch)
retrievalTypestringNoLATEST, LAST_N, AGGREGATE, AGGREGATE_AND_LAST
granularitylongNoData granularity in milliseconds
numberOfValueintegerNoNumber of values to retrieve

Response:

{
  "result": "OK",
  "data": {
    "lastValues": {
      "object-id-1:cpu_usage": {
        "value": 45.5,
        "timestamp": 1697452800000
      }
    }
  }
}

Example:

curl -X POST "http://localhost:8080/api/v1/topology/observationQuery" \
  -H "Auth-Token: your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "includes": [
      {
        "ids": ["obj1", "obj2"],
        "observationName": "cpu_usage"
      }
    ],
    "retrievalType": "LATEST"
  }'

Alarm API

The Alarm API provides endpoints for querying, acknowledging, and managing alarms.

Acknowledge Alarm

Endpoint: GET /api/v1/alarm/ack/{alarmId}

Acknowledges a specific alarm.

Parameters:

ParameterTypeRequiredDescription
alarmIdstringYesThe unique identifier of the alarm

Response:

{
  "result": "OK",
  "data": "success"
}

Example:

curl -X GET "http://localhost:8080/api/v1/alarm/ack/my-alarm-id" \
  -H "Auth-Token: your-token-here"

Clear Alarm

Endpoint: GET /api/v1/alarm/clear/{alarmId}

Clears a specific alarm.

Parameters:

ParameterTypeRequiredDescription
alarmIdstringYesThe unique identifier of the alarm

Response:

{
  "result": "OK",
  "data": "success"
}

Example:

curl -X GET "http://localhost:8080/api/v1/alarm/clear/my-alarm-id" \
  -H "Auth-Token: your-token-here"

Get Alarm by ID

Endpoint: GET /api/v1/alarm/{alarmId}

Retrieves a specific alarm by its ID.

Parameters:

ParameterTypeRequiredDescription
alarmIdstringYesThe unique identifier of the alarm

Response:

{
  "result": "OK",
  "data": {
    "id": "alarm-id",
    "message": "Alarm message",
    "severity": "CRITICAL",
    "state": "OUTSTANDING",
    "timestamp": 1697452800000
  }
}

Example:

curl -X GET "http://localhost:8080/api/v1/alarm/my-alarm-id" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Alarms by Rule ID

Endpoint: GET /api/v1/alarm/ruleId/{ruleId}

Retrieves all alarms associated with a specific rule.

Parameters:

ParameterTypeRequiredDescription
ruleIdstringYesThe unique identifier of the rule
startTimeMSlongNoStart timestamp (milliseconds since epoch)
durationMSlongNoDuration in milliseconds

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "alarm-id",
      "message": "Alarm message",
      "severity": "WARNING",
      "ruleID": "rule-id"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/alarm/ruleId/my-rule-id" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Current Alarms

Endpoint: GET /api/v1/alarm/current

Retrieves all current (active) alarms.

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "alarm-id",
      "message": "Alarm message",
      "severity": "CRITICAL",
      "state": "OUTSTANDING"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/alarm/current" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Current Alarms for Topology Object

Endpoint: GET /api/v1/alarm/current/{topologyId}

Retrieves all current alarms for a specific topology object.

Parameters:

ParameterTypeRequiredDescription
topologyIdstringYesThe unique identifier of the topology object

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "alarm-id",
      "message": "Alarm message",
      "severity": "WARNING",
      "state": "OUTSTANDING",
      "topologyObjectId": "topology-id"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/alarm/current/my-topology-id" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Historical Alarms

Endpoint: GET /api/v1/alarm/history

Retrieves historical alarms within the specified time range.

Query Parameters:

ParameterTypeRequiredDescription
startTimeMSlongNoStart timestamp (milliseconds since epoch)
durationMSlongNoDuration in milliseconds

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "alarm-id",
      "message": "Alarm message",
      "severity": "WARNING",
      "timestamp": 1697452800000
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/alarm/history" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Historical Alarms for Topology Object

Endpoint: GET /api/v1/alarm/history/{topologyId}

Retrieves historical alarms for a specific topology object.

Parameters:

ParameterTypeRequiredDescription
topologyIdstringYesThe unique identifier of the topology object
startTimeMSlongNoStart timestamp (milliseconds since epoch)
durationMSlongNoDuration in milliseconds

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "alarm-id",
      "message": "Alarm message",
      "severity": "CRITICAL",
      "topologyObjectId": "topology-id",
      "timestamp": 1697452800000
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/alarm/history/my-topology-id" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Push External Alarm

Endpoint: POST /api/v1/alarm/pushAlarm

Pushes an alarm from an external system.

Request Body:

{
  "severity": 5,
  "message": "External alarm message",
  "topologyObjectId": "topology-id"
}

Parameters:

ParameterTypeRequiredDescription
severityintegerYesAlarm severity (1-5)
messagestringYesAlarm message
topologyObjectIdstringYesTarget topology object ID

Response:

{
  "result": "OK",
  "message": "Alarm pushed successfully"
}

Example:

curl -X POST "http://localhost:8080/api/v1/alarm/pushAlarm" \
  -H "Auth-Token: your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "severity": 5,
    "message": "Critical error detected",
    "topologyObjectId": "my-object-id"
  }'

Push External Alarm by Query

Endpoint: POST /api/v1/alarm/pushAlarmByQuery

Pushes an alarm to topology objects identified by an FQL query.

Request Body:

{
  "severity": 4,
  "message": "External alarm message",
  "query": "!Host where name = :hostname"
}

Parameters:

ParameterTypeRequiredDescription
severityintegerYesAlarm severity (1-5)
messagestringYesAlarm message
querystringYesFQL query to identify target object

Response:

{
  "result": "OK",
  "message": "Alarm pushed successfully"
}

Example:

curl -X POST "http://localhost:8080/api/v1/alarm/pushAlarmByQuery" \
  -H "Auth-Token: your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "severity": 4,
    "message": "Database connection lost",
    "query": "!Database where name = '\''production-db'\''"
  }'

Rule API

The Rule API provides access to Foglight rules for monitoring and alerting.

Get All Rules

Endpoint: GET /api/v1/rule/allRules

Retrieves information about all rules.

Response:

{
  "result": "OK",
  "data": [
    {
      "id": "rule-id",
      "name": "Rule Name",
      "enabled": true,
      "type": "RuleType"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/rule/allRules" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Rule by ID

Endpoint: GET /api/v1/rule/{ruleId}

Retrieves information about a specific rule.

Parameters:

ParameterTypeRequiredDescription
ruleIdstringYesThe unique identifier of the rule

Response:

{
  "result": "OK",
  "data": {
    "id": "rule-id",
    "name": "Rule Name",
    "description": "Rule description",
    "enabled": true,
    "severity": "CRITICAL"
  }
}

Example:

curl -X GET "http://localhost:8080/api/v1/rule/my-rule-id" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Cartridge API

The Cartridge API provides information about installed cartridges.

Get All Cartridges

Endpoint: GET /api/v1/cartridge/allCartridges

Retrieves information about all installed cartridges.

Response:

{
  "result": "OK",
  "data": [
    {
      "name": "Cartridge Name",
      "version": "1.0.0",
      "type": "CORE",
      "enabled": true
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/cartridge/allCartridges" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Core Cartridges

Endpoint: GET /api/v1/cartridge/allCartridges/core

Retrieves information about core cartridges only.

Response:

{
  "result": "OK",
  "data": [
    {
      "name": "Core Cartridge",
      "version": "1.0.0",
      "type": "CORE"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/cartridge/allCartridges/core" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Get Non-Core Cartridges

Endpoint: GET /api/v1/cartridge/allCartridges/nonCore

Retrieves information about non-core cartridges.

Response:

{
  "result": "OK",
  "data": [
    {
      "name": "Custom Cartridge",
      "version": "2.0.0",
      "type": "CUSTOM"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/cartridge/allCartridges/nonCore" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Registry API

The Registry API provides access to the Foglight configuration registry.

Get All Registries

Endpoint: GET /api/v1/registry/allRegistries

Retrieves all registry entries.

Response:

{
  "result": "OK",
  "data": [
    {
      "key": "registry-key",
      "value": "registry-value",
      "type": "string"
    }
  ]
}

Example:

curl -X GET "http://localhost:8080/api/v1/registry/allRegistries" \
  -H "Auth-Token: your-token-here" \
  -H "Accept: application/json"

Error Handling

Error Response Format

All API errors return a consistent error response format:

{
  "result": "ERROR",
  "message": "Detailed error message",
  "errorCode": "ERROR_CODE",
  "details": {
    "field": "Additional error context"
  }
}

Common Error Codes

Error CodeHTTP StatusDescriptionResolution
AUTH_FAILED401Authentication failedVerify credentials and retry
TOKEN_EXPIRED401Authentication token expiredObtain a new token via login
PERMISSION_DENIED403Insufficient permissionsRequest necessary role assignment
NOT_FOUND404Resource not foundVerify resource ID and retry
INVALID_REQUEST400Invalid request parametersCheck request format and parameters
SERVER_ERROR500Internal server errorContact support with error details
SERVICE_UNAVAILABLE503Service temporarily unavailableRetry after a short delay

Best Practices

Performance Optimization

  1. Use Specific Queries: Narrow your FQL queries to retrieve only necessary data
  2. Implement Pagination: For large result sets, implement pagination
  3. Cache Responses: Cache frequently accessed data when appropriate
  4. Limit Observation Ranges: Specify time ranges for observation queries

Security Best Practices

  1. Use HTTPS: Always use HTTPS in production environments
  2. Protect Tokens: Store authentication tokens securely
  3. Token Rotation: Regularly rotate authentication tokens
  4. Principle of Least Privilege: Request only necessary permissions

Error Handling

  1. Implement Retry Logic: Add exponential backoff for transient errors
  2. Log Errors: Log all API errors for troubleshooting
  3. Validate Inputs: Validate all inputs before sending requests
  4. Handle Timeouts: Implement appropriate timeout handling

Rate Limiting

Cloud Deployment: The Foglight Cloud API implements rate limiting to ensure fair usage and system stability.

Default Rate Limits:

  • 100 requests per minute per user
  • 1000 requests per hour per user

Rate Limit Headers:

When rate limits are approaching, responses include the following headers:

  • X-RateLimit-Limit: Maximum requests per time window
  • X-RateLimit-Remaining: Remaining requests in current window
  • X-RateLimit-Reset: Time when the rate limit resets (Unix timestamp)

Rate Limit Exceeded Response:

{
  "result": "ERROR",
  "message": "Rate limit exceeded",
  "errorCode": "RATE_LIMIT_EXCEEDED",
  "details": {
    "retryAfter": 60
  }
}

API Versioning

The Foglight REST API uses URI versioning. The current version is v1 and is included in all API endpoint URLs:

http://<foglight-server>:<port>/api/v1/...

Version Compatibility

  • API versions are backward compatible within major versions
  • Deprecated features are announced in advance
  • New features may be added without version changes

Checking API Version

To check the available API version, access the base API endpoint:

curl -X GET "http://localhost:8080/api/" \
  -H "Accept: application/json"

Response:

{
  "version": "v1",
  "supportedVersions": ["v1"]
}

Support and Resources

Additional Documentation

  • Foglight User Guide: Comprehensive product documentation
  • Cartridge Documentation: Specific cartridge API extensions
  • SDK Documentation: Developer resources for custom integrations

Getting Help

For API support and questions:

  • Cloud Support: Contact Quest Support via the support portal
  • On-Premises Support: Contact your local Quest support team
  • Community Forums: Visit the Quest Community forums

Reporting Issues

When reporting API issues, include:

  1. API endpoint and method
  2. Request parameters and body
  3. Full error response
  4. Foglight version and deployment type
  5. Steps to reproduce

Changelog

Version 8.0.0 (Current)

  • Enhanced authentication with OAuth 2.0 support (Cloud)
  • Added observation retrieval types (LATEST, AVERAGE, MIN, MAX, SUM)
  • Improved error messages and error codes
  • Performance improvements for topology queries

Version 7.3.0

  • Initial REST API release
  • Core API resources (Security, Agent, Topology, Alarm, Rule)
  • Token-based authentication
  • JSON and XML response formats

Appendix

FQL Query Examples

Get all hosts:

!Host

Get hosts by name pattern:

!Host where name like :pattern

Get databases with high CPU usage:

!Database where cpu_usage > :threshold

Get agents with specific state:

!Agent where state = :state

Date and Time Formats

The API uses Unix timestamps (milliseconds since epoch) for all date and time values:

{
  "timestamp": 1697452800000
}

To convert to human-readable format:

new Date(1697452800000).toISOString()
// "2023-10-16T12:00:00.000Z"

HTTP Status Code Reference

Complete list of HTTP status codes used by the API:

  • 2xx Success

    • 200 OK
    • 201 Created
    • 204 No Content
  • 4xx Client Errors

    • 400 Bad Request
    • 401 Unauthorized
    • 403 Forbidden
    • 404 Not Found
    • 429 Too Many Requests
  • 5xx Server Errors

    • 500 Internal Server Error
    • 503 Service Unavailable

Last Updated: October 16, 2025
API Version: v1
Document Version: 8.0.0