Versions Compared

Key

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

NOTES:

  • API capability requires an additional WhiteSource license. Contact your CSM for more details.

  • For customers who have enabled vulnerability-based alerting, there are several changes to API version 1.3 -  refer here for details.

  • This page covers APIs for version 1.3. All version 1.3 APIs must include:

...

Code Block
"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  
    }
]

Info

Response Parameters

  • matchType parameter value can be either 'manual' (manually marked by user) or 'automatic' (automatically marked by in-house rule).

  • pattern parameter is not returned for a library if matchType value is 'manual'.

  • comment parameter is not returned for a library if matchType value is 'automatic'.

...

Get product tags: key, value.

Request

Code Block
{
	"requestType": "getProductTags",
    "userKey": "user_key", 
	"productToken": productToken
}

Response

Code Block
{
	"productTags":[
    	{
			"name": "My Product A",
			"token": "product_token",
			"tags": {
                "newKey": [
                    "newValue",
                    "newValue2"
                ],
                "tagKeyA": [
                    "tagValueA"
                ]
            }
        }
    ]

...

Save a product tag: key, value.

Request

Code Block
{
"requestType": "saveProductTag",
"userKey": "user_key", 
"productToken": "productToken",
"tagKey": "newKey",
"tagValue": "newValue"
}

Response

Code Block
{
    "productTagsInfo": {
        "name": "productA",
        "token": {productToken},  
        "tags": {
            "newKey": "newValue"
        }
    }
}

...

Get organizational product tags: key, value.

Request

Code Block
{
"requestType": "getOrganizationProductTags",
"userKey": "user_key", 
"orgToken": "orgToken"
}

Response

Code Block
{
    "productTags": [
        {
            "name": "productA",
            "token": " productAToken",
            "tags": {
                "newKey": [
                    "newValue",
                    "newValue2"
                ],
                "tagKeyA": [
                    "tagValueA"
                ]
            }
        },
        {
            "name": " productB",
            "token": " productBToken",
            "tags": {}
        }
    ]
}

...

Remove a product tag: key, value.

Request

Code Block
{
	"requestType" : "removeProductTag",
     "userKey": "user_key", 
	"productToken" : "product_token",
    "tagKey": "newKey",
    "tagValue": "newValue"
}

Response

Code Block
{
    "message": "Successfully removed product tag"
}

...