REST API

Introduction

The Risk by Context™ platform provides a robust and extensible set of RESTful APIs designed to support seamless integration with external systems and applications. These APIs enable programmatic access to all major components and functionalities of the RBC system, allowing for both automation and interoperability across diverse environments.

The API suite covers a broad range of management operations, including:

  • Location and Segment Management: Define and organize network topologies and operational zones.

  • Device Management: Register, update, and monitor connected devices within the infrastructure.

  • Vulnerability Management: Ingest and track vulnerability data for proactive risk evaluation.

  • User and Access Management: Control user roles, permissions, and authentication.

  • Interface Management: Configure external data sources or destinations for context and insight exchange.

  • Report Management: Generate, retrieve, and archive risk-related reports.

  • Risk Insights: Access computed risk scores and contextual intelligence for informed decision-making.

Each API follows RESTful design principles, utilizing standard HTTP methods (GET, POST, PUT, DELETE) and supports secure communication through token-based authentication.

These APIs are ideal for organizations looking to integrate RBC capabilities with existing workflows, such as:

  • Pulling real-time risk scores into SIEM or SoC platforms.

  • Automating device vulnerability ingestion.

  • Synchronizing configuration data across distributed systems.

This chapter provides detailed documentation for each API endpoint, including request parameters, response formats, authentication methods, and usage examples. It is intended for developers, system integrators, and DevOps teams working to embed RBC functionalities into their operational infrastructure.

API Endpoints

GET /api/v0.1/Advisory
Query Parameters:
  • pageNumber (integer)

  • pageSize (integer)

  • searchText (string)

Status Codes:
GET /api/v0.1/Advisory/GitHubAdvisories
Query Parameters:
  • page (integer)

  • pageSize (integer)

  • search (string)

Status Codes:
GET /api/v0.1/Advisory/GitHubAdvisories/{ghsaId}
Parameters:
  • ghsaId (string)

Status Codes:
GET /api/v0.1/Cve

Retrieves All CVEs.

Query Parameters:
  • keyword (string)

  • startIndex (integer)

  • resultsPerPage (integer)

Status Codes:
GET /api/v0.1/Cve/{cveId}

Retrieves cve details based on the cve ID.

Parameters:
  • cveId (string) – The ID of the cve.

Status Codes:
GET /api/v0.1/Device

GetAllDevices

Status Codes:
POST /api/v0.1/Device

CreateDevice

Status Codes:
GET /api/v0.1/Device/user

GetAllDevicesByLoggedInUser

Status Codes:
GET /api/v0.1/Device/{id}

GetDeviceById

Parameters:
  • id (string)

Status Codes:
PATCH /api/v0.1/Device/{id}

Update Device

Parameters:
  • id (string)

Status Codes:
POST /api/v0.1/Device/{id}/addExistingVulnerability/{vul}

Add existing Vulnerability to Device

Parameters:
  • id (string)

  • vul (string)

Status Codes:
DELETE /api/v0.1/Device/{id}/removeVulnerability/{vul}

Remove Vulnerability from Device

Parameters:
  • id (string)

  • vul (string)

Status Codes:
GET /api/v0.1/DeviceParam/names

GetDeviceParamConstants

Status Codes:
GET /api/v0.1/DeviceParam/user

GetAllForLoggedInUser

Status Codes:
GET /api/v0.1/DeviceParam

GetAllDeviceParams

Status Codes:
POST /api/v0.1/DeviceParam

CreateDeviceParam

Status Codes:
DELETE /api/v0.1/DeviceParam

Delete all DeviceParam for logged-in user.

Status Codes:
GET /api/v0.1/DeviceParam/{id}

GetDeviceParamById

Parameters:
  • id (string)

Status Codes:
PUT /api/v0.1/DeviceParam/{id}

Update DeviceParam

Parameters:
  • id (string)

Status Codes:
DELETE /api/v0.1/DeviceParam/{id}

Delete DeviceParam

Parameters:
  • id (string)

Status Codes:
POST /api/v0.1/DeviceParam/createMultiple

CreateDeviceParams Multiple

Status Codes:
PUT /api/v0.1/DeviceParam/updateMultiple

update Multiple DeviceParams

Status Codes:
GET /api/v0.1/Facility

Get all facilities from database.

Status Codes:
POST /api/v0.1/Facility

Creates facility with given name in the database.

Status Codes:
GET /api/v0.1/Facility/user

Get all facilities for logged-in user.

