Description: Generates an attribution report for a specific resource
Notes: Supported from Xray Version 3.118.0 and above
Security: Requires the "Manage Data" role to be set on the User or Group level.
Usage: POST api/v2/component/attribution
Consumes: application/json
Produces: application/pdf
Request body:
Name | Type | Required/Optional | Description |
|---|---|---|---|
| string | Required | Path of the requested resource in the platform |
| boolean | Optional | If to perform automatic license resolution for multiple-license components |
| boolean | Optional | If to include the full license text inside the report |
| boolean | Optional | If to include package versions as column in the report |
| string | Optional | Output format for the license attribution eport |
Response codes:
Status code | Description |
|---|---|
200 | Success - Licenses Data Returned |
400 | Failed to parse input arguments or can’t access Catalog. |
403 | Permission denied |
500 | Failed to generate the attribution report |
Sample Request
{
"path": "path/to/your/resource",
"license_resolution": true,
"full_license_text": false,
"include_package_versions": true
}
curl --location 'http://localhost:8083/xray/api/v2/component/attribution' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"path": "docker-test/juice-shop/v18.0.0/manifest.json",
"license_resolution": false,
"full_license_text": true,
"include_package_versions": true,
"format": "txt"
}'