Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel2
minLevel1

Overview

The WhiteSource Mend HTTP API is available for WhiteSource Mend customers who are licensed to use it. The APIs can be accessed by the organization's administrators.

...

Parameter

Description

Type

Required

requestType

API request type that returns a global organization’s policies.

string

Yes

globalOrgToken

API key which is a unique identifier of the global organization.

string

Yes

userKey

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

string

Yes

Request Example

...

Parameter

Description

Type

Required

requestType

API request type that returns an organization’s policies.

string

Yes

orgToken

API key which is a unique identifier of the organization.

string

Yes

userKey

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

string

Yes

aggregatePolicies

Whether to include policies of the global organization to which this organization belongs. false by default.

boolean

No

...

Parameter

Description

Type

Required

requestType

API request type that returns a product’s policies.

string

Yes

productToken

Unique identifier of the product.

string

Yes

userKey

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

string

Yes

aggregatePolicies

Whether to include policies of the organization and global organization to which this product belongs. false by default.

boolean

No

...

Parameter

Description

Type

Required

requestType

API request type that returns a project’s policies.

string

Yes

projectToken

Unique identifier of the project.

string

Yes

userKey

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

string

Yes

aggregatePolicies

Whether to include policies of the product, organization and global organization to which this project belongs. false by default.

boolean

No

...

Parameter

Description

Type

Required

Default/Values

requestType

API request type that adds a policy to a global organization.

string

Yes

globalOrgToken

API key which is a unique identifier of the global organization.

string

Yes

userKey

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

string

Yes

policy

Policy data object containing:

object

Yes

name

Name of the policy you want to add.

string

Yes

owner

Identification of the user that created the policy, containing:

object

Yes

Either the id or email property is required.

id

The assigned user ID.

integer

Yes

email

The user’s email address.

string

Yes

name

The user’s full name.

string

No

filter

The policy filter defines how to match libraries (for example: By License). Comprises the following:

  • Match - The match type that defines which criteria of the library will be checked for licenses or security vulnerabilities in the code.

  • Values - The values against which the match type is evaluated. For example, for match type License Group, the values are the specific licenses against which the library license is matched.

For a description of all the available match types and their values, please refer to Matching a Policy to a Library.

string

Yes

For the LICENSE match type, if the inclusive value is set to true, the policy will perform the action when ALL the licenses in the library are matched. Boolean data type values are true or false.

action

Type of operation that defines what to do when a library matches the policy’s filter.

object

Yes

The “Action” object must contain the field “type”.

Valid values for “type” are:

  • Approve - Automatically approve the library.

  • Reject - Automatically reject the library.

  • Reassign - Reassign the request to a designated user or group in the system which is not the default approver.

  • Conditions - Automatically assign conditions and open tasks on libraries.

  • Issue - Automatically create a ticket in the issue tracker with all relevant information.  When creating an Issue Policy, the “Action” object should contain more fields. For a description of the query parameters required to create a policy of action type Issue, see Create Issue Action for a Policy.

...

Parameter

Description

Type

Required

Default/Values

requestType

API request type that adds a policy to an organization.

string

Yes

orgToken

API key which is a unique identifier of the organization.

string

Yes

userKey

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

string

Yes

policy

Policy data object containing:

object

Yes

name

Name of the policy you want to add.

string

Yes

owner

Identification of the user that created the policy, containing:

object

Yes

Either the id or email property is required.

id

The assigned user ID.

integer

Yes

email

The user’s email address.

string

Yes

name

The user’s full name.

string

No

filter

The policy filter defines how to match libraries (for example: By License). Comprises the following:

  • Match - The match type that defines which criteria of the library will be checked for licenses or security vulnerabilities in the code.

  • Values - The values against which the match type is evaluated. For example, for match type License Group, the values are the specific licenses against which the library license is matched.

For a description of all the available match types and their values, please refer to Matching a Policy to a Library.

string

Yes

For the LICENSE match type, if the inclusive value is set to true, the policy will perform the action when ALL the licenses in the library are matched. Boolean data type values are true or false.

action

Type of operation that defines what to do when a library matches the policy’s filter.

object

Yes

The “Action” object must contain the field “type”.

Valid values for “type” are:

  • Approve - Automatically approve the library.

  • Reject - Automatically reject the library.

  • Reassign - Reassign the request to a designated user or group in the system which is not the default approver.

  • Conditions - Automatically assign conditions and open tasks on libraries.

  • Issue - Automatically create a ticket in the issue tracker with all relevant information.  When creating an Issue Policy, the “Action” object should contain more fields. For a description of the query parameters required to create a policy of action type Issue, see Create Issue Action for a Policy.

