How to get License list as CSV file for Xray 2.x

Hirofumi Iwashita
2023-01-22 11:05

Xray doesn't expose License list to public either through UI or via any REST API commands. But as they are stored in MongoDB, we could export it from there.
We can use the below mongoexport command to get the license list.mongoexport --db --username --password --collection licenses --csv --fields _id,key,name,urls,standardHeader,text,comments,nameRegexp,osiApproved,spdxApproved,depreated,deprecates,isCustom --out export.csv