Groups and Users API

Overview

This resource represents groups and users that are in your organization.

The Home> Admin>Users page enables you to invite and create users, and view their details. In this page, you can also remove users, assign pending tasks and send activation email messages.

This document showcases the API requests and responses for:

  • getting all groups and users in an organization

  • creating groups and users

  • inviting users to your organization

  • adding and removing users to/from groups

  • removing users from an organization

  • getting organization-level and product-level role assignments

  • assigning an organization-level or product-level role to specific users or to a group of users according to specific roles

  • creating a service user

  • regenerating a user token for a service user

  • getting all organization and product service users

  • inviting an external user to download and use WhiteSource Advise for Chrome

Get Groups

NOTE: To get all groups in an organization, you must have ORG Admin role permissions.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that returns all the groups 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

1 2 3 4 5 {   "requestType": "getAllGroups",    "userKey": "user_key",   "orgToken": "organization_api_key" }

Response Example

The response is a JSON collection of all the groups with their details in the organization. For example:

1 2 3 4 5 6 7 8 9 10 11 12 { "groups":[ { "id": 2373, "name": "admins", "description": "Alex playground administrators", "users":[ {"id": 2458, "email": "john1@gmail.com", "name": "John2"}, {"id": 1841, "email": "john2@gmail.com", "name": "John1"} ]}], "message":"Organization groups" }

Back to top

Get Users

NOTE: To get all users in an organization, you must have ORG Admin role permissions.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that returns all the users 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

1 2 3 4 5 {   "requestType": "getAllUsers",    "userKey": "user_key",   "orgToken": "organization_api_key" }

Response Example

The response is a JSON collection of all the users with their details in the organization. For example:

1 2 3 4 5 6 7 8 9 { "users":[ { "id": 1841, "email": "john@gmail.com", "name": "John Doe" }], "message":"Organization users" }

Back to top

Create a Group

NOTE: To create groups in an organization, you must have ORG Admin role permissions.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that creates a group 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

group

Group data object containing:

 

 

 

name

Name of the group that you want to create.

string

Yes

 

description

Description of the group you want to create.

string

No

Request Example

1 2 3 4 5 6 7 8 9 {   "requestType": "createGroup",   "userKey": "user_key",   "orgToken": "organization_api_key",   "group":{   "name":"group_name",   "description":"group_description"     } }

Response Example

The response shows the details of the newly created group for which a unique ID was created. For example:

1 2 3 4 5 6 7 8 9 { "group":{ "id": 8340, "name": "test_group", "description": "best group ever", "users":[] }, "message": "Successfully created group test_group" }

Back to top

Create a User

NOTE: To create a user in an organization, you must have ORG Admin role permissions.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that creates a user 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

inviter

Data object containing:

 

 

 

email

Email address of the user that is sending the invitation to the new user.

string

Yes

addedUser

New user data object containing:

 

 

 

name

Name of the user to be added.

string

Yes

 

email

Email address of the user to be added.

string

Yes

Request Example

1 2 3 4 5 6 7 8 9 10 11 12 {   "requestType": "createUser",    "userKey": "user_key",   "orgToken": "organization_api_key",   "inviter":{     "email": "inviter_email"     },   "addedUser":{     "name":"new_user_name",     "email":"new_user_email"     } }

Response Example

1 "message":"Successfully created user new_user_name"

Back to top

Invite Users to your Organization

NOTE: To invite users to join an organization, you must have ORG Admin role permissions.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that sends an invitation to new users to join 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

inviter

Data object containing:

 

 

 

email

Email address that is “inviting” the new users.

string

Yes

emails

List of activation email addresses for the new users.

array

Yes

Request Example

1 2 3 4 5 6 7 8 9 10 11 12 {   "requestType": "inviteUsers",    "userKey": "user_key",   "orgToken": "organization_api_key",   "inviter":{     "email":"inviter_email"   },   "emails":[     "new_email1",     "new_email2"   ] }

Response Example

1 "message":"Successfully sent invitation to new_email1, new_email2"

Back to top