Status Codes:
GET /api/v0.1/Facility/{id}

Get facility by id from database.

Parameters:
  • id (string)

Status Codes:
PATCH /api/v0.1/Facility/{id}

Updates an existing facility with the specified data.

Parameters:
  • id (string) – The unique identifier of the facility to update.

Status Codes:
DELETE /api/v0.1/Facility/delete/{facilityId}

Deletes a facility by its unique identifier.

Parameters:
  • facilityId (string) – The unique identifier of the facility to delete.

Status Codes:
POST /api/v0.1/Facility/{facilityId}/Segment

Add a new segment to the facility specified by its unique identifier.

Parameters:
  • facilityId (string) – The unique identifier of the facility.

Status Codes:
POST /api/v0.1/Facility/{facilityId}/Segment/Batch

Add a new segment to the facility specified by its unique identifier.

Parameters:
  • facilityId (string) – The unique identifier of the facility.

Status Codes:
POST /api/v0.1/Facility/{id}/Segment/{segmentId}

Add existing Segment to Facility

Parameters:
  • id (string)

  • segmentId (string)

Status Codes:
DELETE /api/v0.1/Facility/{id}/Segment/{segmentId}

Remove Segment from Facility

Parameters:
  • id (string)

  • segmentId (string)

Status Codes:
GET /api/v0.1/History/location/facility/create

CreateLocationAndFacilityHistoryRecords only in location and facility level count deeper level low medium high trough Score and get the highest Score from deeper level.

Status Codes:
POST /api/v0.1/History/connection

CreateSegmentAndDeviceHistoryRecords

Status Codes:
GET /api/v0.1/History/connection/all

GetAllSegmentHistories

Status Codes:
GET /api/v0.1/History/connection/user/all

GetLastConnectionHistoryForUser

Status Codes:
GET /api/v0.1/History/connection/user/last

GetLastConnectionHistoryForUser

Status Codes:
GET /api/v0.1/History/connection/{id}

SegmentHistoryById

Parameters:
  • id (string)

Status Codes:
GET /api/v0.1/History/connection/last/{connectionId}

GetLastSegmentHistoryBySegmentId

Parameters:
  • connectionId (string)

Status Codes:
GET /api/v0.1/History/device/all

GetAllDeviceHistories

Status Codes:
GET /api/v0.1/History/device/user/all

GetAllDeviceHistoriesForUser

Status Codes:
GET /api/v0.1/History/device/{id}

GetDeviceHistoryById

Parameters:
  • id (string)

Status Codes:
GET /api/v0.1/History/device/last/{deviceId}

GetLastDeviceHistoryByDeviceId

Parameters:
  • deviceId (string)

Status Codes:
POST /api/v0.1/Import

Add Import Data

Status Codes:
GET /api/v0.1/Interface

GetAllInterfaces

Status Codes:
POST /api/v0.1/Interface

CreateInterface

Status Codes:
GET /api/v0.1/Interface/{id}

GetInterfaceById

Parameters:
  • Id (string) – Unique identifier of an Entity.

Status Codes:
PATCH /api/v0.1/Interface/{id}

Updates an existing interface with the specified data.

Parameters:
  • id (string) – The unique identifier of the interface to update.

Status Codes:
DELETE /api/v0.1/Interface/{id}

Deletes a interface by its unique identifier.

Parameters:
  • id (string) – The unique identifier of the interface to delete.

Status Codes:
GET /api/v0.1/Interface/user

Get all interfaces for logged-in user.

Status Codes:
POST /api/v0.1/Interface/test

TestInterface

Status Codes:
POST /api/v0.1/Interface/{id}/status/{status}

SetInterfaceStatus

Parameters:
  • id (string)

  • status (string)

Status Codes:
POST /api/v0.1/Interface/{id}/sync

CreateInterface

Parameters:
  • Id (string) – Unique identifier of an Entity.

Status Codes:
GET /api/v0.1/Location

Get all locations from database.

Status Codes:
POST /api/v0.1/Location

Creates location with given name in the database.

Status Codes:
GET /api/v0.1/Location/user

Get all locations for logged-in user.

Status Codes:
GET /api/v0.1/Location/user/Names

Get all locations for logged-in user.

Status Codes:
GET /api/v0.1/Location/{id}

Get location by id from database.

Parameters:
  • id (string)

Status Codes:
PATCH /api/v0.1/Location/{id}

Updates an existing location with the specified data.

Parameters:
  • id (string) – The unique identifier of the location to update.

