- Revenera Community
- :
- Code Insight
- :
- Code Insight Forum
- :
- usage guidance text in Policy Profile
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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:
- As part of a policy for automated review of published inventory items (refer to policy.png)
- 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"])