Multiple call integrations

Multiple call (or multiple page) integration scripts are a bit more complicated. They require multiple calls to a data source to retrieve data.

Like a single call integration, a multiple call integration must also have retrieveData() implemented. In the body of retrieveData(), the integration will need to make use of the hasMoreData() and setNextRunParameters() methods provided by VulnerabilityIntegrationBase.

The hasMoreData() method accepts a single boolean that instructs the VulnerabilityIntegrationController toinsert additional processes to pull more data. When passing true to hasMoreData(), a call to setNextRunParameters() should be made to provide context to the next process.

The setNextRunParameters() method accepts a single object that provides context information to be used by the next call to retrieveData(). This object is used to pass state to subsequent calls to retrieveData(). An example use case might be to pass an object that indicates the current page number and page size to a web service.

For multiple call integrations, each retrieveData() call should first check the current process’ parameters. The _getProcessParameters() method is provided to all VulnerabilityIntegrationBase as a convenience to get the parameters set by the previous process. If there are no parameters, it would indicate that it is the first process.

Below is a screen shot of a sample multiple call integration script. Extending on the single call integration example, this demonstrates making calls to a REST endpoint that has basic pagination support. It shows how we can get a single page of data, recognize that there is more data to retrieve, and then tell the next process which page to retreive.
Figure 1. Multiple call integration script
Multi-call integration script