...

Parameter

Description

Type

Required

Default/Values

requestType

API request type that adds a policy to a product.

string

Yes

productToken

Unique identifier of the product.

string

Yes

userKey

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

string

Yes

policy

Policy data object containing:

object

Yes

name

Name of the policy you want to add.

string

Yes

owner

Identification of the user that created the policy, containing:

object

Yes

Either the id or email property is required.

id

The assigned user ID.

integer

Yes

email

The user’s email address.

string

Yes

name

The user’s full name.

string

No

filter

The policy filter defines how to match libraries (for example: By License). Comprises the following:

  • Match - The match type that defines which criteria of the library will be checked for licenses or security vulnerabilities in the code.

  • Values - The values against which the match type is evaluated. For example, for match type License Group, the values are the specific licenses against which the library license is matched.

For a description of all the available match types and their values, please refer to Matching a Policy to a Library.

string

Yes

For the LICENSE match type, if the inclusive value is set to true, the policy will perform the action when ALL the licenses in the library are matched. Boolean data type values are true or false.

action

Type of operation that defines what to do when a library matches the policy’s filter.

object

Yes

The “Action” object must contain the field “type”.

Valid values for “type” are:

  • Approve - Automatically approve the library.

  • Reject - Automatically reject the library.

  • Reassign - Reassign the request to a designated user or group in the system which is not the default approver.

  • Conditions - Automatically assign conditions and open tasks on libraries.

  • Issue - Automatically create a ticket in the issue tracker with all relevant information.  When creating an Issue Policy, the “Action” object should contain more fields. For a description of the query parameters required to create a policy of action type Issue, see Create Issue Action for a Policy.

...

Parameter

Description

Type

Required

Default/Values

requestType

API request type that adds a policy to a project.

string

Yes

projectToken

Unique identifier of the project.

string

Yes

userKey

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

string

Yes

policy

Policy data object containing:

object

Yes

name

Name of the policy you want to add.

string

Yes

owner

Identification of the user that created the policy, containing:

object

Yes

Either the id or email property is required.

id

The assigned user ID.

integer

Yes

email

The user’s email address.

string

Yes

name

The user’s full name.

string

No

filter

The policy filter defines how to match libraries (for example: By License). Comprises the following:

  • Match - The match type that defines which criteria of the library will be checked for licenses or security vulnerabilities in the code.

  • Values - The values against which the match type is evaluated. For example, for match type License Group, the values are the specific licenses against which the library license is matched.

For a description of all the available match types and their values, please refer to Matching a Policy to a Library.

string

Yes

For the LICENSE match type, if the inclusive value is set to true, the policy will perform the action when ALL the licenses in the library are matched. Boolean data type values are true or false.

action

Type of operation that defines what to do when a library matches the policy’s filter.

object

Yes

The “Action” object must contain the field “type”.

Valid values for “type” are:

  • Approve - Automatically approve the library.

  • Reject - Automatically reject the library.

  • Reassign - Reassign the request to a designated user or group in the system which is not the default approver.

  • Conditions - Automatically assign conditions and open tasks on libraries.

  • Issue - Automatically create a ticket in the issue tracker with all relevant information.  When creating an Issue Policy, the “Action” object should contain more fields. For a description of the query parameters required to create a policy of action type Issue, see Create Issue Action for a Policy.

...

Parameter

Description

Type

Required

Default/Values

requestType

API request type that updates a policy in a global organization.

string

Yes

globalOrgToken

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

string

Yes

userKey

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

string

Yes

policy

Policy data object containing:

object

Yes

id

Unique ID of the policy.

integer

Yes

name

Name of the policy you want to update.

string

Yes

owner

Identification of the user that created the policy, containing:

object

Yes

Either the id or email property is required.

id

The assigned user ID.

integer

Yes

email

The user’s email address.

string

Yes

name

The user’s full name.

string

No

filter

The policy filter defines how to match libraries (for example: By License). Comprises the following:

  • Match - The match type that defines which criteria of the library will be checked for licenses or security vulnerabilities in the code.

  • Values - The values against which the match type is evaluated. For example, for match type License Group, the values are the specific licenses against which the library license is matched.

For a description of all the available match types and their values, please refer to Matching a Policy to a Library.

string

No

For the LICENSE match type, if the inclusive value is set to true, the policy will perform the action when ALL the licenses in the library are matched. Boolean data type values are true or false.

action

Type of operation that defines what to do when a library matches the policy’s filter.

object

No

