Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This API request creates a product in an organization with a product token which is its unique identifier.

QUERY PARAMETERS

ElementParameter

Description

Type

Required

requestType

API request type that creates a product.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

productName

Name to be assigned to the product.

string

RequiredYes

orgToken

API key which is the unique identifier of the organization.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that deletes a product.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

productToken

Product token which uniquely identifies the product.

string

RequiredYes

orgToken

API key which is the unique identifier of the organization.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that returns all the keys and values of a product’s tags.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

productToken

API key which is a unique identifier of the product.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that returns all the product tags in an organization.
NOTE: Products without tags are also returned.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

orgToken

API key which is a unique identifier of the organization.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that saves a product’s tag.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

productToken

API key which is a unique identifier of the product.

string

RequiredYes

tagKey

Label that describes the tag.

string

RequiredYes

tagValue

Value assigned to the tag.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that removes a product’s tag.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

productToken

API key which is a unique identifier of the product.

string

RequiredYes

tagKey

Label that describes the tag.

string

RequiredYes

tagValue

Value assigned to the tag.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that creates a project.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

productToken

Name of the product within which to create the project.

string

RequiredYes

projectName

Name to be assigned to the project.

string

RequiredYes

projectDescription

A description of the new project (optional field).

string

OptionalNo

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

ElementParameter

Description

Type

Required

requestType

API request type that deletes a project.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

productToken

Product token which identifies the product in which the project resides.

string

RequiredYes

projectToken

Project token of the project to be deleted.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that returns all the project tags in an organization.
NOTE: Products without tags are also returned.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

orgToken

API key which is a unique identifier of the organization.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that returns all the project tags in a product.
NOTE: Products without tags are also returned.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

productToken

API key which is a unique identifier of the product.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that returns all the keys and values of a project’s tags.
NOTE: Projects without tags are also returned.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

projectToken

API key which is a unique identifier of the project.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that saves a project’s tag.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

projectToken

API key which is a unique identifier of the project.

string

RequiredYes

tagKey

Label that describes the tag.

string

RequiredYes

tagValue

Value assigned to the tag.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that gets a hierarchy of the libraries in a project.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

projectToken

Project token which identifies the project.

string

RequiredYes

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

OptionalNo

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

ElementParameter

Description

Type

Required

requestType

API request type that gets an inventory of the libraries in a project.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

projectToken

Project token which identifies the project.

string

RequiredYes

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

OptionalNo

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.

QUERY PARAMETERS

ElementParameter

Description

Type

Required

requestType

API request type that gets the current state of a project.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

projectToken

Project token which identifies the project.

string

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that gets a library’s source files.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

projectToken

Project token which identifies the project.

integer

RequiredYes

keyUuid

Unique ID of the library containing the source files.

integer

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that gets a library’s dependencies.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

projectToken

Project token which identifies the project.

integer

RequiredYes

keyUuid

Unique ID of the library containing the dependencies.

integer

RequiredYes

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

ElementParameter

Description

Type

Required

requestType

API request type that defines the project setup notification configuration.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

orgToken

API key which is a unique identifier of the organization.

string

RequiredYes

action

The action that describes the type of notification: Custom, Enabled, or Disabled.

string

RequiredYes

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

Mandatory 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.

...

NOTE: Although an Organization token is required in the API request, a product administrator can also execute it.

QUERY PARAMETERS

ElementParameter

Description

Type

Required

requestType

API request type that returns the current progress of a request.

string

RequiredYes

userKey

The ID of the user’s profile, which uniquely identifies the user in WhiteSource.

string

RequiredYes

orgToken

API key which is a unique identifier of the organization.

string

RequiredYes

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

RequiredYes

Request Example

Code Block
{
    "requestType" : "getRequestState",
    "userKey": "user_key", 
    "orgToken" : "organization_api_key",
    "requestToken" : "support_token"
}

...