Chat now with support
Chat mit Support

Foglight 7.3.0 - REST API Reference Guide

REST APIs

This provides you with essential information about available Foglight REST APIs. For more information, see the following topics:

App

The App related API includes the following:

API Name: Get App information
Description: Get the application information.
API path: /api/v1/
Sample usage: http://<server>:<port>/api/v1/

Access- 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.

Security

The Security related APIs include the following:

Description: Obtain an access token through user credentials (namely username and pwd in the Parameter: table) or a digital token (namely authToken in the Parameter: table).
NOTE: Retrieving an access token through the authToken parameter is only available in the Foglight Management Server 5.7.5.7 or later.
API path: /api/v1/security/login
Sample usage: http://<server>:<port>/api/v1/security/login

Accept

String

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

username

String

User account.

pwd

String

Password associated with the user account.

authToken

String

The token is generated from the User Management dashboard or Foglight command line.

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.

Description: Expire an access token.
API path: /api/v1/security/logout
Sample usage: http://<server>:<port>/api/v1/security/logout

Access- 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 data (JSON/XML) or exception message

error

String

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

API Name: Set Auth Token for a given user
Description: Set the Auth Token, which is also referred to as digital token, for a specified user account. The current user who is logging in to REST service must have the Administrator permission to use this API.
API path: /api/v1/security/setAuthToken/username
Sample usage: http://<server>:<port>/api/v1/security/setAuthToken/abcuser

Accept

String

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

username

String

User account which Auth Token is to be set.

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: Delete Auth Token for a given user
Description: Delete the Auth Token, which is also referred to as digital token, for a specified user account. The current user who is logging in to REST service must have the Administrator permission to use this API.
API path: /api/v1/security/deleteAuthToken/username
Sample usage: http://<server>:<port>/api/v1/security/deleteAuthToken/abcuser

Accept

String

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

username

String

User account which Auth Token is to be deleted.

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: Set Auth Token for the current user
Description: Set the Auth Token, which is also referred to as digital token, for the current login user.
API path: /api/v1/security/setOwnAuthToken
Sample usage: http://<server>:<port>/api/v1/security/setOwnAuthToken

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: Delete Auth Token for the current user
Description: Delete the Auth Token, which is also referred to as digital token, for the current login user.
API path: /api/v1/security/deleteOwnAuthToken
Sample usage: http://<server>:<port>/api/v1/security/deleteOwnAuthToken

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.

Agent

The Agent related APIs include the following:

API Name: Get agent by agent ID.
Description: Filter out agents by the agent ID.
API path: /api/v1/agent/agentId/agentId
Sample usage: http://<server>:<port>/api/v1/agent/agentId/1

Access- 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 active agents.
Description: Filter out all active agents.
API path: /api/v1/agent/active
Sample usage: http://<server>:<port>/api/v1/agent/active

Access- 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 agents.
Description: Get all agents.
API path: /api/v1/agent/allAgents
Sample usage: http://<server>:<port>/api/v1/agent/allAgents

Access- 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 inactive agents.
Description: Filter out all inactive agents.
API path: /api/v1/agent/inactive
Sample usage: http://<server>:<port>/api/v1/agent/inactive

Access- 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: Start agent by agent ID.
Description: Active agent and then start data collection by agent ID.
API path: /api/v1/agent/start/agentId/:agentId
Sample usage: http://<server>:<port>/api/v1/agent/start/agentId/1

Access- Token

String

The token you get after you login successfully.

Accept

String

Should be application/json or application/xml, to define the response data format, default 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: Stop agent by agent ID.
Description: Stop data collection and then deactivate agent by agent ID.
API path: /api/v1/agent/stop/agentId/:agentId
Sample usage: http://<server>:<port>/api/v1/agent/stop/agentId/1

Access- Token

String

The token you get after you login successfully.

Accept

String

Should be application/json or application/xml, to define the response data format, default 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: Delete agent by agent ID.
Description: Delete an agent by agent ID.
API path: /api/v1/agent/delete/agentId/:agentId
Sample usage: http://<server>:<port>/api/v1/agent/delete/agentId/1

Access- Token

String

The token you get after you login successfully.

Accept

String

Should be application/json or application/xml, to define the response data format, default 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.

Verwandte Dokumente

The document was helpful.

Bewertung auswählen

I easily found the information I needed.

Bewertung auswählen