Adding Users to Groups

NOTE: To add users to groups in an organization, you must have ORG Admin role permissions.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that adds users to groups 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

assignedUsers

Data object listing the users that you want to assign to groups:

array

Yes

 

name

Name of the group to which you are adding the users.

string

Yes

 

email

List of email activation addresses of users you want to assign to the group.

array

Yes

Request Example

1 2 3 4 5 6 7 8 9 10 {   "requestType": "addUsersToGroups",    "userKey": "user_key",   "orgToken": "organization_api_key",   "assignedUsers" :   [     [{"name":"group_name"},[{"email":"assigned_user_email"},                             {"email":"assigned_user_email"}]]   ] }

Response Example

1 "message":"Successfully assigned users to groups"

Back to top

Removing Users from Groups

NOTE: To remove a user from a group in an organization, you must have ORG Admin role permissions.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that removes a user from a group 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

group

Name of the group from which the user will be removed.

string

Yes

user

Name of the user that will be removed from the group.

string

Yes

Request Example

1 2 3 4 5 6 7 {   "requestType": "removeUserFromGroup",    "userKey": "user_key",   "orgToken": "your_org_token",   "group": { "name": "group_name" },   "user": { "email": "user_email" } }

Response Example

1 "message":"Successfully removed user from group"

Back to top

Removing a User from an Organization

NOTE: To remove a user from an organization, you must have ORG Admin role permissions.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that removes a user from 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

user

Email address of the user that will be removed from the organization.

string

Yes

Request Example

1 2 3 4 5 6 {   "requestType": "removeUserFromOrganization",    "userKey": "user_key",   "orgToken":"your_org_token",   "user": { "email": "user_email" } }

Response Example

1 "message":"Successfully removed user from organization"

Back to top

Get Organization Assignments

NOTE: To get organization-level role assignments, you must have ORG Admin role permissions.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that gets all role assignments 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

1 2 3 4 5 { "requestType":"getOrganizationAssignments", "userKey": "user_key", "orgToken":"organization_api_key" }

Response Example

The JSON response shows the details of the assignments for different roles in the organization. For example:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 { "groupRoles":{ "USER":[ { "id":group_id, "name":"users", "description":"All users in organization", "users":[ { "id":user_id, "email":"user_email", "name":"user_name" }, { "id":user_id, "email":"user_email", "name":"user_name" } ] } ], "ADMIN":[ { "id":group_id, "name":"admins", "description":"Administrators", "users":[ { "id":user_id, "email":"user_email", "name":"user_name" } ] } ] }, "userRoles":{ "USER":[ { "id":user_id, "email":"user_email", "name":"user_name" }, { "id":user_id, "email":"user_email", "name":"user_name" } ], "DEFAULT_APPROVER":[ { "id":user_id, "email":"user_email", "name":"user_name" } ] } }

Back to top

Get Product Assignments

NOTE: To get product-level role assignments, you must have Product Admin role permissions.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that gets all role assignment in a product.

string

Yes

userKey

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

string

Yes

productToken

API key which is a unique identifier of the product.

string

Yes

Request Example

1 2 3 4 5 { "requestType":"getProductAssignments", "userKey": "user_key", "productToken":"product_api_key" }

Response Example

The JSON response shows the details of the assignments for different roles in the product. For example:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 { "groupRoles":{ "ALERT_EMAIL_RECEIVER":[ { "id":group_id, "name":"group_name", "description":"Email receivers", "users":[ { "id":user_id, "email":"user_email", "name":"user_name" } ] } ], "ADMIN":[ { "id":group_id, "name":"group_name", "description":"Administrators", "users":[ { "id":user_id, "email":"user_email", "name":"user_name" } ] } ], "PRODUCT_INTEGRATOR":[ { "id":group_id, "name":"group_name", "description":"Product Integrators", "users":[ { "id":user_id, "email":"user_email", "name":"user_name" } ] } ] }, "userRoles":{ } }

Back to top

Set Organization Assignments

