Generally, each level of the administrator (Global Org, Organization, Product, Project) can get or set the API attributes in the API calls that refer to their scope or are under their scope. For example, Product administrators can execute API calls related to their Projects/Products that are defined in Mend Application, but they cannot execute Organization-related API calls which are outside their scope.
This document showcases the API requests and responses for:
Creating global organizations, assigning them to organizations, or removing them from organizations
Getting all organizations and their details
Getting all products and their vitals at the organization-level
Getting all projects and their vitals at the organization and product-level
Change the assignment of projects between products
Changing the owner for all policies in an organization
Getting In-House libraries at the organization, product and project-level
Unmarking libraries that were manually assigned as In-House, at the organization level
NOTE: Global Organization Level APIs can be accessed only by users with Site Admin privileges in On-Premise environments.
The following APIs describe how to create global organizations, assign them to organizations, or remove them from organizations.
This API request creates a global organization with an API key token which is its unique identifier.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that creates a global organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
name | Name to be assigned to the global organization. | string | Yes |
accountAdminEmail | Email account of the Administrator that is creating the global organization. | string | Yes |
{
"requestType": "createGlobalOrg",
"userKey": "user_key",
"name": "global_org_name",
"accountAdminEmail": "enter_account_admin_email@here.com"
}
Response Example
The Response returns the token key that uniquely identifies the global organization.
{
"globalOrgToken": "global_org_token"
}
This API request assigns a global organization to an organization.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that assigns a global organization to an organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
orgToken | API key which is the unique identifier of the organization. Admins can find this token in the "Integrate" tab of the application, in the "API Key" field. | string | Yes |
globalOrgToken | API token key which identifies the global organization to be assigned. | string | Yes |
{
"requestType": "assignGlobalOrgToOrg",
"userKey": "user_key",
"orgToken": "organization_api_key",
"globalOrgToken": "global_org_token"
}
Response Example
"message":"Successfully assigned global organization to given organization"
This API request removes a global organization from an organization.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that removes a global organization from an organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
orgToken | API key which is the unique identifier of the organization. Admins can find this token in the "Integrate" tab of the application, in the "API Key" field. | string | Yes |
globalOrgToken | API token key which identifies the global organization to be removed. | string | Yes |
{
"requestType": "removeGlobalOrgFromOrg",
"userKey": "user_key",
"orgToken": "organization_api_key",
"globalOrgToken": "global_org_token"
}
Response Example
"message":"Successfully removed global organization from given organization"
This API request returns data on all organizations within the Global Organization.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns the name and token ID of all the organizations in a global organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
globalOrgToken | API token key which uniquely identifies the global organization. | string | Yes |
Request Example
{
"requestType":"getAllOrganizations",
"userKey": "user_key",
"globalOrgToken":"global_organization_token"
}
Response Example
{
"organizations": [
{
"orgName": "Org A",
"orgToken": "Org_a_token"
},
{
"orgName": "Org B",
"orgToken": "Org_b_token"
}
],
"message": "Success"
}
This API request returns details about an organization, such as, name, token key, creation date, number of products, projects, groups, and users in the organization.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns the details of an organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
orgToken | API token key which uniquely identifies the organization. | string | Yes |
Request Example
{
"requestType":"getOrganizationDetails",
"orgToken":"organization_api_key",
“userKey”:”user_key”
}
Response Example
{
"orgName": "Org A",
"orgToken": "Org_a_token",
"creationDate": "2016-01-01 12:00:00",
"numberOfProducts": "15",
"numberOfProjects": "105",
"numberOfGroups": "2",
"numberOfUsers": "3"
}
This API request gets all products in the organization; name and token of each.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns all the products in an organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
orgToken | API token key which uniquely identifies the organization. | string | Yes |
Request Example
{
"requestType":"getAllProducts",
"userKey": "user_key",
"orgToken":"org_token"
}
Response Example
{
"products": [
{
"productName": "Product A",
"productToken": "product_a_token"
},
{
"productName": "Product B",
"productToken": "product_b_token"
}
],
"message": "Success"
}
This API request gets basic information about each product in an organization: ID, name, token, creation date and last updated date.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns the vitals of all products in an organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
orgToken | API token key which uniquely identifies the organization. | string | Yes |
Request Example
{
"requestType" : "getOrganizationProductVitals",
"userKey": "user_key",
"orgToken" : "organization_api_key"
}
Response Example
{
"productVitals": [
{
"id": 626506,
"name": "Demo Product",
"token": "product_token",
"creationDate": "2020-03-09 15:28:38 +0000",
"lastUpdatedDate": "2020-03-10 08:46:29 +0000"
},
{
"id": 626507,
"name": "Cfy",
"token": "product_token",
"creationDate": "2020-03-09 15:29:11 +0000",
"lastUpdatedDate": "2020-03-10 08:18:37 +0000"
},
{
"id": 626930,
"name": "Rx",
"token": "product_token",
"creationDate": "2020-03-10 07:29:45 +0000",
"lastUpdatedDate": "2020-03-10 14:59:55 +0000"
},
This API request receives a product token and returns all the projects in the specified product; name and token of each.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns data of all the projects in a product. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
productToken | API token key which uniquely identifies the product. | string | Yes |
Request Example
{
"requestType":"getAllProjects",
"userKey": "user_key",
"productToken":"product_token"
}
Response Example
{
"projects": [
{
"projectName": "project_a",
"projectToken": "project_a_token"
},
{
"projectName": "project_b",
"projectToken": "project_b_token"
}
],
"message": "Success"
}
This API request gets basic information about each project in an organization: ID, name, token, creation date and last updated date.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns the vitals of all projects in an organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
orgToken | API token key which uniquely identifies the organization. | string | Yes |
Request Example
{
"requestType" : "getOrganizationProjectVitals",
"userKey": "user_key",
"orgToken" : "organization_api_key"
}
Response Example
{
"projectVitals": [
{
"id": 2036041,
"name": "Demo Data",
"token": "org_token",
"creationDate": "2020-03-09 15:28:38 +0000",
"lastUpdatedDate": "2020-03-09 15:28:38 +0000"
},
{
"id": 2036049,
"name": "cfy-1",
"token": "org_token",
"creationDate": "2020-03-09 15:29:49 +0000",
"lastUpdatedDate": "2020-03-09 15:29:49 +0000"
},
..........
This API request gets basic information about each project in a product: ID, name, token, creation date and last updated date.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns the vitals of all projects in a product. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
productToken | API token key which uniquely identifies the product. | string | Yes |
Request Example
{
"requestType" : "getProductProjectVitals",
"userKey": "user_key",
"productToken" : "product_token"
}
Response Example
{
"projectVitals": [
{
"pluginName": "unified agent",
"pluginVersion": "20.2.1",
"id": 2038527,
"name": "my-proj",
"token": "product_token",
"creationDate": "2020-03-10 08:33:25 +0000",
"lastUpdatedDate": "2020-03-10 08:34:38 +0000"
}
]
}
This API request gets basic information about each project in an organization: ID, name, token, creation date and last updated date.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns the vitals of a project. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
projectToken | API token key which uniquely identifies the project. | string | Yes |
Request Example
{
"requestType" : "getProjectVitals",
"userKey": "user_key",
"projectToken" : "project_token"
}
Response Example
{
"projectVitals":[
{
"pluginName":"fs-agent",
"pluginVersion": "18.2.2",
"name": "My Project",
"token": "project_token",
"uploadedBy": "name_of_user_who_ran_scan",
"creationDate": "2016-01-01 12:00:00",
"lastUpdatedDate": "2016-02-02 16:50:59"
}
]
}
This API request allows you to move projects that are assigned to a particular product and assign them to another product.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that changes the project assignment. | string | Yes |
orgtoken | API token key which uniquely identifies the organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in Mend. | string | Yes |
projectToken | API token key which uniquely identifies the project to be reassigned. | string | Yes |
newProductToken | API token key which uniquely identifies the product to which the project will be reassigned. | string | Yes |
Request Example
{
"requestType": "changeProjectAssignment",
"orgToken": "{{orgToken}}",
"userKey": "{{userKey}}",
"projectToken": "{{projectToken}}",
"newProductToken": "{{productToken}}"
}
Response
{
"message": "Project assigned successfully to the new product"
}
This API finds all the policies that were created by the user with the email specified in "currentPolicyOwnerEmail"
, and reassigns them to the user with the email specified in "newPolicyOwnerEmail".
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that changes the policy owner for all policies in an organization. | string | Yes |
userKey | The ID of the user’s profile, which uniquely identifies the user in mend. | string | Yes |
orgToken | API token key which uniquely identifies the organization. | string | Yes |
currentPolicyOwnerEmail | Email address of current policy owner. | string | Yes |
newPolicyOwnerEmail | Email address of new policy owner for the organization. | string | Yes |
Request Example
{
"requestType":"changeOrganizationPolicyOwner",
"userKey": "user_key",
"orgToken":"organization_api_key",
"currentPolicyOwnerEmail":"Owner.email@mendsoftware.com",
"newPolicyOwnerEmail" : "newOwner.email@mendsoftware.com"
}
Response
{
"message": "Successfully changed policy owners in the organization"
}
This API request gets information about In-House libraries for an organization, product, or project.
Notes about the Response Parameters:
matchType parameter value shows “manual” if it is manually marked by user, or “automatic” if it is automatically marked by an In-House rule.
pattern parameter is not returned for a library if the matchType value is “manual”.
comment parameter is not returned for a library if the matchType value is “automatic”.
Get all In-House libraries at the organization level.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns all In-House libraries for 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 mend. | string | Yes |
Request Example
{
"requestType" : "getOrganizationInHouseLibraries",
"orgToken" : "organization_api_key",
"userKey": "user_key"
}
Response Example
{
"libraries": [
{
"matchType": "manual",
"comment": "",
"keyUuid": "library_unique_id",
"filename": "neo4j-lucene-index-1.8.1.jar",
"groupId": "org.neo4j",
"artifactId": "neo4j-lucene-index",
"sha1": "library_sha1",
"type": "MAVEN_ARTIFACT",
"description": "Integration layer between Neo4j and Lucene, providing one possible implementation of the Index API.",
"productName": "Demo Product",
"productToken": "product_token",
"projectName": "Demo Data",
"projectToken": "project_token"
},
{
"matchType": "manual",
"comment": "",
"keyUuid": "library_unique_id",
"filename": "nekohtml-1.9.6.2.jar",
"groupId": "nekohtml",
"artifactId": "nekohtml",
"sha1": "library_sha1",
"type": "MAVEN_ARTIFACT",
"productName": "Demo Product",
"productToken": "product_token",
"projectName": "Demo Data",
"projectToken": "project_token"
}
]
}
Get all In-House libraries at the product level.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns all In-House libraries for 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 mend. | string | Yes |
Request Example
{
"requestType" : "getProductInHouseLibraries",
"productToken" : "product_token",
"userKey": "user_key"
}
Response Example
{
"libraries": [
{
"matchType": "manual",
"comment": "",
"keyUuid": "library_unique_id",
"filename": "neo4j-lucene-index-1.8.1.jar",
"groupId": "org.neo4j",
"artifactId": "neo4j-lucene-index",
"sha1": "library_sha1",
"type": "MAVEN_ARTIFACT",
"description": "Integration layer between Neo4j and Lucene, providing one possible implementation of the Index API.",
"productName": "Demo Product",
"productToken": "product_token",
"projectName": "Demo Data",
"projectToken": "project_token"
},
.........
]
}
Get all In-House libraries at the project level.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns all In-House libraries for 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 mend. | string | Yes |
Request Example
{
"requestType" : "getProjectInHouseLibraries",
"projectToken" : "project_token",
"userKey": "user_key"
}
Response Example
"libraries" : [
{
"matchType" : "manual",
"comment": "manually set to In-House",
"keyUuid": "library_unique_id",
"filename": "library_file_name",
"groupId": "library_group_id",
"artifactId": "library_artifact_id",
"version": "library_version",
"sha1": "library_sha1",
"type": "library_type",
"description": "library_description",
"productName" : "product_name",
"productToken" : "product_token",
"projectName" : "project_name",
"projectToken" : "project_token"
},
{
"matchType" : "automatic",
"pattern" : "common-*",
"keyUuid": "library_unique_id",
"filename": "library_file_name",
"groupId": "library_group_id",
"artifactId": "library_artifact_id",
"version": "library_version",
"sha1": "library_sha1",
"type": "library_type",
"description": "library_description",
"productName" : "product_name",
"productToken" : "product_token",
"projectName" : "project_name",
"projectToken" : "project_token
}
]
This API request enables you to unmark libraries that were manually assigned as In-House. This request is only at the organization level.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that unmarks a library that was manually assigned as In-House, at the organization level. | 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 mend. | string | Yes |
keyUuid | The ID of the library which uniquely identifies it. | string | Yes |
Request Example
{
"requestType": "unmarkManualInHouseLibrary",
"userKey": "user_key",
"orgToken": "organization_api_key",
"keyUuid" : "library_UUID"
}
Response Example
{
"message": "Successfully unmarked in-house library"
}
Theses APIs retrieve a list of all Pending Tasks in a domain and allow them to be deleted one by one.
This API requests a list of all Pending Tasks in a domain.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type that returns all Pending Tasks in the domain. | 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 Mend. | string | Yes |
page | The page number from which to start listing the pending tasks. The default is 0. | integer | No |
pageSize | The number of pending tasks to be included in the page; permitted values are in the range 1-10,000 | integer | No |
Request Example
{
"requestType":"getDomainPendingTasks",
"orgToken": "organization_api_key",
"userKey": "user_key",
"page": 0,
"pageSize": 1000
}
Response Example
{
"pendingTaskInfos": [
{
"uuid": "dd63bdb4-2a46-40db-a4a8-c894988a99fc",
"productName": "red",
"projectName": "redeb - 13",
"artifact": "libudev1_245.4-4ubuntu3.13_amd64.deb",
"sha1": "83dc945b8b471c42ee9037cace6801dbb904f0fe",
"creationTime": "2022-04-18 10:28:18",
"approverEmail": "hasan.mosa@mendsoftware.com"
},
{
"uuid": "e5ee86b7-5c5a-4aa1-a90d-ed59746a719e",
"productName": "Test_Product",
"projectName": "G_Project",
"artifact": "ecrcustomerisv2-cloud-config-03.00.00.71-SNAPSHOT.jar",
"sha1": "f82138e1d2823fd0be5cbfafcceefaae70eaf4fe",
"creationTime": "2022-04-06 10:59:06",
"approverEmail": "hasan.mosa@mendsoftware.com"
}
]
}
This API request deletes a single Pending Task in a domain with a given UUID.
Parameter | Description | Type | Required |
---|---|---|---|
requestType | API request type for deleting a Pending Task. | 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 mend. | string | Yes |
taskUUID | A uuid for one of the Pending Tasks that was returned by the getDomainPendingTasks API. | string | Yes |
Request Example
{
"requestType":"closePendingTask",
"orgToken": "organization_api_key",
"userKey": "user_key",
"taskUUID": "e5ee86b7-5c5a-4aa1-a90d-ed59746a719e"
}
Response Example
{
"message": "Pending task closed successfully" / "Pending task not closed"
}