Group

This documentation is currently outdated and in the process of being updated. This documentation is provided as a temporary reference to various API endpoints and output. This warning will be at the top of each outdated page. As the documentation is updated, this warning will be removed.

Groups provide a way to organize the asset and application data within the platform in a way that makes the most sense for an organization. A group is a data grouping that places all assets or applications logically within a specific data container in the platform. All the vulnerabilities belonging to those assets or applications are linked to that group as well. Assets and applications can now reside in multiple groups.

Creating a Group

Create a new group for the designated client.

The assetCriticality field is deprecated, and its value sent in the request has no significance. To support backward compatibility, the response has assetCriticality value defaults to 1.

API Call: POST/client/{clientId}/group

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group

URL Parameters

Name Description Additional Information
PLATFORM Platform number. Endpoint URL Structure
CLIENTID Client ID number. Finding Your Client ID

Required Privileges

The privilege required to create a group is:

  • Group Control

API Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
APIKEY Your API key. string Y Generating an API Token
CLIENTID Client ID number. integer Y Finding Your Client ID
GROUPNAME Group name. string Y
ASSETCRITICALITY Group asset criticality. integer Y Deprecated/Not Used. Defaults to 1.

cURL

cURL Sample create_group Snippet

Replace angle bracket parameters with your own values.

cURL Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
CLIENTID Client ID number. integer Y Finding Your Client ID
APIKEY Your API key. string Y Generating an API Token
GROUPNAME Group name. string Y
ASSETCRITICALITY Group asset criticality. integer N Deprecated/Not Used. Defaults to 1.

Response Parameters

Sample Response

Copy

{
  "id": <GROUPID>,
  "clientId": <CLIENTID>,
  "name": "<GROUPNAME>",
  "assetCriticality": <ASSETCRITICALITY>
}

Name Description Type Additional Information
GROUPID Group ID number. integer
CLIENTID Client ID number. integer
GROUPNAME Group name. string
ASSETCRITICALITY Group asset criticality. integer Deprecated/Not Used. Defaults to 1.

HTTP Status Codes

Code Description
201 Success

201 Sample Response

Copy

{
  "id": 12,
  "name": "Example Group",
  "assetCriticality": 1,
  "clientId": 5
}

Code Description
400 User Error

400 Sample Response

Copy
{
  "status": 0,
  "path": "string",
  "errors": [
    {
      "field": "string",
      "code": "string"
    }
  ]
}
Code Description
401 Unauthorized
409 Conflict

Updating a Single Group

Update a single group within the designated client.

The assetCriticality field is deprecated, and its value sent in the request has no significance. To support backward compatibility, the response has assetCriticality value defaults to 1.

API Call: PUT/client/{clientId}/group/{groupId}

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/<GROUPID>

URL Parameters

Name Description Additional Information
PLATFORM Platform number. Endpoint URL Structure
CLIENTID Client ID number. Finding Your Client ID
GROUPID Group ID number. Searching for a Group

Required Privileges

The privilege required to update a group is:

  • Group Control

API Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
APIKEY Your API key. string Y Generating an API Token
CLIENTID Client ID number. integer Y Finding Your Client ID
GROUPID Group ID number. integer Y Searching for a Group
GROUPNAME Group name. string Y
ASSETCRITICALITY Group asset criticality. integer N Deprecated/Not Used. Defaults to 1.

cURL

cURL Sample update_group Snippet

Copy

curl -X PUT "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/<GROUPID>" \
  -H  "accept: application/json" \
  -H  "x-api-key: <APIKEY>" \
  -H  "Content-Type: application/json" \
  -d "{  \"name\": \"<GROUPNAME>\",  \"assetCriticality\": <ASSETCRITICALITY>}"

Replace angle bracket parameters with your own values.

cURL Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
CLIENTID Client ID number. integer Y Finding Your Client ID
APIKEY Your API key. string Y Generating an API Token
GROUPID Group ID number. integer Y Searching for a Group
GROUPNAME Group name. string Y
ASSETCRITICALITY Group asset criticality. integer Y Deprecated/Not Used. Defaults to 1.

###Response Parameters###

Sample Response

Copy

{
  "id": <ID>,
  "created": "<CREATED>"
}

Name Description Type Additional Information
ID Job ID number. integer
Created Date/Time job created. string($date-time)

HTTP Status Codes

Code Description
201 Success

201 Sample Response

Copy
{
  "id": 0,
  "created": "2019-09-17T07:18:57.845Z"
}

Code Description
400 User Error

400 Sample Response

Copy

{
  "status": 0,
  "path": "string",
  "errors": [
    {
      "field": "string",
      "code": "string"
    }
  ]
}

Code Description
401 Unauthorized
409 Conflict

Listing Group Projections and Their Models