Status Codes:
POST /api/v0.1/Location/Batch

Creates location with given name in the database.

Status Codes:
DELETE /api/v0.1/Location/{locationId}

Deletes a location by its unique identifier.

Parameters:
  • locationId (string) – The unique identifier of the location to delete.

Status Codes:
POST /api/v0.1/Location/{locationId}/Facility

Add a new facility to the location specified by its unique identifier.

Parameters:
  • locationId (string) – The unique identifier of the location.

Status Codes:
POST /api/v0.1/Location/{id}/Facility/{facilityId}

Add existing Facility to Location

Parameters:
  • id (string)

  • facilityId (string)

Status Codes:
DELETE /api/v0.1/Location/{id}/Facility/{facilityId}

Remove Facility from Location

Parameters:
  • id (string)

  • facilityId (string)

Status Codes:
GET /api/v0.1/Recommendation

GetAllRecommendations

Status Codes:
POST /api/v0.1/Recommendation

CreateRecommendation

Status Codes:
GET /api/v0.1/Recommendation/{recommendationId}

Retrieves a recommendation by Id.

Parameters:
  • recommendationId (string)

Status Codes:
GET /api/v0.1/Recommendation/getByType/{type}/and/Name/{name}

Retrieves a recommendation by Type And Name.

Parameters:
  • type (string)

  • name (string)

Status Codes:
PUT /api/v0.1/Recommendation/{id}

Update Recommendation

Parameters:
  • id (string)

Status Codes:
DELETE /api/v0.1/Recommendation/delete/{recommendationId}

Deletes a recommendation by its unique identifier.

Parameters:
  • recommendationId (string) – The unique identifier of the recommendation to delete.

Status Codes:
POST /api/v0.1/Report

Creates a new report.

Status Codes:
GET /api/v0.1/Report/{id}

Retrieves report details based on the report id.

Parameters:
  • Id (string) – Unique identifier of an Entity.

Status Codes:
GET /api/v0.1/Report/Count

Retrieves number of reports for a user.

Status Codes:
GET /api/v0.1/Report/user

Get all locations for logged-in user.

Status Codes:
GET /api/v0.1/Report/Entity/{id}

Retrieves report details based on the report id.

Parameters:
  • Id (string) – Unique identifier of an Entity.

Status Codes:
POST /api/v0.1/Report/SendEmail

Send Report to Email

Status Codes:
GET /api/v0.1/Search/user

SearchForLoggedInUser

Query Parameters:
  • term (string)

  • limit (integer)

Status Codes:
GET /api/v0.1/Segment/user

Retrieves a list of all segments for logged-in user.

Status Codes:
GET /api/v0.1/Segment

Retrieves a list of all non-empty segments.

Status Codes:
POST /api/v0.1/Segment

Creates a new segment

Status Codes:
GET /api/v0.1/Segment/empty

Retrieves a list of all empty segments.

Status Codes:
GET /api/v0.1/Segment/{segmentId}

Retrieves a specific segment by its unique identifier.

Parameters:
  • segmentId (string) – The unique identifier of the segment.

Status Codes:
PUT /api/v0.1/Segment/{segmentId}

Updates an existing segment. NOT Updating the assigned devices!!!

Parameters:
  • segmentId (string) – The unique identifier of the segment to update.

Status Codes:
DELETE /api/v0.1/Segment/{segmentId}

Deletes a segment by its unique identifier.

Parameters:
  • segmentId (string) – The unique identifier of the segment to delete.

Status Codes:
POST /api/v0.1/Segment/{segmentId}/Device

Add a new device to the segment specified by its unique identifier.

Parameters:
  • segmentId (string) – The unique identifier of the segment.

Status Codes:
POST /api/v0.1/Segment/{segmentId}/Device/Batch

Add a new device to the segment specified by its unique identifier.

Parameters:
  • segmentId (string) – The unique identifier of the segment.

Status Codes:
POST /api/v0.1/Segment/{segmentId}/Device/{deviceId}

Add an existing device to segment specified by its unique identifier.

Parameters:
  • segmentId (string) – The unique identifier of the segment to update.

  • deviceId (string) – The unique identifier of the device to add.

Status Codes:
DELETE /api/v0.1/Segment/{segmentId}/Device/{deviceId}

Remove a device from segment

Parameters:
  • segmentId (string) – The unique identifier of the segment to update.

  • deviceId (string) – The unique identifier of the device to remove.

