Get Assets For Agent

Use the "/GetAssetsForAgent" API to retrieve the list of assets associated with a given CCS agent.

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 "/GetAssetsForAgent" API:
  • Manage Agents
  • View Assets
To use the "/GetAssetsForAgent" 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 a
Control Compliance Suite
assets associated with a CCS agent, 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 "/GetAssetsForAgent" API description, and the API URL:
Operation Description
Request URL
Use this API to retrieve the list of assets associated with a CCS agent.
https:
//<hostname>:<port number>/ccs/api/v2/Agents/GetAssetsForAgent

Sample of a "/GetAssetsForAgent" API request and response

Sample of a "/GetAssetsForAgent" API Request:
{ "AgentIDs": ["55b48eb3-f0d3-444d-81ec-f5d8b538f68c","2rz6dolW-LZZz-Fnvc-YpGZ-Ri4ubdyPR1ky"] }
Where
  • AgentIDs: This is the unique identifier of the CCS agent, and it supports more than one value delimited by coma as shown in the sample.
Sample of a "/GetAssetsForAgent" API Response:
{ "TotalRecords": 2, "assets": [ { "AgentId": "55b48eb3-f0d3-444d-81ec-f5d8b538f68c", "AssetId": "49865b64-a095-4b1b-9f69-1eeba0747d02" }, { "AgentId": "55b48eb3-f0d3-444d-81ec-f5d8b538f68c", "AssetId": "180c310e-eb1e-4db6-b3e2-5878458dce21" } ] }