List group projections and their models that can be requested from the search endpoint.

API Call: GET/client/{clientId}/group/model

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/model

URL Parameters

Name Description Additional Information
PLATFORM Platform number. Endpoint URL Structure
CLIENTID Client ID number. Finding Your Client ID

Required Privileges

The privilege required to list group projections and their models is:

  • Group Control

API Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
APIKEY Your API key. string Y Generating an API Token
CLIENTID Client ID number. integer Y Finding Your Client ID

cURL

cURL Sample group_projections Snippet

Copy

curl -X GET "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/model"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"

Replace angle bracket parameters with your own values.

cURL Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
CLIENTID Client ID number. integer Y Finding Your Client ID
APIKEY Your API key. string Y Generating an API Token

Response Parameters

Sample Response

Copy
{
  "subject": "group",
  "projections": [
    {
      "name": "basic",
      "fields": [
        {
          "field": "id",
          "type": "int",
          "nested": []
        },
        {
          "field": "clientId",
          "type": "int",
          "nested": []
        },
        {
          "field": "name",
          "type": "string",
          "nested": []
        },
        {
          "field": "criticality",
          "type": "int",
          "nested": []
        }
      ]
    },
    {
      "name": "detail",
      "fields": [
        {
          "field": "id",
          "type": "int",
          "nested": []
        },
        {
          "field": "clientId",
          "type": "int",
          "nested": []
        },
        {
          "field": "name",
          "type": "string",
          "nested": []
        },
        {
          "field": "criticality",
          "type": "int",
          "nested": []
        },
        {
          "field": "groupsId",
          "type": "int",
          "nested": []
        },
        {
          "field": "lastModified",
          "type": "string",
          "nested": []
        },
        {
          "field": "defaultGroup",
          "type": "boolean",
          "nested": []
        },
        {
          "field": "assessments",
          "type": "EmbeddedAssessmentDetail",
          "nested": [
            {
              "field": "total",
              "type": "int",
              "nested": []
            },
            {
              "field": "detail",
              "type": "EmbeddedAssessment[]",
              "nested": []
            }
          ]
        },
        {
          "field": "users",
          "type": "EmbeddedUserDetail[]",
          "nested": []
        },
        {
          "field": "hostFinding",
          "type": "FindingsDistribution",
          "nested": [
            {
              "field": "total",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "critical",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "high",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "medium",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "low",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "info",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            }
          ]
        },
        {
          "field": "applicationFinding",
          "type": "FindingsDistribution",
          "nested": [
            {
              "field": "total",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "critical",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "high",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "medium",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "low",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "info",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            }
          ]
        },
        {
          "field": "databaseFinding",
          "type": "FindingsDistribution",
          "nested": [
            {
              "field": "total",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "critical",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "high",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "medium",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "low",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            },
            {
              "field": "info",
              "type": "EmbeddedSeverityGroup",
              "nested": [
                {
                  "field": "value",
                  "type": "int",
                  "nested": []
                },
                {
                  "field": "subject",
                  "type": "string",
                  "nested": []
                },
                {
                  "field": "filter",
                  "type": "string",
                  "nested": []
                }
              ]
            }
          ]
        },
        {
          "field": "uniqueHostFinding",
          "type": "EmbeddedUniqueFindingTotals",
          "nested": [
            {
              "field": "total",
              "type": "int",
              "nested": []
            },
            {
              "field": "critical",
              "type": "int",
              "nested": []
            },
            {
              "field": "high",
              "type": "int",
              "nested": []
            },
            {
              "field": "medium",
              "type": "int",
              "nested": []
            },
            {
              "field": "low",
              "type": "int",
              "nested": []
            },
            {
              "field": "info",
              "type": "int",
              "nested": []
            }
          ]
        },
        {
          "field": "uniqueApplicationFinding",
          "type": "EmbeddedUniqueFindingTotals",
          "nested": [
            {
              "field": "total",
              "type": "int",
              "nested": []
            },
            {
              "field": "critical",
              "type": "int",
              "nested": []
            },
            {
              "field": "high",
              "type": "int",
              "nested": []
            },
            {
              "field": "medium",
              "type": "int",
              "nested": []
            },
            {
              "field": "low",
              "type": "int",
              "nested": []
            },
            {
              "field": "info",
              "type": "int",
              "nested": []
            }
          ]
        },
        {
          "field": "uniqueDatabaseFinding",
          "type": "EmbeddedUniqueFindingTotals",
          "nested": [
            {
              "field": "total",
              "type": "int",
              "nested": []
            },
            {
              "field": "critical",
              "type": "int",
              "nested": []
            },
            {
              "field": "high",
              "type": "int",
              "nested": []
            },
            {
              "field": "medium",
              "type": "int",
              "nested": []
            },
            {
              "field": "low",
              "type": "int",
              "nested": []
            },
            {
              "field": "info",
              "type": "int",
              "nested": []
            }
          ]
        },
        {
          "field": "rs3",
          "type": "int",
          "nested": []
        },
        {
          "field": "hostRs3",
          "type": "int",
          "nested": []
        },
        {
          "field": "appRs3",
          "type": "int",
          "nested": []
        },
        {
          "field": "dbRs3",
          "type": "int",
          "nested": []
        },
        {
          "field": "totalAssets",
          "type": "int",
          "nested": []
        },
        {
          "field": "rs3_1_1",
          "type": "Object",
          "nested": []
        },
        {
          "field": "rs3_1_1_updated",
          "type": "string",
          "nested": []
        },
        {
          "field": "host",
          "type": "EmbeddedSeverityGroup",
          "nested": [
            {
              "field": "value",
              "type": "int",
              "nested": []
            },
            {
              "field": "subject",
              "type": "string",
              "nested": []
            },
            {
              "field": "filter",
              "type": "string",
              "nested": []
            }
          ]
        },
        {
          "field": "application",
          "type": "EmbeddedSeverityGroup",
          "nested": [
            {
              "field": "value",
              "type": "int",
              "nested": []
            },
            {
              "field": "subject",
              "type": "string",
              "nested": []
            },
            {
              "field": "filter",
              "type": "string",
              "nested": []
            }
          ]
        },
        {
          "field": "database",
          "type": "EmbeddedSeverityGroup",
          "nested": [
            {
              "field": "value",
              "type": "int",
              "nested": []
            },
            {
              "field": "subject",
              "type": "string",
              "nested": []
            },
            {
              "field": "filter",
              "type": "string",
              "nested": []
            }
          ]
        },
        {
          "field": "criticalHostsCount",
          "type": "int",
          "nested": []
        }
      ]
    }
  ]
}
Name Description Type Additional Information
ID Group ID number. integer
CLIENTID Client ID number. integer
NAME Group name. string
CRITICALITY Group criticality. integer
LASTMODIFIED Date last modified. string
DEFAULTGROUP Default group. boolean Options: True = Yes, False = No
ASSESSMENTS Values: Total, Detail integer
HOSTFINDING Values: Value, Subject, Filter Types: Critical, High, Medium, Low, Info
APPLICATIONFINDING Values: Value, Subject, Filter Types: Critical, High, Medium, Low, Info
DATABASEFINDING Values: Value, Subject, Filter Types: Critical, High, Medium, Low, Info
UNIQUEHOSTFINDING Values: Total, Critical, High, Medium, Low, Info
UNIQUEAPPLICATIONFINDING Values: Total, Critical, High, Medium, Low, Info
UNIQUEDATABASEFINDING Values: Total, Critical, High, Medium, Low, Info
RS3 RiskSense Security Score integer
HOSTRS3 Host RS3 integer
APPRS3 Application RS3 integer
DBRS3 Database RS3 integer
RS3_1_1 RS3 1.1 object
RS3_1_1_updated RS3 1.1 Updated string
HOST Host Values: Value, Subject, Filter
APPLICATION Application Values: Value, Subject, Filter
DATABASE Database Values: Value, Subject, Filter
CRITICALHOSTSCOUNT Critical host count integer

