Connector

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.

The Connector Framework feature allows for quick and automated acquisition of vulnerability scan data. The scanner API connectors keeps a client’s vulnerability data within the RiskSense platform up-to-date with the most current vulnerability data available. These connectors can be configured to run at a set time (Daily), day of the week (Weekly), or monthly. Each connector has its own schedule parameters.

Paginating a Client's Connectors

Paginate a client's connectors.

API Call: GET/client/{clientId}/connector

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

URL Parameters

Name Description Additional Information
PLATFORM Platform number. If you are on platform 1, you do not need to put a number.
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user role that can paginate a client's connectors is:

  • Manager

API Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your API key. Generating an API Token

cURL

cURL Sample paginate_connector Snippet


curl -X GET "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/connector?size=<SIZE>&page=<PAGE>"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"

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

cURL Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your API key. Generating an API Token
SIZE Page size.
PAGE Page number. First page = 0

Response Parameters

Sample Response


{
  "page": {
    "size": <SIZE>,
    "totalElements": <TOTALELEMENTS>,
    "totalPages": <TOTALPAGES>,
    "number": <PAGE>
  },
  "_embedded": {
    "connectors": [
      {
        "id": <CONNECTORID>,
        "name": "<CONNECTORNAME>",
        "type": "<CONNECTORTYPE>",
        "connection": {
          "url": "<CONNECTIONURL>",
          "sslCertificates": <SSLCERTIFICATES>
        },
        "schedule": {
          "enabled": <ENABLED>,
          "type": "<TYPE>",
          "hourOfDay": <HOUROFDAY>,
          "dayOfWeek": <DAYOFWEEK>,
          "dayOfMonth": <DAYOFMONTH>
        },
        "attributes": {
          "username": "<USERNAME>"
        },
        "networkId": <NETWORKID>,
        "autoUrba": <AUTOURBA>,
        "isTagRemovalEnabled": <TAGREMOVALENABLED>
      }
    ]
  },
  "_links": {
    "self": {
      "href": "http://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/connector?page=<PAGE>&size=<SIZE>"
    }
  }
}

Name Description Additional Information
SIZE Page size.
TOTALELEMENTS Total elements on pages.
TOTALPAGES Total amount of pages.
PAGE Page to view. Note that 0 is the first page.
CONNECTORID Connector ID number.
CONNECTORNAME Connector name.
CONNECTORTYPE Connector type.
CONNECTIONURL Connector URL.
SSLCERTIFICATES Base64-encoded SSL Certficate bundle. The certficates can be exported from your browser as a text file.
ENABLED Connector schedule enabled? boolean Options: True, False
TYPE Connector type.
HOUROFDAY Hour of day. integer Range: 0-23. Required for Daily, Weekly, Monthly.
DAYOFWEEK Day of week. integer Range: 1-7. Required for Weekly.
DAYOFMONTH Day of month. integer Range: 1-31. Required for Monthly.
USERNAME
NETWORKID Network ID number. integer
AUTOURBA Auto run Update Remediation by Assessment? boolean Options: True, False
TAGREMOVALENABLED Tag removal enabled? boolean Options: True, False
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID

HTTP Status Codes

Code Description
200 Success

200 Sample Response


{
  "_embedded": {
    "connectors": [
      {
        "id": 12,
        "type": "QUALYS_VULNERABILITY",
        "name": "QV",
        "connection": {
          "url": "https://qualysguard.qg2.apps.qualys.com/"
        },
        "schedule": {
          "type": "DAILY",
          "hourOfDay": 0
        },
        "networkId": -1,
        "attributes": {
          "username": "username",
          "password": "password"
        },
        "autoUrba": true
      }
    ]
  },
  "page": {
    "size": 0,
    "totalElements": 0,
    "totalPages": 0,
    "number": 0
  }
}

Code Description
401 Unauthorized

Creating a New Connector

Create a new connector.

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

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

URL Parameters

Name Description Additional Information
PLATFORM Platform number. If you are on platform 1, you do not need to put a number.
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user role that can create a connector is:

  • Manager

Python

Python Sample create_connector Snippet


TBA

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

Python Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your API key. Generating an API Token

cURL

cURL Sample create_connector Snippet


TBA

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

cURL Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your API key. Generating an API Token

Response Parameters