Status Codes:
GET /api/v0.1/SegmentParam/names

GetAlSegmentParams

Status Codes:
GET /api/v0.1/SegmentParam

GetAlConnectionParams

Status Codes:
POST /api/v0.1/SegmentParam

CreateSegmentParam

Status Codes:
DELETE /api/v0.1/SegmentParam

Delete all SegmentParam for logged-in user.

Status Codes:
GET /api/v0.1/SegmentParam/user

GetAllForLoggedInUser

Status Codes:
GET /api/v0.1/SegmentParam/{id}

GetSegmentParamById

Parameters:
  • id (string)

Status Codes:
PUT /api/v0.1/SegmentParam/{id}

UpdateSegmentParam

Parameters:
  • id (string)

Status Codes:
DELETE /api/v0.1/SegmentParam/{id}

Delete SegmentParam

Parameters:
  • id (string)

Status Codes:
POST /api/v0.1/SegmentParam/createMultiple

CreateSegmentParams Multiple

Status Codes:
PUT /api/v0.1/SegmentParam/updateMultiple

Update Multiple SegmentParams

Status Codes:
GET /api/v0.1/Snapshot/segment/{segmentId}/user

Retrieves a list of all segments for logged-in user.

Parameters:
  • segmentId (string)

Status Codes:
POST /api/v0.1/Snapshot/segment/{segmentId}/user/dates

Retrieves a list of all SnapshotSegments for logged-in user.

Parameters:
  • segmentId (string)

Status Codes:
GET /api/v0.1/Snapshot/facility/{facilityId}/user

Retrieves a list of all SnapshotFacility for logged-in user.

Parameters:
  • facilityId (string)

Status Codes:
POST /api/v0.1/Snapshot/facility/{facilityId}/user/dates

Retrieves a list of all SnapshotFacilities for logged-in user.

Parameters:
  • facilityId (string)

Status Codes:
GET /api/v0.1/Snapshot/location/{locationId}/user

Retrieves a list of all SnapshotFacility for logged-in user.

Parameters:
  • locationId (string)

Status Codes:
POST /api/v0.1/Snapshot/location/{locationId}/user/dates

Retrieves a list of all SnapshotLocations for logged-in user.

Parameters:
  • locationId (string)

Status Codes:
POST /api/v0.1/Snapshot/location/all/user/dates

Retrieves a list of SnapshotLocations for logged-in user.

Status Codes:
POST /api/v0.1/Snapshot/segment

CreateSnapshotsForSegmentRecords

Status Codes:
POST /api/v0.1/Snapshot/facility

CreateSnapshotsForFacilityRecords

Status Codes:
POST /api/v0.1/Snapshot/location

CreateSnapshotsForLocationRecords

Status Codes:
DELETE /api/v0.1/Snapshot/segment/delete/{snapshotSegmentId}

Deletes a snapshotSegment by its unique identifier.

Parameters:
  • snapshotSegmentId (string) – The unique identifier of the snapshotSegment to delete.

Status Codes:
DELETE /api/v0.1/Snapshot/facility/delete/{snapshotFacilityId}

Deletes a snapshotFacility by its unique identifier.

Parameters:
  • snapshotFacilityId (string) – The unique identifier of the snapshotFacility to delete.

Status Codes:
DELETE /api/v0.1/Snapshot/location/delete/{snapshotLocationId}

Deletes a snapshotLocation by its unique identifier.

Parameters:
  • snapshotLocationId (string) – The unique identifier of the snapshotLocation to delete.

Status Codes:
POST /api/v0.1/Token

Generates an Access token.

Status Codes:
GET /api/v0.1/User

GetAllUsers

Status Codes:
POST /api/v0.1/User

CreateUser

Status Codes:
GET /api/v0.1/User/{id}

GetUserById

Parameters:
  • id (string)

Status Codes:
POST /api/v0.1/User/ForgotPassword

Initiate forget password request.

Status Codes:
POST /api/v0.1/User/ResetPassword

Initiates user password reset request.

Status Codes:
GET /api/v0.1/Vulnerability

GetAllVulnerabilities

Status Codes:
POST /api/v0.1/Vulnerability

CreateVulnerability

Status Codes:
GET /api/v0.1/Vulnerability/{id}

GetVulnerabilityById

Parameters:
  • id (string)

Status Codes:
PUT /api/v0.1/Vulnerability/{id}

Update Vulnerability

Parameters:
  • id (string)

Status Codes: