Skip to main content
Skip table of contents

API Calls

The <integration_type> placeholder is to be replaced with either “ghe” (GitHub Enterprise), “gls” (GitLab), or “bb” (Bitbucket).

Health Check APIs

Mend App

wss-<integration_type>-app Container

Request (GET): {wss-<integration_type>-app-container-url}:5678/payload/healthcheck
Response: If the app container is healthy, the response code will be 200.

wss-scanner Container

NOTE: This Health Check API is only supported from version 19.10.1.

Request (GET): {wss-scanner-container-url}:9393/health-check
Response: If the scanner container is healthy, the response code will be 200 and the response will contain the following JSON object:

CODE
{
   "scanner_version": "x.x.x"
}

wss-remediate Container

Request (GET): {wss-remediate-container-url}:8080
Response: If the remediate container is healthy, the response code will be 200 and the response will contain the following JSON object:

CODE
{
   "status": "OK"
}

Accessing Scan Statistics via API

In order to keep track of the number of scan requests that are in the scan queue at any given time, the following API call can be used via the wss-<integration_type>-app container endpoint:

Request (GET):

{wss-<integration_type>-app-container-url}/payload/scanner/request

An optional state parameter can be provided as part of the request URL. It can contain one of the following values:

  • pending (this is the default value when using this API call)

  • scanning

  • done

For example: {wss-<integration_type>-app-container-url}:5678/payload/scanner/request?state=scanning


Response:

CODE
{
  "extraData":null,
  "requestedScanState":"pending",
  "requestsCount":"6"
}

Our existing controller API endpoint (/payload/scanner/request) only returns SCA scans.

Create two new endpoints to allow retrieving both SAST results and SCA results (the existing endpoint will be kept untouched for backward compatibility).

Retrieve scan count by state and engine

Note: This endpoint is for Mend for GitHub Enterprise only.

Request (GET):

{wss-<integration_type>-app-container-url}/payload/scanner/request/by-engine

Query parameters:

  1. state - pending / scanning / done

  2. engine - SCA / SAST / ALL

Response:

CODE
{
  "requestedScanState": "pending",
  "requestsCount": "123"
}

Retrieve scan count by state for all engines

Note: This endpoint is for Mend for GitHub Enterprise only.

Request (GET):

{wss-<integration_type>-app-container-url}/payload/scanner/request/all-engines

Query parameters:

  1. state - pending / scanning / done

Response:

CODE
{
  "sca": {
    "requestedScanState": "pending",
    "requestsCount": "123"
  },
  "sast": {
    "requestedScanState": "pending",
    "requestsCount": "45"
  }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.