Create Package Label Assignments
https://app.fossa.com/api/package-label-assignmentsAssign one or more Package Labels to a single package. Note - This endpoint is not available for organizations on the Free plan.
Request body (required) · application/json
packageIdstringrequiredThe ID of the package to assign labels to.
packageVersionstringThe version of the package to assign labels to or blank for all versions.
scopeenumrequiredThe scope of the package label assignment.
orgprojectrevisionscopeIdstringThe ID of the scope to assign labels to.
labelIdsinteger[]requiredThe IDs of the labels to assign to the package.
Responses
201CreatedpackageLabelAssignmentsobject[]requiredThe package label assignments that were written. Newly created assignments only -- existing (duplicate) assignments are not returned.
idintegerrequiredThe ID of the package label assignment.
createdAtstring <date-time>requiredThe date and time the package label assignment was created.
updatedAtstring <date-time>requiredThe date and time the package label assignment was last updated.
organizationIdintegerrequiredThe ID of the organization that owns the package label assignment.
labelIdintegerrequiredThe ID of the label that was assigned to the package.
packageIdstringrequiredThe ID of the package that the label was assigned to.
packageVersionstringThe version of the package that the label was assigned to or null if the label was assigned to all versions.
scopeenumrequiredThe scope of the package label assignment.
orgprojectrevisionscopeIdstringrequiredThe ID of the scope that the label was assigned to or null if the label was assigned to all scopes.
400Bad requestuuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
403ForbiddenuuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
500Internal server 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/package-label-assignmentscurl --request POST \ --url 'https://app.fossa.com/api/package-label-assignments' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data '{ "packageId": "npm+lodash", "packageVersion": "4.15.0", "scope": "project", "scopeId": "custom+1/my-cli-project", "labelIds": [ 1, 2 ]}'Real request. Mutating methods can change data.