Sample Response


TBA

Name Description Additional Information
ID Job ID number. integer
CREATED Time and date when job was created. string($date-time)

HTTP Status Codes

Code Description
200 Job Created

200 Sample Response


TBA

Code Description
401 Unauthorized
404 Not Found

Getting One Connector

Short description

API Call: ``

URL: ``

URL Parameters

Name Description Additional Information
PLATFORM Platform number. If you are on platform 1, you do not need to put a number.
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user roles that can ___ are:

  • Group Manager
  • Manager

Python

Python Sample file_details Snippet

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

Python Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your designated API key. Generating an API Token
ASSESSMENTNAME Name of assessment to create.
STARTDATE Assessment start date. Format YYYY-MM-DD.
NOTES Notes about the assessment. Optional

cURL

cURL Sample sample_file Snippet

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

cURL Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your designated API key. Generating an API Token

Response Parameters

Sample Response

Name Description Additional Information
ID Assessment ID number. integer
NAME Name of assessment. string
STARTDATE Assessment start date. Format YYYY-MM-DD. string($date)
NOTES Assessment notes. string
CLIENTID Client ID number. integer

HTTP Status Codes

Code Description
201 Success

201 Sample Response

{
  "id": 12,
  "name": "Q2",
  "startDate": "2018-04-01",
  "notes": "",
  "clientId": 5
}
Code Description
400 User Error

400 Sample Response

{
  "status": 0,
  "path": "string",
  "errors": [
    {
      "field": "string",
      "code": "string"
    }
  ]
}
Code Description
401 Unauthorized
404 Not Found

Updating a Connector

Short description

API Call: ``

URL: ``

URL Parameters

Name Description Additional Information
PLATFORM Platform number. If you are on platform 1, you do not need to put a number.
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user roles that can ----- are:

  • Group Manager
  • Manager

Python

Python Sample file_details Snippet

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

Python Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your designated API key. Generating an API Token
ASSESSMENTNAME Name of assessment to create.
STARTDATE Assessment start date. Format YYYY-MM-DD.
NOTES Notes about the assessment. Optional

cURL

cURL Sample sample_file Snippet

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

cURL Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your designated API key. Generating an API Token

Response Parameters

Sample Response

Name Description Additional Information
ID Assessment ID number. integer
NAME Name of assessment. string
STARTDATE Assessment start date. Format YYYY-MM-DD. string($date)
NOTES Assessment notes. string
CLIENTID Client ID number. integer

HTTP Status Codes

Code Description
201 Success

201 Sample Response

{
  "id": 12,
  "name": "Q2",
  "startDate": "2018-04-01",
  "notes": "",
  "clientId": 5
}
Code Description
400 User Error

400 Sample Response

{
  "status": 0,
  "path": "string",
  "errors": [
    {
      "field": "string",
      "code": "string"
    }
  ]
}
Code Description
401 Unauthorized
404 Not Found

Deleting a Connector

Short description

API Call: ``

URL: ``

URL Parameters

Name Description Additional Information
PLATFORM Platform number. If you are on platform 1, you do not need to put a number.
CLIENTID Client ID number. Finding Your Client ID

User Roles

The user roles that can ______ are:

  • Group Manager
  • Manager

Python

Python Sample file_details Snippet

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

Python Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your designated API key. Generating an API Token
ASSESSMENTNAME Name of assessment to create.
STARTDATE Assessment start date. Format YYYY-MM-DD.
NOTES Notes about the assessment. Optional

cURL

cURL Sample sample_file Snippet

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

cURL Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your designated API key. Generating an API Token

Response Parameters

Sample Response

Name Description Additional Information
ID Assessment ID number. integer
NAME Name of assessment. string
STARTDATE Assessment start date. Format YYYY-MM-DD. string($date)
NOTES Assessment notes. string
CLIENTID Client ID number. integer

HTTP Status Codes

Code Description
201 Success

201 Sample Response

{
  "id": 12,
  "name": "Q2",
  "startDate": "2018-04-01",
  "notes": "",
  "clientId": 5
}
Code Description
400 User Error

400 Sample Response

{
  "status": 0,
  "path": "string",
  "errors": [
    {
      "field": "string",
      "code": "string"
    }
  ]
}
Code Description
401 Unauthorized
404 Not Found