ogiwak
Flexera beginner

usage guidance text in Policy Profile

Hello,

I found the following description in 2019R4 UserGuide.
Could you tell me more about this feature?

'A criterion in the policy profile can also optionally include usage guidance text as a way to communicate with the developer any obligations or best-practices related to a given inventory item.'

Thanks.

Labels (1)
0 Kudos
1 Reply
alexrybak
Revenera
Revenera

Hi There,

Usage Guidance allows the opportunity to specify how to comply with corporate policies, including license obligations via Code Insight. The content can be entered two ways:

  1. As part of a policy for automated review of published inventory items (refer to policy.png)
  2. Directly into the Usage Guidance field on the inventory item details page (refer to inventory_item_details.png)

Text that is entered via the policy will be automatically copied into the Usage Guidance field for any inventory item matching the policy criteria.

 

Below is sample Python code to obtain this value using the REST API:

import requests

HOST = "codeinsight.mycompany.com"
INVENTORY_ID = 123
JWT_TOKEN = "my-token"

url = "http://" + HOST + ":8888/codeinsight/api/inventories/" + str(INVENTORY_ID)

payload = {}
headers = {
  'Authorization': 'Bearer ' + JWT_TOKEN
}

response = requests.request("GET", url, headers=headers, data = payload)
guidance = response.json()["data"]
print(guidance["usageGuidance"])