You can assign an Organization-level role to specific users or to a group of users using API calls. The following roles are supported:

  • Administrators

  • Alert Email Receiver

  • Default Approver

  • Auditor

Administrator Role

Administrators have control over the entire organization. They can create, invite, and remove users, add products and projects, and much more.
This API enables you to assign the Administrator role to specific users and/or groups.
NOTE: Assigning the role of Administrator to individual users is not recommended; using groups is simpler and easier for user and role management.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that assigns roles at the organization-level.

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

administrators

Administrator role data object containing:

 

 

 

groupAssignments

List of groups to which you want to assign the Administrator role.

array

No

 

userAssignments

List of users to which you want to assign the Administrator role.

array

No

Request Example

1 2 3 4 5 6 7 8 9 10 { "requestType": "setOrganizationAssignments", "userKey": "user_key", "orgToken": "organization_api_key", "administrators" : { "groupAssignments":[{"name":"group_name"},{"name":"group_name"}], "userAssignments":[{"email":"user_email"},{"email":"user_email"}] } }

Response Example

1 "message":"Successfully set organization assignments"

Back to top

Alert Email Receiver Role

This API enables you to assign the organization-level role Alert Email Receivers to specific users and/or groups.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that assigns roles at the organization-level.

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

alertsEmailReceivers

Alert Email Receiver role data object containing:

 

 

 

groupAssignments

List of groups to which you want to assign the Alert Email Receiver role.

array

No

 

userAssignments

List of users to which you want to assign the Alert Email Receiver role.

array

No

Request Example

1 2 3 4 5 6 7 8 9 10 { "requestType": "setOrganizationAssignments", "userKey": "user_key", "orgToken": "organization_api_key", "alertsEmailReceivers" : { "groupAssignments":[{"name":"group_name"},{"name":"group_name"}], "userAssignments":[{"email":"user_email"},{"email":"user_email"}] } }

Response Example

1 "message":"Successfully set organization assignments"

Back to top

Default Approver Role

All pending tasks in the organization are sent to the Default Approver. Changing the Default Approver only impacts future tasks. Existing tasks are assigned to their original Approver.
The organization must have a Default Approver at all times. The role of Default Approver is assigned to the organization creator by default, and any member of the organization can be assigned to this role. You can also assign the Default Approver to a specific group.
NOTE: The Product level Default Approver overrides the Organization level Default Approver for their relevant Product(s).

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that assigns roles at the organization-level.

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

defaultApprover

Default Approver role data object containing:

 

 

 

groupAssignments

List of groups to which you want to assign the Default Approver role.

array

No

 

userAssignments

List of users to which you want to assign the Default Approver role.

array

No

Request Example

1 2 3 4 5 6 7 8 9 10 { "requestType": "setOrganizationAssignments", "userKey": "user_key", "orgToken": "organization_api_key", "defaultApprover" : { "groupAssignments":[{"name":"group_name"},{"name":"group_name"}], "userAssignments":[{"email":"user_email"},{"email":"user_email"}] } }

Response Example

1 "message":"Successfully set organization assignments"

Back to top

Auditor Role 

The Auditor role can be assigned to service users to grant them Read-only permissions in the scope of a specific organization. It is recommended to use this role when you want service users to obtain organizational information, but you don't want to grant them full Admin permissions. 

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that assigns roles at the organization-level.

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

readOnlyUsers

Auditor role data object to grant read-only permissions:

 

 

 

groupAssignments

List of groups to which you want to assign the Auditor role.

array

No

 

userAssignments

List of users to which you want to assign the Auditor role.

array

No

Request Example

1 2 3 4 5 6 7 8 9 10 { "requestType" : "setOrganizationAssignments", "userKey":"admin_user_key" "orgToken" : "organization_api_key", "readOnlyUsers" : { "groupAssignments":[{"name":"group_name"},{"name":"group_name"}], "userAssignments":[{"email":"user_email"},{"email":"user_email"}] } }

Response Example

1 "message": "The following organization assignments have been set: Read Only"

Back to top

Set Product Assignments

