Chat now with support
Chat with Support

Foglight for Virtualization Enterprise Edition 8.6 - RestAPI Reference Guide

Script

The Script related API includes the following:

API Name: Run Script
Description: You need be granted both the Administrator and API Access roles to use this API. This API is similar to the script console, but it does not support functionHelper, log, and out variables that are supported in the script console.

script

The script content.

catridgeName

Specifies the name of associated cartridge, and the name is case-sensitive.

scopeObjectId

Specifies the scope object. This item must be set if the scope variable is being used in scripts.

API path: /api/v1/script/runScript

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json

Content-Type

String

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

Subscribe alarm

The Subscribe related APIs include the following:

API Name: Disconnect SSE
Description: Disconnect all the active Server-Sent Events (SSE) subscriptions.
API path: /api/v1/subscription/disconnect/all/
Sample usage: http://<server>:<port>/api/v1/subscription/disconnect/all/

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

API Name: List SSE
Description: Filter out all the active SSE subscriptions.
API path: /api/v1/subscription/list/
Sample usage: http://<server>:<port>/api/v1/subscription/list

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

API Name: Subscribe alarms by object ID
Description: Watch the topology object by its topologyId, and subscribe to alarm-generated events through SSE. When the client is disconnected, there is no retry mechanism to send an event to the client. For more information, visit Server-Sent Events (SSE) Support and Server-Sent Events.
NOTE: If the version of your Foglight Management Server is lower than 5.7.5.7, open the server.xml file under <fms_home>/server/tomcat/, then add asyncSupported="true" to all value items (for example, <Valve className="com.quest.nitro.web.tomcat.HttpsRedirectValve" asyncSupported="true"/>).
API path: /api/v1/subscription/alarm/subscribe/topologyId

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

API Name: Subscribe to all alarms
Description: Subscribe to alarm-generated events through SSE. When the client is disconnected, there is no retry mechanism to send an event to the client. For more information, visit Server-Sent Events (SSE) Support and Server-Sent Events.
NOTE: If the version of your Foglight Management Server is lower than 5.7.5.7, open the server.xml file under <fms_home>/server/tomcat/, then add asyncSupported="true" to all value items (for example, <Valve className="com.quest.nitro.web.tomcat.HttpsRedirectValve" asyncSupported="true"/>).
API path: /api/v1/subscription/alarm/subscribe

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

Topology

The Topology related APIs include the following:

API Name: Get properties’ value
Description: Get data of all rules.
API path: /api/v1/topology/topologyId/paths
Sample usage: http://<server>:<port>/api/v1/topology/3546fa55-11b6-4943-b7cb-84ddcf350bc5/paths?path=name&path=uniqueId&path=utilization

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

path

String

The property path. This may include multiple paths.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

API Name: Get property value
Description: Get property values by the path defined based on the given topology ID. The result may be DataObject, Primitive Object, Observation, or else.
API path: /api/v1/topology/topologyId/path
Sample usage: http://<server>:<port>/api/v1/topology/abc94b3d-f599-4766-a979-f32d372ff47d/cpus/utilization

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

API Name: Get topology object by IDs
Description: Filter out topology objects by an object ID.
API path: /api/v1/topology/topologyObjectId
Sample usage: http://<server>:<port>/api/v1/topology/1f478dec-f920-4da9-a8d2-b9ba0dcd4394

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

API Name: Get topology object by ids
Description: Filter out topology objects by multiple IDs.
API path: /api/v1/topology/topologyIds
Sample usage: http://<server>:<port>/api/v1/topology/topologyIds?Id=3546fa55-11b6-4943-b7cb-84ddcf350bc5&Id=67beea68-fa6f-4cd3-b122-dcb20db50360

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

Id

String

The topology object ID. This may include multiple IDs.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

API Name: Observations query
Description: Filter out observations value by a batch query. The following lists the retrievalType:

RAW

Retrieve the raw data of an observation based on the time range.

AGGREGATE

Retrieve the aggregate data of an observation based on the time range.

AGGREGATE_AND_LAST

Retrieve the aggregate and last data of an observation based on the time range.

LAST_N

Retrieve the last N data of the observation based on the time range. If retrievalType is set to LAST_N, you need configure the value of numberOfValue that defines the letter N of LAST_N.

API path: /api/v1/topology/batchQuery

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

Content-Type

String

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

API Name: TopologyObject query
Description: Filter out topology objects by a batch query.
API path: /api/v1/topology/query

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

Content-Type

String

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

TopologyType

The TopologyType related APIs include the following:

API Name: Get type information
Description: Get the information of an type.
API path: /api/v1/type/typeName
Sample usage: http://<server>:<port>/api/v1/type/Host

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

API Name: Get type super type’s information
Description: Get the information of a type’s parent type.
API path: /api/v1/type/typeName/super
Sample usage: http://<server>:<port>/api/v1/type/Host/super

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

API Name: Get all instances of a type
Description: Get all instances of a type.
API path: /api/v1/type/typeName/instances
Sample usage: http://<server>:<port>/api/v1/type/Host/instances

Auth-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating