Get Resource Config
Description
Get the list of Risk Management policies triggered by the cloud resource.
The API call requires companyId and roleId which can be retrieved from Get Resource Map
URL
/api/workload/v2/profile/resource/tableView/configAssess
Method: POST
Request Headers
Key |
Value |
Type |
Description |
---|---|---|---|
Authorization | Bearer <Authorization Token> | String | Authorization credential generated by FortiCNP |
Content-Type | application/json | String | |
companyid | <12345> | Integer | Company ID - Company ID can be obtained through Get Resource Map |
roleid |
<12345> |
Long |
Login user identity, can be obtained through Get Resource Map |
resourceid |
<12345> |
Integer |
Resource ID - the resource ID can be retrieved from Get Resource List. |
failedPolicyOnly |
<true/fase> |
Boolean |
Show only the policies that failed the resource when set to "true". Show all policies associated to the resource when set to "false". |
Request Body Parameters
Name | Required | Type | Description |
---|---|---|---|
skip | Optional | integer | Indexes in a result set, used to exclude response from the first N items of a resource collection. |
limit | Optional | integer | Maximum number of returned items. |
orderDirection | Optional | String | The order of the returned resource list, it can be "asc" for ascending order or "dsc" for descending order. |
orderBy | Optional | String | The filter options for the return resource list, available options: "id", "region", "resource_type", risk_level" |
Sample Request
Request URL |
GET https://www.forticnp.com/api/workload/v2/profile/resource/tableView/configAssess |
Request Header |
Authorization: Bearer <Authorization_Token> Content-Type: application/json roleid: 895145 companyid: 895146 resourceid:8497178 |
Request Body |
{ "orderBy": "severity", "orderDirection": "desc", "limit": 50, "skip": 0 } |
Response Variables
Name | Type | Description |
---|---|---|
policyId | String | The policy ID of the policy. |
resourceId | Integer | Resource ID of the cloud resource. |
policyName | String | The Risk Management policy name. |
resoureceId | Integer | The directory path of the resource location. |
resourceName |
String |
The cloud resource name. |
severity |
String |
Severity of the cloud resource. (Informational, Low, Medium, High) |
riskLevel | String | The risk level of the resource rated by FortiCNP (Info, Low, Medium, High) |
description |
String |
The description of the Risk Management policy. |
totalPage | Integer | Total page of searched resources. |
limit | Integer | Maximum number of return resources in one page |
skip | Integer | Indexes in a result set, used to exclude a response from the first N items of a resource collection. |
totalCount | Integer | Total number of resources. |
Sample Response
{
"datas": [
{
"policyId": "137f714b-9f58-4286-8cc5-72f35f981339",
"resourceId": 8497178,
"policyName": "EC2 Instances should not allow all internet traffic without restriction (Only apply to inbound traffic)",
"resourceName": "zmanxiangTesting4",
"resourceType": "EC2 Instance",
"regionName": "us-east-1",
"severity": "Critical",
"pass": false,
"riskLevel": "Critical",
"description": "Check that inbound traffic from the public internet is not allowed through without restriction. This prevents malicious actors from accessing the instance through a brute force attack.",
"service": "EC2",
"category": "EC2",
"lastScanTime": "2022-06-27T17:43:00.000Z",
"serviceLevel": false
}
],
"totalPage": 20,
"limit": 1,
"skip": 0,
"totalCount": 20
}