Assessment Web API

Methods

Upload Assessment Model

POST https://api-assessments.azurewebsites.net/api/Assessment/UploadAssessmentResults

This endpoint allows you to upload the Assessment Model generated after the execution of a generic product.

Request Body

NameTypeDescription

ProductName

string

The name of the product. For instance: Mobilize.net RapidScan

ProductVersion

string

The version of the product (in X.Y.Z.W format). For instance: 9.8.2.0

CompressedOutputFolder

string

A compressed (ZIP) file that contains the Asssesment Model. The structure of the compressed file is more thoroughly explained below. Must be sent as a Base-64 string.

Email

string

An optional email. It must be the email of the user.

LicenseId

string

The (optional) Id for the license that is being used to executed the product.

{ "message": "Success" }

Download RapidScan Installer

GET https://api-assessments.azurewebsites.net/api/Assessment/DownloadRapidScan

This endpoint allows for the download of the RapidScan installer.

Path Parameters

NameTypeDescription

string

CompressedOutputFolder

The structure for the root directory of the compressed folder is as follows

  • Root

    • execution_errors.pam

    • controller_execution.pam

    • tool_executions.pam

    • Code Model Directory #1

    • Code Model Directory #2

    • ....

    • Code Model Directory #n

Supported Products

  • RapidScan

    • Version >= 10.0.0.0

    • Product name must be one of the following:

      • RapidScan

      • Mobilize.net RapidScan

Other Endpoints

For staging the URL is: https://api-assessments-staging.azurewebsites.net

For development the URL is: https://api-assessments-dev.azurewebsites.net

Technical Details

Results Processor

The Assessment Web API has an abstract class named ResultsProcessor, which follows the Template Method pattern. For each product there should be a concrete class that inherits from ResultsProcessor. For instance, the RapidScanResultsProcessor does that.

The ResultsProcessor has the responsability of processing the results of a call to the UploadAssessmentResults method. The ResultsProcessingService instantiates the correct subclass of ResultsProcessor depending on the name of the Product. If you add support for a new product, you should make sure to create a subclass of ResultsProcessor and instantiate it in the ResultsProcessingService. Also, add the product to the list of Supported Products (above)

Application Insights Resources

For production, the Application Insights resource can be found at this URL: https://portal.azure.com/#@mobilize.net/resource/subscriptions/b68b47f1-1dd5-441a-9444-3101fc7d7bce/resourcegroups/GenericInfrastructureBackendRG/providers/microsoft.insights/components/AssessmentWebAPI/users

For development and staging, the Application Insights resource can be found at this URL: https://portal.azure.com/#@mobilize.net/resource/subscriptions/b68b47f1-1dd5-441a-9444-3101fc7d7bce/resourcegroups/GenericInfrastructureBackendRG/providers/microsoft.insights/components/AssessmentWebAPI_staging/overview

Last updated