HTTP Status Codes

Code Description
200 OK

200 Sample Response

Copy
{
  "projections": [
    {
      "name": "basic",
      "fields": [
        {
          "field": "id",
          "type": "integer"
        },
        {
          "field": "name",
          "type": "string"
        }
      ]
    }
  ]
}
Code Description
401 Unauthorized
404 Not Found

Listing Filterable Group Fields

Displays the fields that the search endpoint can filter by.

API Call: GET/client/{clientId}/group/filter

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/filter

URL Parameters

Name Description Additional Information
PLATFORM Platform number. Endpoint URL Structure
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user roles that can list group fields that can be filtered by are:

  • Manager
  • Group Manager
  • User

Python

Python Sample list_groupfields Snippet

Copy

import requests

platform = 'https://platform<PLATFORM>.risksense.com'
api_key = '<APIKEY>'
client_id = <CLIENTID>

header = {
    "x-api-key": api_key,
    "content-type": "application/json"
}

url = platform + "/api/v1/client/" + str(client_id) + "/group/filter"

response = requests.get(url, headers=header)

Replace angle bracket parameters with your own values.

Python Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
APIKEY Your API key. string Y Generating an API Token
CLIENTID Client ID number. integer Y Finding Your Client ID

cURL

cURL Sample list_groupfields Snippet

Copy

curl -X GET "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/filter"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"

Replace angle bracket parameters with your own values.

