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 Mend Advise for Chrome

Get Groups

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that returns all the groups in an organization.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes

Request Example

{
  "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:

{
"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"
}

Get Users

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that returns all the users in an organization.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes

Request Example

{
  "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:

{
"users":[
{
"id": 1841,
"email": "john@gmail.com",
"name": "John Doe"
}],
"message":"Organization users"
}

Create a Group

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that creates a group in an organization.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
groupGroup data object containing:
nameName of the group that you want to create.stringYes
descriptionDescription of the group you want to create.stringYes

Request Example

{
  "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:

{
"group":{
"id": 8340,
"name": "test_group",
"description": "best group ever",
"users":[]
},
"message": "Successfully created group test_group"
}

Create a User

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that creates a user in an organization.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
inviterData object containing:
emailEmail address of the user that is sending the invitation to the new user.stringYes
addedUserNew user data object containing:
nameName of the user to be added.stringYes
emailEmail address of the user to be added.stringYes

Request Example

{
  "requestType": "createUser",
   "userKey": "user_key",
  "orgToken": "organization_api_key",
  "inviter":{
    "email": "inviter_email"
    },
  "addedUser":{
    "name":"new_user_name",
    "email":"new_user_email"
    }
}

Response Example

"message":"Successfully created user new_user_name"

Invite Users to an Organization

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that sends an invitation to new users to join an organization.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
inviterData object containing:
emailEmail address that is “inviting” the new users.stringYes
emailsList of activation email addresses for the new users.arrayYes

Request Example

{
  "requestType": "inviteUsers",
   "userKey": "user_key",
  "orgToken": "organization_api_key",
  "inviter":{
    "email":"inviter_email"
  },
  "emails":[
    "new_email1",
    "new_email2"
  ]
}

Response Example

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

Add Users to a Group

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that adds users to groups in an organization.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
assignedUsersData object listing the users that you want to assign to groups:arrayYes
nameName of the group to which you are adding the users.stringYes
emailList of email activation addresses of users you want to assign to the group.arrayYes

Request Example

{
  "requestType": "addUsersToGroups",
   "userKey": "user_key",
  "orgToken": "organization_api_key",
  "assignedUsers" :
  [
    [{"name":"group_name"},[{"email":"assigned_user_email"},
                            {"email":"assigned_user_email"}]]
  ]
}

Response Example

"message":"Successfully assigned users to groups"

Remove Users from a Group

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that removes a user from a group in an organization.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
groupName of the group from which the user will be removed.stringYes
userName of the user that will be removed from the group.stringYes

Request Example

{
  "requestType": "removeUserFromGroup",
   "userKey": "user_key",
  "orgToken": "your_org_token",
  "group": { "name": "group_name" },
  "user": { "email": "user_email" }
}

Response Example

"message":"Successfully removed user from group"

Remove User from an Organization

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that removes a user from an organization.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
userEmail address of the user that will be removed from the organization.stringYes

Request Example

{
  "requestType": "removeUserFromOrganization",
   "userKey": "user_key",
  "orgToken":"your_org_token",
  "user": { "email": "user_email" }
}

Response Example

"message":"Successfully removed user from organization"

Get Organization Assignments

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that gets all role assignments in an organization.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes

Request Example

{
    "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:

{
   "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"
         }
      ]
   }
}

Get Product Assignments

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that gets all role assignment in a product.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
productTokenUnique identifier of the product.stringYes

Request Example

{
    "requestType":"getProductAssignments",
     "userKey": "user_key", 
    "productToken":"product_token"
}

Response Example

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

{
   "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":{
   }
}

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:

  • Organization Administrators

  • Organization Alerts Email Receivers

  • Organization Default Approvers

  • Organization Auditors

Note: Setting an assignment will override the existing settings and not add to the existing settings.

Organization Administrators

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

ParameterDescriptionTypeRequired
requestTypeAPI request type that assigns roles at the organization-level.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
administratorsAdministrator role data object containing:
groupAssignmentsList of groups to which you want to assign the Administrator role.arrayNo
userAssignmentsList of users to which you want to assign the Administrator role.arrayNo

Request Example

{
  "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

"message":"The following organization assignments have been set: Admins"

Organization Alerts Email Receivers

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that assigns roles at the organization-level.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
alertsEmailReceiversAlert Email Receiver role data object containing:
groupAssignmentsList of groups to which you want to assign the Alert Email Receiver role.arrayNo
userAssignmentsList of users to which you want to assign the Alert Email Receiver role.arrayNo

Request Example

{
  "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

"message":"The following organization assignments have been set: Alerts Email Receivers"

Organization Default Approvers

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.

This API enables you to assign the Default Approver role to specific users and groups in an organization.

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that assigns roles at the organization-level.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
defaultApproversDefault Approvers role data object containing:
groupAssignmentGroup to which you want to assign the Default Approvers role.stringNo
userAssignmentEmail address of specific user to which you want to assign the Default Approvers role.stringNo
groupAssignmentsList of groups to which you want to assign the Default Approvers role.

NOTE: Only the first value in the array of groups will be assigned the role.
arrayNo
userAssignmentsList of email addresses of users to which you want to assign the Default Approvers role.

NOTE: Only the first value in the array of users will be assigned the role.
arrayNo

Request Example

{
  "requestType": "setOrganizationAssignments",
  "userKey": "user_key", 
  "orgToken": "organization_api_key",
  "defaultApprovers" :
  {
     "groupAssignments":[{"name":"group_name"},{"name":"group_name"}],
	 "userAssignments":[{"email":"user_email"},{"email":"user_email"}]
  }
}

Response Example

"message":"The following organization assignments have been set: Default Approvers"

Organizaton Auditors

The Organization 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

ParameterDescriptionTypeRequired
requestTypeAPI request type that assigns roles at the organization-level.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
readOnlyUsersAuditor role data object to grant read-only permissions:
groupAssignmentsList of groups to which you want to assign the Auditor role.arrayNo
userAssignmentsList of users to which you want to assign the Auditor role.arrayNo

Request Example

{
    "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

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

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 Administrators

  • Product Integrators

  • Product New Alerts Email Receivers

  • Product Alert Ignorers

  • Product Default Approvers

  • Product Assignment

Note: Setting an assignment will override the existing settings and not add to the existing settings.

Product Administrators

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that assigns roles at the product-level.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
productTokenUnique identifier of the product.stringYes
productAdminsProduct Administrator role data object containing:
userAssignmentsList of users to which you want to assign the Product Administrator role.arrayNo
groupAssignmentsList of groups to which you want to assign the Product Administrator role.arrayNo

Request Example

{
  "requestType": "setProductAssignments",
   "userKey": "user_key", 
  "productToken": "product_token",
  "productAdmins" :
  {
    "userAssignments":[{"email":"user_email"}],
    "groupAssignments":[{"name":"group_name"}]
  }
}

Response Example

"message":"The following product assignments have been set: Admins"

Product Integrators

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 Integrators product-level role to specific users and/or groups.

Note: Users that are assigned the Product Integrator role cannot make changes or access the Organization, Product, or Projects via the API.

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that assigns roles at the product-level.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
productTokenUnique identifier of the product.stringYes
productIntegratorsProduct Integrators role data object containing:
userAssignmentsList of users to which you want to assign the Product Integrators role.arrayNo
groupAssignmentsList of groups to which you want to assign the Product Integrators role.arrayNo

Request Example

{
  "requestType": "setProductAssignments",
   "userKey": "user_key", 
  "productToken": "product_token",
  "productIntegrators" :
  {
    "userAssignments":[{"email":"user_email"}],
    "groupAssignments":[{"name":"group_name"}]
  }
}

Response Example

"message":"The following product assignments have been set: Integrators"

Product New Alerts Email Receivers

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that assigns roles at the product-level.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
productTokenUnique identifier of the product.stringYes
alertsEmailReceiversAlert Email Receivers role data object containing:
userAssignmentsList of users to which you want to assign the Alert Email Receivers role.arrayNo
groupAssignmentsList of groups to which you want to assign the Alert Email Receivers role.arrayNo

Request Example

{
  "requestType": "setProductAssignments",
  "userKey": "user_key", 
  "productToken": "product_token",
  "alertsEmailReceivers" :
  {
    "userAssignments":[{"email":"user_email"}],
    "groupAssignments":[{"name":"group_name"}]
  }
}

Response Example

"message":"The following product assignments have been set: Alerts Email Receivers"

Product Alert Ignorers

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that assigns roles at the product-level.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
productTokenUnique identifier of the product.stringYes
alertIgnorersAlert Ignorers role data object containing:
userAssignmentsList of users to which you want to assign the Alert Ignorers role.arrayNo
groupAssignmentsList of groups to which you want to assign the Alert Ignorers role.arrayNo

Request Example

{
  "requestType": "setProductAssignments",
  "userKey": "user_key", 
  "productToken": "product_token",
  "alertIgnorers" :
  {
    "userAssignments":[{"email":"user_email"}],
    "groupAssignments":[{"name":"group_name"}]
  }
}

Response Example

"message":"The following product assignments have been set: Alert Ignorers"

Product Default Approvers

If the role of Product Approver is not assigned, all product tickets are sent to the organization’s Default Approvers. Any member of the organization can be assigned to this role. You can also assign the Default Approvers 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 Default Approvers role to specific users and groups at the product-level.

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that assigns roles at the product-level.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
productTokenUnique identifier of the product.stringYes
productApproversProduct Approvers role data object containing:
userAssignmentEmail address of specific user to which you want to assign the Default Approvers role.stringNo
groupAssignmentGroup to which you want to assign the Default Approvers role.stringNo
userAssignmentsList of email addresses of users to which you want to assign the Default Approvers role.

Note: Only the first value in the array of users will be assigned the role.
arrayNo
groupAssignmentsList of groups to which you want to assign the Default Approvers role.

Note: Only the first value in the array of groups will be assigned the role.
arrayNo

Request Example

{
  "requestType": "setProductAssignments",
   "userKey": "user_key", 
  "productToken": "product_token",
  "productApprovers" :
  {
    "userAssignments":[{"email":"user_email"},{"email":"user_email"}],
    "groupAssignment":[{"name":"group_name"}]
  }
}

Response Example

"message":"The following product assignments have been set: Default Approvers"

Product Assignments

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 Assignment product-level role to specific users and/or groups.

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that assigns roles at the product-level.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
productTokenUnique identifier of the product.stringYes
productMembershipProduct Assignment role data object containing:
userAssignmentsList of users to which you want to assign the Product Assignment role.arrayNo
groupAssignmentsList of groups to which you want to assign the Product Assignment role.arrayNo

Request Example

{
  "requestType": "setProductAssignments",
  "userKey": "user_key", 
  "productToken": "product_token",
  "productMembership" :
  {
    "userAssignments":[{"email":"user_email"}],
    "groupAssignments":[{"name":"group_name"}]
  }
}

Response Example

"message":"The following product assignments have been set: Membership" 

Service Users

Service Users communicate with Mend 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 and email address.

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that creates a service user.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
addedUserNew service user data object containing:
nameName of service user you want to create.stringYes

Request Example

{
  "requestType": "createServiceUser",
  "orgToken": "organization_api_key",
  "userKey": "user_key",
  "addedUser":{
    "name":"ServiceUser2"
    }
}

Response Example

{
    "userToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    "userEmail": "service_user_email_address"
}

Regenerate User Token for a Service User

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that regenerates a service user’s token key.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
serviceUserKeyCurrent token key for the service user.stringYes

Request Example

{
  "requestType": "regenerateUserKey",
  "orgToken": "organization_api_key",
   "userKey": "user_key",
   "serviceUserKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Response Example

{
    "userToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Get Organization Service Users

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that returns all the service users in an organization.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes

Request Example

{
  "requestType":"getOrganizationServiceUsers",
  "userKey":"user_key",
  "orgToken":"organization_api_key"
}

Response Example

{
    "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"
        }  
    ]
}

Get Product Service Users

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

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that returns all the service users in a product.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
productTokenUnique identifier of the product.stringYes

Request Example

{
  "requestType":"getProductServiceUsers",
  "userKey":"user_key",
  "productToken":"product_token"
}

Response Example

{
    "serviceUsers": [
        {
            "serviceUserName": "WS_4_GHC_service_user",
            "serviceUserToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        }
    ]
}

Invite User to Mend Advise for Chrome

Mend 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 Mend account administrator to invite an external user to download and use Mend Advise.

QUERY PARAMETERS

ParameterDescriptionTypeRequired
requestTypeAPI request type that enables a Mend account administrator to invite an external user to download and use Mend Advise.stringYes
userKeyThe ID of the user’s profile, which uniquely identifies the user in mend.stringYes
orgTokenAPI key which is a unique identifier of the organization.stringYes
userEmailEmail address of the external user who will receive the invitation via email.stringYes

Request Example

{
  "requestType" : "inviteUserToWebAdvisor",
   "userKey": "user_key", 
  "orgToken" : "organization_api_key",
  "userEmail": "User email address"
}

Response Example

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