...
This API request creates a product in an organization with a product token which is its unique identifier.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that creates a product. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
productName | Name to be assigned to the product. | string | Yes |
orgToken | API key which is the unique identifier of the organization. | string | Yes |
Request Example
Code Block |
---|
{ "requestType" : "createProduct", "userKey": "user_key", "productName" : "new product name", "orgToken" : "organization token" } |
...
This API request deletes a product in an organization.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that deletes a product. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
productToken | Product token which uniquely identifies the product. | string | Yes |
orgToken | API key which is the unique identifier of the organization. | string | Yes |
Request Example
Code Block |
---|
{ "requestType" : "deleteProduct", "userKey": "user_key", "orgToken" : "organization token", "productToken" :"product token" } |
...
This API request enables you to get the tags (keys & values) in a product.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns all the keys and values of a product’s tags. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
productToken |
Unique identifier of the product. | string | Yes |
Request Example
Code Block |
---|
{ "requestType": "getProductTags", "userKey": "user_key", "productToken": productToken } |
...
This API request enables you to get the product tags (keys & values) of all products in an organization.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns all the product tags in an organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
orgToken | API key which is a unique identifier of the organization. | string | Yes |
Request Example
Code Block |
---|
{ "requestType": "getOrganizationProductTags", "userKey": "user_key", "orgToken": "orgToken" } |
...
This API request enables you to save a product’s tag: key, value.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that saves a product’s tag. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
productToken |
Unique identifier of the product. | string | Yes | |
tagKey | Label that describes the tag. | string | Yes |
tagValue | Value assigned to the tag. | string | Yes |
Request Example
Code Block |
---|
{ "requestType": "saveProductTag", "userKey": "user_key", "productToken": "productToken", "tagKey": "newKey", "tagValue": "newValue" } |
...
This API request enables you to remove a product’s tag: key, value.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that removes a product’s tag. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
productToken |
Unique identifier of the product. | string | Yes | |
tagKey | Label that describes the tag. | string | Yes |
tagValue | Value assigned to the tag. | string | Yes |
Request Example
Code Block |
---|
{ "requestType" : "removeProductTag", "userKey": "user_key", "productToken" : "product_token", "tagKey": "newKey", "tagValue": "newValue" } |
...
This API request creates a new project within an existing product. A project token is generated which unique identifies the project.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that creates a project. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
productToken | Name of the product within which to create the project. | string | Yes |
projectName | Name to be assigned to the project. | string | Yes |
projectDescription | A description of the new project (optional field). | string | No |
Request Example
Code Block |
---|
{ "requestType" : "createProject", "userKey": "user_key", "productToken": "product_token", "projectName": "my new project", "projectDescription" : "optional field. Not mandatory" } |
...
This API request deletes a project in an product.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that deletes a project. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
productToken | Product token which identifies the product in which the project resides. | string | Yes |
projectToken | Project token of the project to be deleted. | string | Yes |
Request Example
Code Block |
---|
{ "requestType" : "deleteProject", "userKey": "user_key", "productToken" : "parent product token", "projectToken": "token of the project to be deleted" } |
...
This API request enables you to get the project tags (keys & values) of all projects in an organization.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns all the project tags in an organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
orgToken | API key which is a unique identifier of the organization. | string | Yes |
Request Example
Code Block |
---|
{ "requestType" : "getOrganizationProjectTags", "userKey": "user_key", "orgToken" : "organization_api_key" } |
...
This API request enables you to get the project tags (keys & values) of all projects in a product.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns all the project tags in a product. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
productToken |
Unique identifier of the product. | string | Yes |
Request Example
Code Block |
---|
{ "requestType" : "getProductProjectTags", "userKey": "user_key", "productToken" : "product_token" } |
...
This API request enables you to get the project tags (keys & values) in a project.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns all the keys and values of a project’s tags. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
projectToken |
Unique identifier of the project. | string | Yes |
Request Example
Code Block |
---|
{ "requestType" : "getProjectTags", "userKey": "user_key", "projectToken" : "project_token" } |
...
This API request enables you to save a project’s tag: key, value.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that saves a project’s tag. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
projectToken |
Unique identifier of the project. | string | Yes | |
tagKey | Label that describes the tag. | string | Yes |
tagValue | Value assigned to the tag. | string | Yes |
Request Example
Code Block |
---|
{ "requestType" : "saveProjectTag", "userKey": "user_key", "projectToken" : "project_token", "tagKey":"key1", "tagValue":"value1" } |
...
This API request returns a hierarchy of the libraries in a project including In-House library data if required.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that gets a hierarchy of the libraries in a project. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
projectToken |
Unique identifier of the project. | string | Yes | |
includeInHouseData | Set to “true” (default value) when you want in-house library data to be included in the API response. When set to ‘false’, in-house library data is not returned in the API response. | boolean | No |
Request Example
Code Block |
---|
{ "requestType" : "getProjectHierarchy", "userKey": "user_key", "projectToken" : "project token", "includeInHouseData" : true } |
...
This API request returns an inventory (BOM - Bill of Materials) of all the libraries in a project, including In-House library data if required.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that gets an inventory of the libraries in a project. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
projectToken |
Unique identifier of the project. | string | Yes | |
includeInHouseData | Set to “true” (default value) when you want in-house library data to be included in the API response. When set to ‘false’, in-house library data is not returned in the API response. | boolean | No |
Request Example
Code Block |
---|
{ "requestType" : "getProjectInventory", "userKey": "user_key", "projectToken" : "project_token", "includeInHouseData" : true } |
...
This API request returns the current status of a project including the last process that was performed on the project and its date, and whether the process is currently in progress.
The projectState response can have one of the following values:
SETUP: Initializing project
DIFF: Calculating inventory changes
UPDATE: Updating inventory
CHANGE_EXCLUSIONS: Updating dependency exclusions
CHANGE_LOCAL_PATHS: Updating library paths
REMOVE: Removing libraries
PARTNER_UPDATE: Updating inventory
UPDATE_ALERTS: Updating alerts
CREATE_ISSUES: Creating external tickets
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that gets the current state of a project. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
projectToken |
Unique identifier of the project. | string | Yes |
Request Example
Code Block |
---|
{ "requestType":"getProjectState", "userKey": "user_key", "projectToken":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } |
...
This API request returns the source files of a library in a project.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that gets a library’s source files. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
projectToken |
Unique identifier of the project. | integer | Yes | |
keyUuid | Unique ID of the library containing the source files. | integer | Yes |
Request Example
Code Block |
---|
{ "requestType":"getLibrarySourceFiles", "userKey": "user_key", "projectToken":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "keyUuid":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } |
...
This API request returns the dependencies of a library in a project.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that gets a library’s dependencies. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
projectToken |
Unique identifier of the project. | integer | Yes | |
keyUuid | Unique ID of the library containing the dependencies. | integer | Yes |
Request Example
Code Block |
---|
{ "requestType":"getProjectLibraryDependencies", "userKey": "user_key", "projectToken":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "keyUuid":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } |
...
This API request enables you to define and edit the configuration of the project’s email notifications rules on setup (such as, “Notify on Project Setup Completion”).
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that defines the project setup notification configuration. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
orgToken | API key which is a unique identifier of the organization. | string | Yes |
action | The action that describes the type of notification: Custom, Enabled, or Disabled. | string | Yes |
projectTagKeyRegex | The project tag key pattern that describes the notification rule. Must be a formatted regex valid string. Notifications will be sent when the projectTagKeyRegex and projectTagValueRegex patterns are in accordance with the defined project tags. | string | Required only if the action is Custom. |
projectTagValueRegex | The project tag value pattern that describes the notification rule. Must be a formatted regex valid string. Notifications will be sent when the projectTagKeyRegex and projectTagValueRegex patterns are in accordance with the defined project tags. | string | Mandatory only if the action is Custom. |
Request Example
Code Block |
---|
{ "requestType" : "setProjectSetupNotificationConfig", "orgToken" : "organization_api_key", "userKey" : "user_api_key", "action": "CUSTOM", "projectTagKeyRegex" : "^[0-9]*$", "projectTagValueRegex" : "^(ProjectTagValue)" } |
...
NOTE: Although an Organization token is required in the API request, a product administrator can also execute it.
QUERY PARAMETERS
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns the current progress of a request. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in WhiteSource. | string | Yes |
orgToken | API key which is a unique identifier of the organization. | string | Yes |
requestToken | Token that identifies the plugin request. Also called "support_token" - can be found in the data of the response returned from the server. | string | Yes |
Request Example
Code Block |
---|
{ "requestType" : "getRequestState", "userKey": "user_key", "orgToken" : "organization_api_key", "requestToken" : "support_token" } |
...