You can assign a Product-level role to specific users or to a group of users using API calls. The following roles are supported:

  • Product Administrator

  • Alert Email Receiver

  • Product Membership

  • Product Default Approver

  • Product Integrator

Product Administrator Role

Product Administrators have control over the entire product, they can rename and delete the product, and all the projects under it.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that assigns roles at the product-level.

string

Yes

userKey

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

string

Yes

productToken

API key which is a unique identifier of the product.

string

Yes

productAdmins

Product Administrator role data object containing:

 

 

 

userAssignments

List of users to which you want to assign the Product Administrator role.

array

No

 

groupAssignments

List of groups to which you want to assign the Product Administrator role.

array

No

Request Example

1 2 3 4 5 6 7 8 9 10 { "requestType": "setProductAssignments", "userKey": "user_key", "productToken": "product_api_key", "productAdmins" : { "userAssignments":[{"email":"user_email"}], "groupAssignments":[{"name":"group_name"}] } }

Response Example

1 "message":"Successfully set product assignments"

Back to top

Alert Email Receiver Role

This API enables you to assign the Alert Email Receiver product-level role to specific users and/or groups.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that assigns roles at the product-level.

string

Yes

userKey

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

string

Yes

productToken

API key which is a unique identifier of the product.

string

Yes

alertsEmailReceivers

Alert Email Receiver role data object containing:

 

 

 

userAssignments

List of users to which you want to assign the Alert Email Receiver role.

array

No

 

groupAssignments

List of groups to which you want to assign the Alert Email Receiver role.

array

No

Request Example

1 2 3 4 5 6 7 8 9 10 { "requestType": "setProductAssignments", "userKey": "user_key", "productToken": "product_api_key", "alertsEmailReceivers" : { "userAssignments":[{"email":"user_email"}], "groupAssignments":[{"name":"group_name"}] } }

Response Example

1 "message":"Successfully set product assignments"

Back to top

Product Membership Role

Product members can view the product data and all its projects, and open tickets for libraries. By default, all users in the organization are members of the product - by assigning a user as a member of the product all other users will be excluded.

This API enables you to assign the Product Membership product-level role to specific users and/or groups.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that assigns roles at the product-level.

string

Yes

userKey

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

string

Yes

productToken

API key which is a unique identifier of the product.

string

Yes

productMembership

Product Membership role data object containing:

 

 

 

userAssignments

List of users to which you want to assign the Product Membership role.

array

No

 

groupAssignments

List of groups to which you want to assign the Product Membership role.

array

No

Request Example

1 2 3 4 5 6 7 8 9 10 { "requestType": "setProductAssignments", "userKey": "user_key", "productToken": "product_api_key", "productMembership" : { "userAssignments":[{"email":"user_email"}], "groupAssignments":[{"name":"group_name"}] } }

Response Example

1 "message":"Successfully set product assignments"

Back to top

Product Default Approver Role

If the role of Product Approver is not assigned, all product tickets are sent to the organization’s Default Approver. Any member of the organization can be assigned to this role. You can also assign the Default Approver to a specific group. Changing the Product Approver will only affect future pending tasks, existing tasks will still be assigned to their original approver.

The Product level Default Approver overrides the Organization level Default Approver for their relevant product(s).

This API enables you to assign the Product Default Approver product-level role to specific users and/or groups.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that assigns roles at the product-level.

string

Yes

userKey

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

string

Yes

productToken

API key which is a unique identifier of the product.

string

Yes

productApprovers

Product Approver role data object containing:

 

 

 

userAssignments

List of users to which you want to assign the Product Approver role.

array

No

 

groupAssignments

List of groups to which you want to assign the Product Approver role.

array

No

Request Example

1 2 3 4 5 6 7 8 9 10 { "requestType": "setProductAssignments", "userKey": "user_key", "productToken": "product_api_key", "productApprovers" : { "userAssignments":[{"email":"user_email"}], "groupAssignments":[{"name":"group_name"}] } }

Response Example

1 "message":"Successfully set product assignments"

Back to top

Product Integrator Role