cURL Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
CLIENTID Client ID number. integer Y Finding Your Client ID
APIKEY Your API key. string Y Generating an API Token

Response Parameters

Sample Response

Copy

[
  {
    "name": "AF Critical",
    "legacyUid": "app_critical_total",
    "uid": "app_critical_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Application critical count"
  },
  {
    "name": "AF High",
    "legacyUid": "app_high_total",
    "uid": "app_high_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Application high count"
  },
  {
    "name": "AF Info",
    "legacyUid": "app_info_total",
    "uid": "app_info_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Application info count"
  },
  {
    "name": "AF Low",
    "legacyUid": "app_low_total",
    "uid": "app_low_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Application low count"
  },
  {
    "name": "AF Medium",
    "legacyUid": "app_medium_total",
    "uid": "app_medium_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Application medium count"
  },
  {
    "name": "AF Total",
    "legacyUid": "app_finding_total",
    "uid": "app_finding_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Total application findings"
  },
  {
    "name": "Allowed Users",
    "legacyUid": "assignments",
    "uid": "assignments",
    "operators": [
      "EXACT",
      "IN",
      "LIKE",
      "WILDCARD"
    ],
    "type": "string",
    "description": "Filters Groups by whoever has access to the group."
  },
  {
    "name": "Application",
    "legacyUid": "app_count_total",
    "uid": "app_count_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Total application count"
  },
  {
    "name": "Assessment",
    "legacyUid": "assessment_labels",
    "uid": "assessment_labels",
    "operators": [
      "EXACT",
      "IN",
      "LIKE",
      "WILDCARD"
    ],
    "type": "string",
    "description": "Assessment name under group(s)"
  },
  {
    "name": "Assets",
    "legacyUid": "asset_total",
    "uid": "asset_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Total Asset count"
  },
  {
    "name": "Criticality",
    "legacyUid": "criticality",
    "uid": "criticality",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Filters Groups by criticality"
  },
  {
    "name": "DF Critical",
    "legacyUid": "db_critical_total",
    "uid": "db_critical_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Database critical count"
  },
  {
    "name": "DF High",
    "legacyUid": "db_high_total",
    "uid": "db_high_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Database high count"
  },
  {
    "name": "DF Info",
    "legacyUid": "db_info_total",
    "uid": "db_info_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Database info count"
  },
  {
    "name": "DF Low",
    "legacyUid": "db_low_total",
    "uid": "db_low_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Database low count"
  },
  {
    "name": "DF Medium",
    "legacyUid": "db_medium_total",
    "uid": "db_medium_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Database medium count"
  },
  {
    "name": "DF Total",
    "legacyUid": "db_finding_total",
    "uid": "db_finding_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Total Database findings"
  },
  {
    "name": "Database",
    "legacyUid": "db_count_total",
    "uid": "db_count_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Total database count"
  },
  {
    "name": "HF Critical",
    "legacyUid": "host_critical_total",
    "uid": "host_critical_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Host critical count"
  },
  {
    "name": "HF High",
    "legacyUid": "host_high_total",
    "uid": "host_high_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Host high count"
  },
  {
    "name": "HF Info",
    "legacyUid": "host_info_total",
    "uid": "host_info_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Host info count"
  },
  {
    "name": "HF Low",
    "legacyUid": "host_low_total",
    "uid": "host_low_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Host low count"
  },
  {
    "name": "HF Medium",
    "legacyUid": "host_medium_total",
    "uid": "host_medium_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Host medium count"
  },
  {
    "name": "HF Total",
    "legacyUid": "host_finding_total",
    "uid": "host_finding_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Total host findings"
  },
  {
    "name": "Host",
    "legacyUid": "host_count_total",
    "uid": "host_count_total",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "Total host count"
  },
  {
    "name": "Id",
    "legacyUid": "id",
    "uid": "id",
    "operators": [
      "EXACT",
      "IN"
    ],
    "type": "string",
    "description": ""
  },
  {
    "name": "Name",
    "legacyUid": "name",
    "uid": "name",
    "operators": [
      "EXACT",
      "IN",
      "LIKE",
      "WILDCARD"
    ],
    "type": "string",
    "description": "Filters Groups by name"
  },
  {
    "name": "RS3",
    "legacyUid": "rs3",
    "uid": "rs3",
    "operators": [
      "EXACT",
      "IN",
      "RANGE"
    ],
    "type": "string",
    "description": "RS3 by Group"
  }
]

