Virima API Specification - SensorService Services
The requests documented in this section are directed to
SensorService resources, which represent User addSensor, archiveRisk, editRisk,getAllRiskRecords, getHistory, getRiskProperties,getRiskFilterRecord, getRiskCount, addRiskDashborad,getRiskDashborad, wildCardSearchRisk, getRecordsFromIdsRisk, exportRisk, exportRiskSearch-- as called by a partner or directly by a webapp using the API..
addSensor POST Interface
addProbeService(POST) is called when user is trying to add risk using user credential.
- Checks for mandatory fields(name,owner,project,risk type,status,probability,impact)
- The risk score is calculated if all the mandatory fields are filled.
- else throws an error
Method: POST
Relative URL: sensor/add
Request Headers: Accept, Authorization
Response Headers: Content-Length, Content-Type.
Request Structure:
Field Name | Type | Description |
---|
sensor | Sensor | |
Response Structure:
Field Name | Type | Description |
---|
response | RecordID | |
Example Request:
ADDSENSOR
Host: example.com
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Content-Type : nnn
{
"id":227639224,
"name":"?",
"description":"?",
"scriptText":"?",
"archive":?,
"uniqueId":"?"
}
Example Response:
{
"id":2147483647,
"recordId":"?"
}
archiveSensor POST Interface
archiveRiskService(POST) is called when user wants to delete risk Record.
- It checks for RecordId that the user wants to delete.
If Id is found, then the record is deleted.
else it throws an error
Method: POST
Relative URL: sensor/archive
Request Headers: Accept, Authorization
Response Headers: Content-Length, Content-Type.
Request Structure:
Field Name | Type | Description |
---|
sensorId | RecordID | |
Response Structure:
Field Name | Type | Description |
---|
response | RecordID | |
Example Request:
ARCHIVESENSOR
Host: example.com
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Content-Type : nnn
{
"recordId":"?"
}
Example Response:
{
"id":2147483647,
"recordId":"?"
}
editSensor POST Interface
edit Sensor Service(POST) is called when user wants to edit the risk Record.
- The Id of the Record the user wants to edit is checked.
If Id is found, then the record can be edited.
else it throws an error
- Any field can be edited by the user, if the record with id is found.
Method: POST
Relative URL: sensor/edit
Request Headers: Accept, Authorization
Response Headers: Content-Length, Content-Type.
Request Structure:
Field Name | Type | Description |
---|
sensor | Sensor | |
Response Structure:
Field Name | Type | Description |
---|
response | Response | |
Example Request:
EDITSENSOR
Host: example.com
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Content-Type : nnn
{
"id":2147483647,
"name":"?",
"description":"?",
"scriptText":"?",
"archive":?,
"uniqueId":"?"
}
Example Response:
{
"id":2147483647,
"response":"?"
}