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:
200 OK – Success
- GET /api/v0.1/Advisory/GitHubAdvisories
- Query Parameters:
page (integer)
pageSize (integer)
search (string)
- Status Codes:
200 OK – Success
- GET /api/v0.1/Advisory/GitHubAdvisories/{ghsaId}
- Parameters:
ghsaId (string)
- Status Codes:
200 OK – Success
- GET /api/v0.1/Cve
Retrieves All CVEs.
- Query Parameters:
keyword (string)
startIndex (integer)
resultsPerPage (integer)
- Status Codes:
200 OK – Success
- GET /api/v0.1/Cve/{cveId}
Retrieves cve details based on the cve ID.
- Parameters:
cveId (string) – The ID of the cve.
- Status Codes:
200 OK – Success
- POST /api/v0.1/Device/{id}/addExistingVulnerability/{vul}
Add existing Vulnerability to Device
- Parameters:
id (string)
vul (string)
- Status Codes:
200 OK – Success
- DELETE /api/v0.1/Device/{id}/removeVulnerability/{vul}
Remove Vulnerability from Device
- Parameters:
id (string)
vul (string)
- Status Codes:
200 OK – Success
- DELETE /api/v0.1/DeviceParam
Delete all DeviceParam for logged-in user.
- Status Codes:
200 OK – Success
- GET /api/v0.1/DeviceParam/{id}
GetDeviceParamById
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- PUT /api/v0.1/DeviceParam/{id}
Update DeviceParam
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- DELETE /api/v0.1/DeviceParam/{id}
Delete DeviceParam
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- POST /api/v0.1/DeviceParam/createMultiple
CreateDeviceParams Multiple
- Status Codes:
200 OK – Success
- PUT /api/v0.1/DeviceParam/updateMultiple
update Multiple DeviceParams
- Status Codes:
200 OK – Success
- POST /api/v0.1/Facility
Creates facility with given name in the database.
- Status Codes:
200 OK – Success
- GET /api/v0.1/Facility/{id}
Get facility by id from database.
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- POST /api/v0.1/Facility/{id}/Segment/{segmentId}
Add existing Segment to Facility
- Parameters:
id (string)
segmentId (string)
- Status Codes:
200 OK – Success
- DELETE /api/v0.1/Facility/{id}/Segment/{segmentId}
Remove Segment from Facility
- Parameters:
id (string)
segmentId (string)
- Status Codes:
200 OK – Success
- 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:
200 OK – Success
- POST /api/v0.1/History/connection
CreateSegmentAndDeviceHistoryRecords
- Status Codes:
200 OK – Success
- GET /api/v0.1/History/connection/user/all
GetLastConnectionHistoryForUser
- Status Codes:
200 OK – Success
- GET /api/v0.1/History/connection/user/last
GetLastConnectionHistoryForUser
- Status Codes:
200 OK – Success
- GET /api/v0.1/History/connection/{id}
SegmentHistoryById
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- GET /api/v0.1/History/connection/last/{connectionId}
GetLastSegmentHistoryBySegmentId
- Parameters:
connectionId (string)
- Status Codes:
200 OK – Success
- GET /api/v0.1/History/device/{id}
GetDeviceHistoryById
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- GET /api/v0.1/History/device/last/{deviceId}
GetLastDeviceHistoryByDeviceId
- Parameters:
deviceId (string)
- Status Codes:
200 OK – Success
- GET /api/v0.1/Interface/{id}
GetInterfaceById
- Parameters:
Id (string) – Unique identifier of an Entity.
- Status Codes:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- POST /api/v0.1/Interface/{id}/status/{status}
SetInterfaceStatus
- Parameters:
id (string)
status (string)
- Status Codes:
200 OK – Success
- POST /api/v0.1/Interface/{id}/sync
CreateInterface
- Parameters:
Id (string) – Unique identifier of an Entity.
- Status Codes:
200 OK – Success
- POST /api/v0.1/Location
Creates location with given name in the database.
- Status Codes:
200 OK – Success
- GET /api/v0.1/Location/user/Names
Get all locations for logged-in user.
- Status Codes:
200 OK – Success
- GET /api/v0.1/Location/{id}
Get location by id from database.
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- 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:
200 OK – Success
- POST /api/v0.1/Location/Batch
Creates location with given name in the database.
- Status Codes:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- POST /api/v0.1/Location/{id}/Facility/{facilityId}
Add existing Facility to Location
- Parameters:
id (string)
facilityId (string)
- Status Codes:
200 OK – Success
- DELETE /api/v0.1/Location/{id}/Facility/{facilityId}
Remove Facility from Location
- Parameters:
id (string)
facilityId (string)
- Status Codes:
200 OK – Success
- GET /api/v0.1/Recommendation/{recommendationId}
Retrieves a recommendation by Id.
- Parameters:
recommendationId (string)
- Status Codes:
200 OK – Success
- GET /api/v0.1/Recommendation/getByType/{type}/and/Name/{name}
Retrieves a recommendation by Type And Name.
- Parameters:
type (string)
name (string)
- Status Codes:
200 OK – Success
- PUT /api/v0.1/Recommendation/{id}
Update Recommendation
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- 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:
200 OK – Success
- GET /api/v0.1/Report/{id}
Retrieves report details based on the report id.
- Parameters:
Id (string) – Unique identifier of an Entity.
- Status Codes:
200 OK – Success
- 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:
200 OK – Success
- GET /api/v0.1/Search/user
SearchForLoggedInUser
- Query Parameters:
term (string)
limit (integer)
- Status Codes:
200 OK – Success
- GET /api/v0.1/Segment/user
Retrieves a list of all segments for logged-in user.
- Status Codes:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- DELETE /api/v0.1/SegmentParam
Delete all SegmentParam for logged-in user.
- Status Codes:
200 OK – Success
- GET /api/v0.1/SegmentParam/{id}
GetSegmentParamById
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- PUT /api/v0.1/SegmentParam/{id}
UpdateSegmentParam
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- DELETE /api/v0.1/SegmentParam/{id}
Delete SegmentParam
- Parameters:
id (string)
- Status Codes:
200 OK – Success
- POST /api/v0.1/SegmentParam/createMultiple
CreateSegmentParams Multiple
- Status Codes:
200 OK – Success
- PUT /api/v0.1/SegmentParam/updateMultiple
Update Multiple SegmentParams
- Status Codes:
200 OK – Success
- GET /api/v0.1/Snapshot/segment/{segmentId}/user
Retrieves a list of all segments for logged-in user.
- Parameters:
segmentId (string)
- Status Codes:
200 OK – Success
- POST /api/v0.1/Snapshot/segment/{segmentId}/user/dates
Retrieves a list of all SnapshotSegments for logged-in user.
- Parameters:
segmentId (string)
- Status Codes:
200 OK – Success
- GET /api/v0.1/Snapshot/facility/{facilityId}/user
Retrieves a list of all SnapshotFacility for logged-in user.
- Parameters:
facilityId (string)
- Status Codes:
200 OK – Success
- POST /api/v0.1/Snapshot/facility/{facilityId}/user/dates
Retrieves a list of all SnapshotFacilities for logged-in user.
- Parameters:
facilityId (string)
- Status Codes:
200 OK – Success
- GET /api/v0.1/Snapshot/location/{locationId}/user
Retrieves a list of all SnapshotFacility for logged-in user.
- Parameters:
locationId (string)
- Status Codes:
200 OK – Success
- POST /api/v0.1/Snapshot/location/{locationId}/user/dates
Retrieves a list of all SnapshotLocations for logged-in user.
- Parameters:
locationId (string)
- Status Codes:
200 OK – Success
- POST /api/v0.1/Snapshot/location/all/user/dates
Retrieves a list of SnapshotLocations for logged-in user.
- Status Codes:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- 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:
200 OK – Success
- POST /api/v0.1/User/ForgotPassword
Initiate forget password request.
- Status Codes:
200 OK – Success
- POST /api/v0.1/User/ResetPassword
Initiates user password reset request.
- Status Codes:
200 OK – Success