Name Description Additional Information
AFCRITICAL UID: app_critical_total Filter Options: Exact, In, Range
AFHIGH UID: app_high_total Filter Options: Exact, In, Range
AFMEDIUM UID: app_medium_total Filter Options: Exact, In, Range
AFLOW UID: app_low_total Filter Options: Exact, In, Range
AFINFO UID: app_info_total Filter Options: Exact, In, Range
AFTOTAL UID: app_finding_total Filter Options: Exact, In, Range
ALLOWEDUSERS UID: assignments Filter Options: Exact, In, Like, Wildcard
APPLICATION UID: app_count_total Filter Options: Exact, In, Range
ASSESSMENT UID: assessment_labels Filter Options: Exact, In, Like, Wildcard
ASSETS UUID: asset_total Filter Options: Exact, In, Range
CRITICALITY UUID: criticality Filter Options: Exact, In, Range
DFCRITICAL UUID: db_critical_total Filter Options: Exact, In, Range
DFHIGH UUID: db_high_total Filter Options: Exact, In, Range
DFMEDIUM UUID: db_medium_total Filter Options: Exact, In, Range
DFLOW UUID: db_low_total Filter Options: Exact, In, Range
DFINFO UUID: db_info_total Filter Options: Exact, In, Range
DFTOTAL UUID: db_finding_total Filter Options: Exact, In, Range
DATABASE UUID: db_count_total Filter Options: Exact, In, Range
HFCRITICAL UUID: host_critical_total Filter Options: Exact, In, Range
HFHIGH UUID: host_high_total Filter Options: Exact, In, Range
HFMEDIUM UUID: host_medium_total Filter Options: Exact, In, Range
HFLOW UUID: host_low_total Filter Options: Exact, In, Range
HFINFO UUID: host_info_total Filter Options: Exact, In, Range
HFTOTAL UUID: host_finding_total Filter Options: Exact, In, Range
HOST UUID: host_count_total Filter Options: Exact, In, Range
ID UUID: id Filter Options: Exact, In
NAME UUID: name Filter Options: Exact, In, Like, Wildcard
RS3 UUID: rs3 Filter Options: Exact, In, Range

HTTP Status Codes

Code Description
200 OK

200 Sample Response

Copy
[
  {
    "name": "id",
    "uid": "id",
    "operator": [
      "EXACT",
      "IN"
    ],
    "type": "integer",
    "description": "The id"
  }
]
Code Description
401 Unauthorized
404 Not Found

Suggesting Filter Values for Group Filtering

Displays suggested filter values when filtering groups.

API Call: POST/client/{clientId}/group/suggest

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/suggest

URL Parameters

Name Description Additional Information
PLATFORM Platform number. Endpoint URL Structure
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user roles that can view suggested filter values for groups are:

  • Manager
  • Group Manager
  • User

Python

Python Sample filter_groupvalues Snippet

Copy

import json
import requests

platform = 'https://platform<PLATFORM>.risksense.com'
api_key = '<APIKEY>'
client_id = <CLIENTID>

header = {
    "x-api-key": api_key,
    "content-type": "application/json"
}

body = {
    "filters": [
        {
            "field": "<FIELD>",
            "exclusive": <EXCLUSIVE>,
            "operator": "<OPERATOR>",
            "value": "<VALUE>"
        }
    ]
}

url = platform + "/api/v1/client/" + str(client_id) + "/group/suggest"

response = requests.post(url, headers=header, data=json.dumps(body))

Replace angle bracket parameters with your own values.

Python Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
APIKEY Your API key. string Y Generating an API Token
CLIENTID Client ID number. integer Y Finding Your Client ID
FIELD Filter category. string Y
EXCLUSIVE Exclusive. boolean Y Options: True = Exclude values listed in the VALUE field, False = Filter based on VALUE field.
OPERATOR Search operator. string Y Options: EXACT, IN, LIKE, WILDCARD, RANGE, CIDR
VALUE Search value. string Y

cURL

cURL Sample filter_groupvalues Snippet

Copy

curl -X POST "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/suggest"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"
  -H  "Content-Type: application/json"
  -d "{  \"filters\": [    {      \"field\": \"<FIELD>\",      \"exclusive\": <EXCLUSIVE>,      \"operator\": \"<OPERATOR>\",      \"value\": \"<VALUE>\"    }  ],  \"filter\": {    \"field\": \"<FIELD>\",    \"exclusive\": <EXCLUSIVE>,    \"operator\": \"<OPERATOR>\",    \"value\": \"<VALUE>\"  }}"

Replace angle bracket parameters with your own values.

cURL Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
CLIENTID Client ID number. integer Y Finding Your Client ID
APIKEY Your API key. string Y Generating an API Token
FIELD Filter category. string Y
EXCLUSIVE Exclusive. boolean Y Options: True = Exclude values listed in the VALUE field, False = Filter based on VALUE field.
OPERATOR Search operator. string Y Options: EXACT, IN, LIKE, WILDCARD, RANGE, CIDR
VALUE Search value. string Y

Response Parameters

Sample Response

Copy