The “Action” object must contain the field “type”.

Valid values for “type” are:

  • Approve - Automatically approve the library.

  • Reject - Automatically reject the library.

  • Reassign - Reassign the request to a designated user or group in the system which is not the default approver.

  • Conditions - Automatically assign conditions and open tasks on libraries.

  • Issue - Automatically create a ticket in the issue tracker with all relevant information.  When creating an Issue Policy, the “Action” object should contain more fields. For a description of the query parameters required to create a policy of action type Issue, see Create Issue Action for a Policy.

...

Parameter

Description

Type

Required

Default/Values

requestType

API request type that updates a policy in an organization.

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

string

Yes

policy

Policy data object containing:

object

id

Unique ID of the policy.

integer

Yes

name

Name of the policy you want to update.

string

Yes

owner

Identification of the user that created the policy, containing:

object

Yes

Either the id or email property is required.

id

The assigned user ID.

integer

Yes

email

The user’s email address.

string

Yes

name

The user’s full name.

string

No

filter

The policy filter defines how to match libraries (for example: By License). Comprises the following:

  • Match - The match type that defines which criteria of the library will be checked for licenses or security vulnerabilities in the code.

  • Values - The values against which the match type is evaluated. For example, for match type License Group, the values are the specific licenses against which the library license is matched.

For a description of all the available match types and their values, please refer to Matching a Policy to a Library.

string

No

For the LICENSE match type, if the inclusive value is set to true, the policy will perform the action when ALL the licenses in the library are matched. Boolean data type values are true or false.

action

Type of operation that defines what to do when a library matches the policy’s filter.

object

No

The “Action” object must contain the field “type”.

Valid values for “type” are:

  • Approve - Automatically approve the library.

  • Reject - Automatically reject the library.

  • Reassign - Reassign the request to a designated user or group in the system which is not the default approver.

  • Conditions - Automatically assign conditions and open tasks on libraries.

  • Issue - Automatically create a ticket in the issue tracker with all relevant information.  When creating an Issue Policy, the “Action” object should contain more fields. For a description of the query parameters required to create a policy of action type Issue, see Create Issue Action for a Policy.

...

Parameter

Description

Type

Required

Default/Values

requestType

API request type that updates a policy in a product.

string

Yes

productToken

Unique identifier of the product.

string

Yes

userKey

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

string

Yes

policy

Policy data object containing:

object

Yes

id

Unique ID of the policy.

integer

Yes

name

Name of the policy you want to update.

string

Yes

owner

Identification of the user that created the policy, containing:

object

Yes

Either the id or email property is required.

id

The assigned user ID.

integer

Yes

email

The user’s email address.

string

Yes

name

The user’s full name.

string

No

filter

The policy filter defines how to match libraries (for example: By License). Comprises the following:

  • Match - The match type that defines which criteria of the library will be checked for licenses or security vulnerabilities in the code.

  • Values - The values against which the match type is evaluated. For example, for match type License Group, the values are the specific licenses against which the library license is matched.

For a description of all the available match types and their values, please refer to Matching a Policy to a Library.

string

No

For the LICENSE match type, if the inclusive value is set to true, the policy will perform the action when ALL the licenses in the library are matched. Boolean data type values are true or false.

action

Type of operation that defines what to do when a library matches the policy’s filter.

object

No

The “Action” object must contain the field “type”.

Valid values for “type” are:

  • Approve - Automatically approve the library.

  • Reject - Automatically reject the library.

  • Reassign - Reassign the request to a designated user or group in the system which is not the default approver.

  • Conditions - Automatically assign conditions and open tasks on libraries.

  • Issue - Automatically create a ticket in the issue tracker with all relevant information.  When creating an Issue Policy, the “Action” object should contain more fields. For a description of the query parameters required to create a policy of action type Issue, see Create Issue Action for a Policy.

...

Parameter

Description

Type

Required

Default/Values

requestType

API request type that updates a policy in a project.

string

Yes

projectToken

Unique identifier of the project.

string

Yes

userKey

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

string

Yes

policy

Policy data object containing:

object

Yes

id

Unique ID of the policy.

integer

Yes

name

Name of the policy you want to update.

string

Yes

owner

Identification of the user that created the policy, containing:

object

Yes

Either the id or email property is required.

id

The assigned user ID.

integer

Yes

email

The user’s email address.

string

Yes

name

The user’s full name.

string

No

filter

The policy filter defines how to match libraries (for example: By License). Comprises the following:

  • Match - The match type that defines which criteria of the library will be checked for licenses or security vulnerabilities in the code.

  • Values - The values against which the match type is evaluated. For example, for match type License Group, the values are the specific licenses against which the library license is matched.

