Versions Compared

Key

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

...

Get libraries and their licenses for an organization.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that returns an organization’s licenses per library.

string

Yes

orgToken

API key which is a unique identifier of the organization. Used to identify the organization in plugins.

string

Yes

userKey

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

string

Yes

excludeProjectOccurrences

“true” or “false” depending on whether or not you want to exclude project occurrences of the licenses.

boolean

No

Request Example

Code Block
{
	"requestType" : "getOrganizationLicenses",
     "userKey": "user_key", 
	"orgToken" : "organization_api_key",
    "excludeProjectOccurrences" : true
}

...

Get libraries and their licenses for a specific product.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that returns a product's licenses per library.

string

Yes

productToken

API key which is a unique

Unique identifier of

the product. Used to identify

the product

in plugins

.

string

Yes

userKey

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

string

Yes

excludeProjectOccurrences

“true” or “false” depending on whether or not you want to exclude project occurrences of the licenses.

boolean

No

Request Example

Code Block
{
	"requestType" : "getProductLicenses",
    "userKey": "user_key", 
	"productToken" : "product_token",
 	"excludeProjectOccurrences" : false
}

...

Get libraries and their licenses for a specific project.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that returns a project's licenses per library.

string

Yes

projectToken

API key which is a unique

Unique identifier of the project.

Used to identify the project in plugins.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
	"requestType" : "getProjectLicenses",
    "userKey": "user_key", 
	"projectToken" : "project_token"
}

...

Get a histogram of licenses and their number of occurrences for an organization.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that returns a histogram of an organization’s licenses.

string

Yes

orgToken

API key which is a unique identifier of the organization. Used to identify the organization in plugins.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
	"requestType" : "getOrganizationLicenseHistogram",
    "userKey": "user_key", 
	"orgToken" : "organization_api_key"
}

...

Get a histogram of a product’s licenses and their number of occurrences.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that returns a history of a product’s licenses.

string

Yes

productToken

API key which is a unique

Unique identifier of the product.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
	"requestType" : "getProductLicenseHistogram", 
	 "userKey": "user_key",
	"productToken" : "product_token"
}

...

Get a histogram of a project’s licenses and their number of occurrences.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that returns a project’s licenses histogram.

string

Yes

projectToken

API key which is a unique

Unique identifier of the project.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
	"requestType" : "getProjectLicenseHistogram",
    "userKey": "user_key", 
	"projectToken" : "project_token"
}

...

Get a Licenses text zip file showing terms and conditions for a product.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that gets a License text zip file for a product.

string

Yes

productToken

API key which is a unique

Unique identifier of the product.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
	"requestType" : "getLicensesTextZip",
     "userKey": "user_key", 
	"productToken" : "product_token"
}

...

This API request enables you to get a Licenses text zip file showing terms and conditions for a project.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that gets a License text zip file for a project.

string

Yes

projectToken

API key which is a unique

Unique identifier of the project.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
    "requestType" : "getProjectLicensesTextZip",
     "userKey": "user_key",
    "projectToken" : "project_token"
}

...

Get a text file of all the Copyrights for a product.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that gets a Copyrights text file for a product.

string

Yes

productToken

API key which is a unique

Unique identifier of the product.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
	"requestType" : "getCopyrightsTextFile",
     "userKey": "user_key", 
	"productToken" : "product_token"
}

...

Get a text file of all the Copyrights for a project.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that gets a Copyrights text file for a project.

string

Yes

projectToken

API key which is a unique

Unique identifier of the project.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
    "requestType" : "getProjectCopyrightsTextFile",
     "userKey": "user_key",
    "projectToken" : "project_token"
}

...

NOTE: This request is available ONLY for products.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that gets a Notices text file for a product.

string

Yes

productToken

API key which is a unique

Unique identifier of the product.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
	"requestType" : "getNoticesTextFile",
     "userKey": "user_key", 
	"productToken" : "product_token"
}

...

This API request enables you to set a text value for a library’s notice.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that sets a library notice.

string

Yes

orgToken

API key which is a unique identifier of the organization. Used to identify the organization in plugins.

string

Yes

userKey

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

string

Yes

libraryUUID

Unique ID of the library in which you want to set the notice.

string

Yes

text

Text of the library’s notice that you want to set.

string

Yes

reference

Optionally, add library reference information to the notice.

string

No

Request Example

Code Block
{  
  "requestType": "setLibraryNotice",  
  "orgToken" : "org_token", 
  "userKey": "user_key",  
  "libraryUUID": "library_UUID", 
  "text": "Notices are fun!", 
  "reference": "And references are too"
}

...

Get the path locations of the libraries in a product.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that gets the library locations for a product.

string

Yes

productToken

API key which is a unique

Unique identifier of the product.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
	"requestType" : "getProductLibraryLocations",     
     "userKey": "user_key", 
	"productToken" : "product_token"
}

...

Get the path locations of the libraries in a project.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that gets the library locations for a project.

string

Yes

projectToken

API key which is a unique

Unique identifier of the project.

string

Yes

userKey

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

string

Yes

Request Example

Code Block
{
	"requestType" : "getProjectLibraryLocations",
     "userKey": "user_key", 
	"projectToken" : "project_token"	
}

...

This API request enables you to change the library that is currently matched to the source files in your organization’s inventory.

QUERY PARAMETERS

Parameter

Description

Type

Required

requestType

API request type that changes the original library of your source files.

string

Yes

orgToken

API key which is a unique identifier of the organization. Used to identify the organization in plugins.

string

Yes

userKey

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

string

Yes

targetKeyUuid

Unique ID of the library to which you want to change the source files.

string

Yes

sourceFiles

An array of the source files to be moved.

array

Yes

userComments

Optionally, add a comment to this action.

string

No

Request Example

Code Block
{
    "requestType" : "changeOriginLibrary",
    "userKey": "userKey",
    "orgToken" : "orgToken",
    "targetKeyUuid": "key-uuid-of-the-source-library-to-change-files",
    "sourceFiles": ["sha1_1", "sha1_2"],
    "userComments": "user-comments"
}

...