Update Projects Policies
https://app.fossa.com/api/v2/projects/policyUpdate the policy for one to many projects.
Query parameters
policyIdnumberrequiredThe ID of the policy you want to apply to projects.
locatorsenum | string[]requiredThe list of locators for the projects to update. If "all" is provided, then all projects that meet the provided filters will have the policy applied.
titlestringFilter by project name.
type[]enum[]Filter by project type.
isPublicbooleanFilter by project being public or private.
labels[]string[]Filter by project labels.
teamId[]array | nullFilter by one or more team IDs. Providing "null" will return all unassigned projects.
latestScanintegerFilter by last policy scan within N days.
lastRevisionWithinintegerFilter by last revision analyzed within N days.
urlstringFilter by a project's URL.
includeSharedProjectsbooleanInclude shared projects.
onlyIncludeSharedProjectsbooleanOnly show projects that have been shared with other organizations.
Responses
200OKAn object detailing failures when applying the label. The keys are locators of projects that failed. The values are error messages. If it is empty, everything succeeded.
403ForbiddenuuidstringUnique 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.
PUT https://app.fossa.com/api/v2/projects/policycurl --request PUT \ --url 'https://app.fossa.com/api/v2/projects/policy' \ --header 'accept: application/json' \ --header 'authorization: Bearer YOUR_API_TOKEN'Real request. Mutating methods can change data.
Query params
policyIdnumberrequiredThe ID of the policy you want to apply to projects.
locatorsstringrequiredThe list of locators for the projects to update. If "all" is provided, then all projects that meet the provided filters will have the policy applied.
titlestringFilter by project name.
type[]arrayFilter by project type.
isPublicbooleanFilter by project being public or private.
labels[]arrayFilter by project labels.
teamId[]arrayFilter by one or more team IDs. Providing "null" will return all unassigned projects.
latestScanintegerFilter by last policy scan within N days.
lastRevisionWithinintegerFilter by last revision analyzed within N days.
urlstringFilter by a project's URL.
includeSharedProjectsbooleanInclude shared projects.
onlyIncludeSharedProjectsbooleanOnly show projects that have been shared with other organizations.