Create Report Option
https://app.fossa.com/api/report-optionsCreate a new saved report option for the authenticated user's organization. Requires permission to save report options (ReportOptionAny or TeamReportOptionAny).
Request body (required) · application/json
namestringrequiredName of the report option (1-80 characters). Must be unique within the organization.
optionsobjectrequiredConfiguration options for customizing report generation
sectionsobjectrequiredControls which sections are included in the report
projectDeclaredLicensesbooleanrequiredInclude project declared licenses section
firstPartyLicensesbooleanrequiredInclude first party licenses section
licenseListbooleanrequiredInclude license list section
directDependenciesbooleanrequiredInclude direct dependencies section
deepDependenciesbooleanrequiredInclude deep dependencies section
snippetDependenciesbooleanrequiredInclude snippet dependencies section
copyrightListbooleanrequiredInclude copyright list section
togglesobjectrequiredFeature toggles for report generation
useHashAndVersionDatabooleanrequiredInclude hash and version data in the report
excludeFieldsobjectrequiredFields to exclude from the report
packageLabelsinteger[]requiredList of package label IDs to exclude from the report
dependencyDataobjectrequiredControls which dependency data fields are included
projectsbooleanrequiredFor release group reports, show which projects the dependency is present in
authorsbooleanrequiredThe authors of the dependency
descriptionbooleanrequiredThe description of the dependency
homepagebooleanrequiredThe homepage of the dependency
packageManagerbooleanrequiredThe package manager of the dependency
downloadUrlbooleanrequiredThe download URL of the dependency
concludedLicensesbooleanrequiredThe concluded licenses of the dependency
declaredLicensesbooleanrequiredThe declared licenses of the dependency
discoveredLicensesbooleanrequiredThe discovered licenses of the dependency
copyrightsbooleanrequiredThe copyrights of the dependency
licenseUrlbooleanrequiredThe license URL of the dependency
licenseFileMatchesbooleanrequiredThe list of files that the license was discovered in
issueResolutionNotesbooleanrequiredIssue resolution notes
packageLabelsbooleanrequiredPackage labels
dependencyPathsbooleanrequiredThe origin paths of the dependency (what files the dependency was defined/found in)
filePathsbooleanrequiredThe paths_to of the dependency (the chain of dependencies that brought it into the project)
noticeFilesbooleanrequiredNotice files
fullLicenseTextbooleanrequiredFull license text
Responses
201Report option created successfullyidintegerrequiredUnique identifier for the report option
namestringrequiredName of the saved report option
organizationIdintegerrequiredID of the organization that owns this report option
optionsobjectrequiredConfiguration options for customizing report generation
sectionsobjectrequiredControls which sections are included in the report
projectDeclaredLicensesbooleanrequiredInclude project declared licenses section
firstPartyLicensesbooleanrequiredInclude first party licenses section
licenseListbooleanrequiredInclude license list section
directDependenciesbooleanrequiredInclude direct dependencies section
deepDependenciesbooleanrequiredInclude deep dependencies section
snippetDependenciesbooleanrequiredInclude snippet dependencies section
copyrightListbooleanrequiredInclude copyright list section
togglesobjectrequiredFeature toggles for report generation
useHashAndVersionDatabooleanrequiredInclude hash and version data in the report
excludeFieldsobjectrequiredFields to exclude from the report
packageLabelsinteger[]requiredList of package label IDs to exclude from the report
dependencyDataobjectrequiredControls which dependency data fields are included
projectsbooleanrequiredFor release group reports, show which projects the dependency is present in
authorsbooleanrequiredThe authors of the dependency
descriptionbooleanrequiredThe description of the dependency
homepagebooleanrequiredThe homepage of the dependency
packageManagerbooleanrequiredThe package manager of the dependency
downloadUrlbooleanrequiredThe download URL of the dependency
concludedLicensesbooleanrequiredThe concluded licenses of the dependency
declaredLicensesbooleanrequiredThe declared licenses of the dependency
discoveredLicensesbooleanrequiredThe discovered licenses of the dependency
copyrightsbooleanrequiredThe copyrights of the dependency
licenseUrlbooleanrequiredThe license URL of the dependency
licenseFileMatchesbooleanrequiredThe list of files that the license was discovered in
issueResolutionNotesbooleanrequiredIssue resolution notes
packageLabelsbooleanrequiredPackage labels
dependencyPathsbooleanrequiredThe origin paths of the dependency (what files the dependency was defined/found in)
filePathsbooleanrequiredThe paths_to of the dependency (the chain of dependencies that brought it into the project)
noticeFilesbooleanrequiredNotice files
fullLicenseTextbooleanrequiredFull license text
createdAtstring <date-time>requiredTimestamp when the report option was created
updatedAtstring <date-time>requiredTimestamp when the report option was last updated
400Bad Request - Invalid input or duplicate nameuuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
401UnauthorizeduuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
403Forbidden - User lacks permission to save report optionsuuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
500Server ErroruuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
Try this endpoint
Build a request and run it against app.fossa.com.
Stored in this browser for 24 hours. Try It uses a docs proxy for CORS and does not store tokens server-side.
POST https://app.fossa.com/api/report-optionscurl --request POST \ --url 'https://app.fossa.com/api/report-options' \ --header 'accept: application/json' \ --header 'authorization: Bearer YOUR_API_TOKEN' \ --header 'content-type: application/json' \ --data '{ "name": "Standard Report", "options": { "sections": { "projectDeclaredLicenses": true, "firstPartyLicenses": true, "licenseList": true, "directDependencies": true, "deepDependencies": false, "snippetDependencies": false, "copyrightList": true }, "toggles": { "useHashAndVersionData": false }, "excludeFields": { "packageLabels": [] }, "dependencyData": { "projects": true, "authors": false, "description": true, "homepage": false, "packageManager": true, "downloadUrl": false, "concludedLicenses": true, "declaredLicenses": true, "discoveredLicenses": true, "copyrights": true, "licenseUrl": false, "licenseFileMatches": false, "issueResolutionNotes": false, "packageLabels": false, "dependencyPaths": false, "filePaths": false, "noticeFiles": false, "fullLicenseText": false } }}'Real request. Mutating methods can change data.