Get Agents For Asset

Use the "/GetAgentsForAsset" API to retrieve a list of CCS agents associated with a specific asset.

Authentication

To grant access to users to view or execute RESTful APIs, you must generate an authentication token. To know more about this, refer to this topic - Using token-based authentication for
Control Compliance Suite
RESTful APIs
.

Authorization Requirements

You must have the following task to execute and use the "/GetAgentsForAsset" API:
  • Manage Agents
  • View Assets
To use the "/GetAgentsForAsset" API, you must have permission to access the following folder:
  • Asset System

Authorization Header

You are required to pass the
Bearer Token
in the HTTP authorization header.

Request Method and Content Type

To retrieve the list of
Control Compliance Suite
agents for a specified asset, create a
GET
request and the content data being sent in the HTTP request or response body is formatted as
application/json
.

API URL

The following table displays the "/GetAgentsForAsset" API description, and the API URL:
Operation Description
Request URL
Use this API to retrieve a list of CCS agents associated with a specified asset.
GET https://<hostname>:<port number>/ccs/api/v2/Agents/GetAgentsForAsset

Sample of a "/GetAgentsForAsset" API request and response

Sample of a "/GetAgentsForAsset" API Request:
{ "AssetIDs": ["5b20c1ec1-4f74-4133-bb31-76cd8737d08d","R5b4Teb3-E2b6-444d-81ec-f5d8b538f68c"] }
Where
  • AssetIDs: This is the unique identifier of the asset, and it supports more than one value delimited by coma as shown in the sample.
Sample of a "/GetAgentsForAsset" API Response:
{ "TotalCount": 1, "agents": [ { "AssetId": "5b20c1ec1-4f74-4133-bb31-76cd8737d08d", "AgentId": "1OpivvG3-FLDR-Sjcq-LmMk-ZSo72VPYD1jK" } ] }