[
  {
    "key": "<KEY>",
    "count": <COUNT>
  }
]

Name Description Type Additional Information
KEY Value for the field requested. string
COUNT Count. integer($int64)

HTTP Status Codes

Code Description
200 OK

200 Sample Response

Copy
[
  {
    "key": "string",
    "count": 0
  }
]
Code Description
400 Bad Request
401 Unauthorized
404 Not Found

Searching for a Group

Search for a group within the designated client.

API Call: POST/client/{clientId}/group/search

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/search

URL Parameters

Name Description Additional Information
PLATFORM Platform number. Endpoint URL Structure
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user roles that can search for a group are:

  • Manager
  • Group Manager
  • User

Python

Python Sample search_group Snippet

Copy

import json
import requests
platform = 'https://platform<PLATFORM>.risksense.com'
api_key = '<APIKEY>'
client_id = <CLIENTID>

header = {
    "x-api-key": api_key,
    "content-type": "application/json"
}

body = {
    "filters": [
        {
            "field": "<FIELD>",
            "exclusive": <EXCLUSIVE>,
            "operator": "<OPERATOR>",
            "value": "<VALUE>,<VALUE>"
        }
    ],
    "projection": "<PROJECTION>",
    "sort": [
        {
            "field": "<SORTFIELD>",
            "direction": "<SORTDIRECTION>"
        }
    ],
    "page": <PAGENUMBER>,
    "size": <PAGESIZE>
}

url = platform + "/api/v1/client/" + str(client_id) + "/group/search"

response = requests.post(url, headers=header, data=json.dumps(body))

Make sure to replace the angle bracket parameters here with your own values.

Python Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
APIKEY Your API key. string Y Generating an API Token
CLIENTID Client ID number. integer Y Finding Your Client ID
FIELD Filter category. string Y
EXCLUSIVE Exclusive. boolean Y Options: True = Exclude values listed in the VALUE field, False = Filter based on VALUE field.
OPERATOR Search operator. string Y Options: EXACT, IN, LIKE, WILDCARD, RANGE, CIDR
VALUE Search value. string Y
PROJECTION Projection type. string Y Options: basic, detailed
SORTFIELD Field to sort. string Y
SORTDIRECTION Sort direction. string Y Options: ASC, DESC
PAGENUMBER Page to view. integer Y First Page: 0
PAGESIZE Page size requested. integer Y Shows how many items to display on the page.

cURL

cURL Sample search_group Snippet

Copy

curl -X POST "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/search"
  -H "accept: application/json"
  -H "x-api-key: <APIKEY>"
  -H "Content-Type: application/json"
  -d "{ \"projection\": \"<PROJECTION>\", \"sort\": [ { \"field\": \"<SORTFIELD>\", \"direction\": \"<SORTDIRECTION>\" } ], \"page\": <PAGENUMBER>, \"size\": <PAGESIZE>}"

Replace angle bracket parameters with your own values.

cURL Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
APIKEY Your API key. string Y Generating an API Token
CLIENTID Client ID number. integer Y Finding Your Client ID
PROJECTION Projection type. string Y Options: basic, detailed
SORTFIELD Field to sort. string Y
SORTDIRECTION Sort direction. string Y Options: ASC, DESC
PAGENUMBER Page to view. integer Y First Page: 0
PAGESIZE Page size requested. integer Y Shows how many items to display on the page.

Response Parameters

Sample Response

Copy

{
  "errors": [],
  "page": {
    "size": <PAGESIZE>,
    "totalElements": <TOTALELEMENTS>,
    "totalPages": <TOTALPAGES>,
    "number": <PAGENUMBER>
  },
  "_embedded": {
    "groups": [
      {
        "id": <GROUPID>,
        "clientId": <CLIENTID>,
        "name": "<GROUPNAME>",
        "criticality": <GROUPCRITICALITY>
      }
    ]
  },
  "_links": {
    "self": {
      "href": "http://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/search?page=<PAGENUMBER>&size=<PAGESIZE>&sort=<SORTFIELD>,<SORTDIRECTION>"
    }
  }
}

Name Description Type Additional Information
PAGESIZE Page size requested. integer Shows how many items to display on the page.
TOTALELEMENTS Total number of items available. integer
TOTALPAGES Total number of pages available. integer
PAGENUMBER Page to view. integer First Page: 0
GROUPID Group ID number. integer
CLIENTID Client ID number. integer
GROUPNAME Group name. string
GROUPCRITICALITY Group criticality.
PLATFORM Platform number. integer
SORTFIELD Field to sort by. string
SORTDIRECTION Sort direction. string Options: ASC, DESC

HTTP Status Codes

Code Description
200 OK

200 Sample Response