Product Integrators can run a scan on a new or existing project within the product. They can also view data on the product and all its projects, and open tickets for libraries.

This API enables you to assign the Product Integrator product-level role to specific users and/or groups.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that assigns roles at the product-level.

string

Yes

userKey

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

string

Yes

productToken

API key which is a unique identifier of the product.

string

Yes

productIntegrators

Product Integrator role data object containing:

 

 

 

userAssignments

List of users to which you want to assign the Product Integrator role.

array

No

 

groupAssignments

List of groups to which you want to assign the Product Integrator role.

array

No

Request Example

1 2 3 4 5 6 7 8 9 10 {   "requestType": "setProductAssignments", "userKey": "user_key",   "productToken": "product_api_key",   "productIntegrators" :   {     "userAssignments":[{"email":"user_email"}],     "groupAssignments":[{"name":"group_name"}]   } }

Response Example

1 "message":"Successfully set product assignments"

Back to top

Service Users

Service Users communicate with WhiteSource via the APIs for automation purposes; they cannot log in to the Web Console. Organization administrators manage Service Users via the GUI. You can assign a service user to one or more groups.

Create a Service User

This API enables an organization admin to create a service user and generate its user token.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that creates a service user.

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

addedUser

New service user data object containing:

 

 

 

name

Name of service user you want to create.

string

Yes

Request Example

1 2 3 4 5 6 7 8 { "requestType": "createServiceUser", "orgToken": "organization_api_key", "userKey": "user_key", "addedUser":{ "name":"ServiceUser2" } }

Response Example

1 2 3 {     "userToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }

Back to top

Regenerate User Token for a Service User

This API allows an organization admin to regenerate the user token of a service user.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that regenerates a service user’s token key.

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

serviceUserKey

Current token key for the service user.

string

Yes

Request Example

1 2 3 4 5 6 { "requestType": "regenerateUserKey", "orgToken": "organization_api_key", "userKey": "user_key", "serviceUserKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }

Response Example

1 2 3 {     "userToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }

Back to top

Get Organization Service Users

This API allows an organization admin to get a list of all the service users in an organization.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that returns all the service users 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

1 2 3 4 5 { "requestType":"getOrganizationServiceUsers", "userKey":"user_key", "orgToken":"organization_api_key" }

Response Example

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 {     "serviceUsers": [         {             "serviceUserName": "New_Service_User",             "serviceUserToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"         },         {             "serviceUserName": "ServiceUser2",             "serviceUserToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"         },         {             "serviceUserName": "WS_4_GHC_service_user",             "serviceUserToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"         },         {             "serviceUserName": "service1",             "serviceUserToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"         }       ] }

Back to top

Get Product Service Users

This API allows an organization admin to get a list of all the service users in a product.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that returns all the service users in a product.

string

Yes

userKey

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

string

Yes

productToken

API key which is a unique identifier of the product.

string

Yes

Request Example

1 2 3 4 5 { "requestType":"getProductServiceUsers", "userKey":"user_key", "productToken":"product_token" }

Response Example 

1 2 3 4 5 6 7 8 { "serviceUsers": [ { "serviceUserName": "WS_4_GHC_service_user", "serviceUserToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } ] }

Back to top

Invite User to WhiteSource Advise for Chrome

WhiteSource Advise allows your developers to view a snapshot of a component’s details before they download it to their repository, and incorporate it in the codebase.

This API enables a WhiteSource account administrator to invite an external user to download and use WhiteSource Advise.

QUERY PARAMETERS

Parameter

Description

Type

Required

Parameter

Description

Type

Required

requestType

API request type that enables a WhiteSource account administrator to invite an external user to download and use WhiteSource Advise.

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

userEmail

Email address of the external user who will receive the invitation via email.

string

Yes

Request Example

1 2 3 4 5 6 { "requestType" : "inviteUserToWebAdvisor", "userKey": "user_key", "orgToken" : "organization_api_key", "userEmail": "User email address" }

Response Example

1 { "message": "Successfully invited external user" }

Back to top