For a description of all the available match types and their values, please refer to Matching a Policy to a Library.

string

No

For the LICENSE match type, if the inclusive value is set to true, the policy will perform the action when ALL the licenses in the library are matched. Boolean data type values are true or false.

action

Type of operation that defines what to do when a library matches the policy’s filter.

object

No

The “Action” object must contain the field “type”.

Valid values for “type” are:

  • Approve - Automatically approve the library.

  • Reject - Automatically reject the library.

  • Reassign - Reassign the request to a designated user or group in the system which is not the default approver.

  • Conditions - Automatically assign conditions and open tasks on libraries.

  • Issue - Automatically create a ticket in the issue tracker with all relevant information.  When creating an Issue Policy, the “Action” object should contain more fields. For a description of the query parameters required to create a policy of action type Issue, see Create Issue Action for a Policy.

...

Parameter

Description

Type

Required

requestType

API request type that removes policies from a global organization.

string

Yes

globalOrgToken

API key which is a unique identifier of the global organization.

string

Yes

userKey

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

string

Yes

policyIds

IDs of the policies that you want to remove.

array of integers

Yes

...

Parameter

Description

Type

Required

requestType

API request type that removes policies from an organization.

string

Yes

orgToken

API key which is a unique identifier of the organization.

string

Yes

userKey

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

string

Yes

policyIds

IDs of the policies that you want to remove.

array of integers

Yes

...

Parameter

Description

Type

Required

requestType

API request type that removes policies from a product.

string

Yes

productToken

Unique identifier of the product.

string

Yes

userKey

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

string

Yes

policyIds

IDs of the policies that you want to remove.

array of integers

Yes

...

Parameter

Description

Type

Required

requestType

API request type that removes policies from a project.

string

Yes

projectToken

Unique identifier of the project.

string

Yes

userKey

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

string

Yes

policyIds

IDs of the policies that you want to remove.

array of integers

Yes

...

Parameter

Description

Type

Required

requestType

API request type to reorder the priorities of policies in a global organization.

string

Yes

globalOrgToken

API key which is a unique identifier of the global organization.

string

Yes

userKey

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

string

Yes

policyPriorities

Policy prioritization data object containing:

array

Yes

policyId

ID of the policy that you want to reprioritize.

integer

Yes

priority

An integer that defines the priority that you want to assign the policy.

integer

Yes

...

Parameter

Description

Type

Required

requestType

API request type to reorder the priorities of policies in an organization.

string

Yes

orgToken

API key which is a unique identifier of the organization.

string

Yes

userKey

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

string

Yes

policyPriorities

Policy prioritization data object containing:

array

Yes

policyId

ID of the policy that you want to reprioritize.

integer

Yes

priority

An integer that defines the priority that you want to assign the policy.

integer

Yes

...

Parameter

Description

Type

Required

requestType

API request type to reorder the priorities of policies in a product.

string

Yes

productToken

Unique identifier of the product.

string

Yes

userKey

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

string

Yes

policyPriorities

Policy prioritization data object containing:

array

Yes

policyId

ID of the policy that you want to reprioritize.

integer

Yes

priority

An integer that defines the priority that you want to assign the policy.

integer

Yes

...

Parameter

Description

Type

Required

requestType

API request type to reorder the priorities of policies in a project.

string

Yes

projectToken

Unique identifier of the project.

string

Yes

userKey

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

string

Yes

policyPriorities

Policy prioritization data object containing:

array

Yes

policyId

ID of the policy that you want to reprioritize.

integer

Yes

priority

An integer that defines the priority that you want to assign the policy.

integer

Yes

...

This API creates a policy action of type Issue which works with the native Jira or Work Items integration.
NOTE: This is a Legacy integration that will be deprecated in the near future.

WhiteSource Mend policies can integrate with Issue Tracking Systems (such as Jira or Work Items), enabling the automatic creation of tickets for tracking issues externally to WhiteSourceMend. When an Issue policy is created, an issue is automatically created in the Issue tracker with all related information.

...

This API creates a policy action of type Issue which works with the new Issue Tracker Plugins set.
NOTE: In the near future, this will replace the Legacy Jira/Work Items native integration.

WhiteSource Mend policies can integrate with Issue Tracking Systems (such as Jira, Work Items, or Jira Plugin), enabling the automatic creation of tickets for tracking issues externally to WhiteSourceMend. When an Issue policy is created, an issue is automatically created in the Issue tracker with all related information.

...