Copy
{
  "_embedded": {
    "strings": [
      {}
    ]
  },
  "page": {
    "size": 0,
    "totalElements": 0,
    "totalPages": 0,
    "number": 0
  },
  "errors": [
    {
      "id": "string",
      "errorRefId": "string",
      "code": 0,
      "cause": "string"
    }
  ]
}
Code Description
400 Bad Request
401 Unauthorized
404 Not Found

Assigning Groups

Assigning users to a group/groups.

API Call: POST/client/{clientId}/group/assign

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/assign

URL Parameters

Name Description Additional Information
PLATFORM Platform number. Endpoint URL Structure
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user roles that can assign groups are:

  • Manager
  • Group Manager
  • User

Python

Python Sample assign_group Snippet

Copy

import json
import requests
platform = 'https://platform<PLATFORM>.risksense.com'
api_key = '<APIKEY>'
client_id = <CLIENTID>

user_id_list = [<USERID>,<USERID>]

header = {
    "x-api-key": api_key,
    "content-type": "application/json"
}

body = {
    "filters": [
        {
            "field": "<FIELD>",
            "exclusive": <EXCLUSIVE>,
            "operator": "<OPERATOR>",
            "value": "<VALUE>"
        }
    ],
    "userIds": user_id_list
}

url = platform + "/api/v1/client/" + str(client_id) + "/group/assign"

response = requests.post(url, headers=header, data=json.dumps(body))

Replace angle bracket parameters with your own values.

Python Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
APIKEY Your API key. string Y Generating an API Token
CLIENTID Client ID number. integer Y Finding Your Client ID
USERID User ID(s) to assign. integer Y Searching for Users
FIELD Filter category. string Y
EXCLUSIVE Exclusive. boolean Y Options: True = Exclude values listed in the VALUE field, False = Filter based on VALUE field.
OPERATOR Search operator. string Y Options: EXACT, IN, LIKE, WILDCARD, RANGE, CIDR
VALUE Search value. string Y

cURL

cURL Sample assign_group Snippet

Copy

curl -X POST "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/assign"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"
  -H  "Content-Type: application/json"
  -d "{  \"filters\": [    {      \"field\": \"<FIELD>\",      \"exclusive\": <EXCLUSIVE>,      \"operator\": \"<OPERATOR>\",      \"value\": \"<VALUE>\"    }  ],  \"userIds\": [    <USERID>  ]}"

Replace angle bracket parameters with your own values.

cURL Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
CLIENTID Client ID number. integer Y Finding Your Client ID
APIKEY Your API key. string Y Generating an API Token
FIELD Filter category. string Y
EXCLUSIVE Exclusive. boolean Y Options: True = Exclude values listed in the VALUE field, False = Filter based on VALUE field.
OPERATOR Search operator. string Y Options: EXACT, IN, LIKE, WILDCARD, RANGE, CIDR
VALUE Search value. string Y
USERID User ID(s) to assign. integer Y Searching for Users

Response Parameters

Sample Response

Copy

{
  "id": <ID>,
  "created": "<CREATED>"
}

Name Description Type Additional Information
ID Job ID number. integer
Created Date/Time job created. string($date-time)

HTTP Status Codes

Code Description
200 Job Created

200 Sample Response

Copy

{
  "id": 0,
  "created": "2019-09-11T21:31:01.129Z"
}

Code Description
400 Bad Request
401 Unauthorized
404 Not Found

Unassigning Groups

Unassigning users from a group/groups.

API Call: POST/client/{clientId}/group/unassign

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/unassign

URL Parameters

Name Description Additional Information
PLATFORM Platform number. Endpoint URL Structure
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user roles that can unassign groups are:

  • Manager
  • Group Manager
  • User

Python

Python Sample unassign_group Snippet

Copy

import json
import requests
platform = 'https://platform<PLATFORM>.risksense.com'
api_key = '<APIKEY>'
client_id = <CLIENTID>

user_id_list = [<USERID>,<USERID>]

header = {
    "x-api-key": api_key,
    "content-type": "application/json"
}

body = {
    "filters": [
        {
            "field": "<FIELD>",
            "exclusive": <EXCLUSIVE>,
            "operator": "<OPERATOR>",
            "value": "<VALUE>,<VALUE>"
        }
    ],
    "userIds": user_id_list
}

url = platform + "/api/v1/client/" + str(client_id) + "/group/unassign"

response = requests.post(url, headers=header, data=json.dumps(body))

Replace angle bracket parameters with your own values.

Python Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
APIKEY Your API key. string Y Generating an API Token
CLIENTID Client ID number. integer Y Finding Your Client ID
USERID User ID number. integer Y Searching for Users
FIELD Filter category. string Y
EXCLUSIVE Exclusive. boolean Y Options: True = Exclude values listed in the VALUE field, False = Filter based on VALUE field.
OPERATOR Search operator. string Y Options: EXACT, IN, LIKE, WILDCARD, RANGE, CIDR
VALUE Search value. string Y

