The WhiteSource HTTP API is available for WhiteSource customers who are licensed to use it. The APIs can be accessed by the organization's administrator(s).
The API is simply an HTTP endpoint implementing a JSON speaking web service and handling POST requests. Like the service itself, communication is secured with SSL.
This document describes the WhiteSource HTTP API v1.3. The API URL can be obtained by copying the WhiteSource Server URL, which can be retrieved from your Profile page on the Server URLs panel. Then, add the path /api/v1.3 to it. For example: https://saas.whitesourcesoftware.com/api/v1.3.
Regarding version numbers, if there are 3 or more version parts, (for example, x.y.z or x.y.z.w) both x and y are considered a major version (x.y). If there are 2 major parts (x.y), then x is considered a major version.
NOTE: The previous WhiteSource API version is currently still supported, and is documented in the HTTP API v1.2 page.
Note the following about API calls:
When performing API calls, the time recorded for the action is in GMT time zone, therefore, this is the time displayed in the relevant reports.
Date format in all responses is "yyyy-MM-dd".
The API results are not sorted in any order.
API Execution Scope
Generally, each level of the administrator (Organization, Product) can get/set the API attributes in the API calls that refer to their scope and/or under their scope. For example, Product administrators can execute API calls related to their Projects/Products that are defined in WhiteSource, but they cannot execute Organization-related API calls which are outside their scope. However, there are two API calls that are exceptions to this rule:
getProjectVitals – Product administrators can use the Organization level call and get the product/project vitals related to their products/projects.
getRequestState – Although an Organization token is required in the call, a product administrator can also execute it.
The base URL for all API endpoints can be obtained from the Integrate tab(calls to HTTP cannot be redirected to HTTPS).
Only POST requests are accepted.
Request payload should have: Content-Type = application/json
All requests require a token available via the API Integration page in your WhiteSource account, according to the request's context (organization / product / project).
The requestType parameter is mandatory for all requests.
WhiteSource HTTP API v1.x supports Accept-Charset header.
If the value of the header is a supported character set (see supported values below) the response would be in that character set. Otherwise, if the value is not supported or if the header isn't sent, the default response character set will be UTF-8.
Supported character sets are:
The following characters are NOT supported as API input: <, >, % and &