cURL

cURL Sample unassign_group Snippet

Copy

curl -X POST "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/unassign"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"
  -H  "Content-Type: application/json"
  -d "{  \"filters\": [    {      \"field\": \"<FIELD>\",      \"exclusive\": <EXCLUSIVE>,      \"operator\": \"<OPERATOR>\",      \"value\": \"<VALUE>\"    }  ],  \"userIds\": [    <USERID>  ]}"

Replace angle bracket parameters with your own values.

cURL Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
CLIENTID Client ID number. integer Y Finding Your Client ID
APIKEY Your API key. string Y Generating an API Token
FIELD Filter category. string Y
EXCLUSIVE Exclusive. boolean Y Options: True = Exclude values listed in the VALUE field, False = Filter based on VALUE field.
OPERATOR Search operator. string Y Options: EXACT, IN, LIKE, WILDCARD, RANGE, CIDR
VALUE Search value. string Y
USERID User ID number. integer Y Searching for Users

Response Parameters

Sample Response

Copy

{
  "id": <ID>,
  "created": "<CREATED>"
}

Name Description Type Additional Information
ID Job ID number. integer
Created Date/Time job created. string($date-time)

HTTP Status Codes

Code Description
200 Job Created

200 Sample Response

Copy

{
  "id": 0,
  "created": "2019-09-11T21:36:07.645Z"
}

Code Description
400 Bad Request
401 Unauthorized
404 Not Found

Deleting Groups Matching the Given Filter

Delete groups matching the given filter.

API Call: POST/client/{clientId}/group/delete

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/delete

URL Parameters

Name Description Additional Information
PLATFORM Platform number. Endpoint URL Structure
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user roles that can delete groups matching the given filter are:

  • Group Manager
  • Manager

Python

Python Sample delete_groupbyfilter Snippet

Copy

import json
import requests
platform = 'https://platform<PLATFORM>.risksense.com'
api_key = '<APIKEY>'
client_id = <CLIENTID>

header = {
    "x-api-key": api_key,
    "content-type": "application/json"
}

body = {
    "filterRequest": {
        "filters": [
            {
                "field": "<FIELD>",
                "exclusive": <EXCLUSIVE>,
                "operator": "<OPERATOR>",
                "value": "<VALUE>,<VALUE>"
            }
        ]
    }
}

url = platform + "/api/v1/client/" + str(client_id) + "/group/delete"

response = requests.post(url, headers=header, data=json.dumps(body))

Replace angle bracket parameters with your own values.

Python Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
APIKEY Your API key. string Y Generating an API Token
CLIENTID Client ID number. integer Y Finding Your Client ID
FIELD Filter category. string Y
EXCLUSIVE Exclusive. boolean Y Options: True = Exclude values listed in the VALUE field, False = Filter based on VALUE field.
OPERATOR Search operator. string Y Options: EXACT, IN, LIKE, WILDCARD, RANGE, CIDR
VALUE Search value. string Y

cURL

cURL Sample delete_groupbyfilter Snippet

Copy

curl -X POST "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/group/delete"
  -H  "accept: application/json" \
  -H  "x-api-key: <APIKEY>" \
  -H  "Content-Type: application/json" \
  -d "{  \"filterRequest\": {    \"filters\": [      {        \"field\": \"<FIELD>\",        \"exclusive\": <EXCLUSIVE>,        \"operator\": \"<OPERATOR>\",        \"value\": \"<VALUE>\"      }    ]  }}"

Replace angle bracket parameters with your own values.

cURL Parameters

Name Description Type Required Additional Information
PLATFORM Platform number. integer Y Endpoint URL Structure
CLIENTID Client ID number. integer Y Finding Your Client ID
APIKEY Your API key. string Y Generating an API Token
FIELD Filter category. string Y
EXCLUSIVE Exclusive. boolean Y Options: True = Exclude values listed in the VALUE field, False = Filter based on VALUE field.
OPERATOR Search operator. string Y Options: EXACT, IN, LIKE, WILDCARD, RANGE, CIDR
VALUE Search value. string Y

Response Parameters

Sample Response

Copy

{
  "id": <ID>,
  "created": "<CREATED>"
}

Name Description Type Additional Information
ID Job ID number. integer
Created Date/Time job created. string($date-time)

HTTP Status Codes

Code Description
200 Ok

200 Sample Response

Copy
{
  "projections": [
    {
      "name": "basic",
      "fields": [
        {
          "field": "id",
          "type": "integer"
        },
        {
          "field": "name",
          "type": "string"
        }
      ]
    }
  ]
}
Code Description
401 Unauthorized
404 Not Found