Update Package Label Assignments

puthttps://app.fossa.com/api/package-label-assignments

Reconcile the Package Label assignments for a single package at a given scope. The desired end state is supplied as `newLabelIds`, a map keyed by package version (use the version string, or `all` for assignments that apply to every version) whose value is the list of label IDs that should be assigned for that version. Existing assignments not present in the map are removed and any new label IDs are added. Note - This endpoint is not available for organizations on the Free plan.

Request body (required) · application/json

packageIdstringrequired

The ID of the package whose label assignments are being reconciled.

scopeenumrequired

The scope of the package label assignment.

orgprojectrevision
scopeIdstring

The ID of the scope to reconcile assignments for.

newLabelIdsobjectrequired

The desired label assignments, keyed by package version (or `all` for assignments that apply to every version). Each value is the list of label IDs that should be assigned for that version.

Responses

200OK
packageLabelAssignmentsobject[]required

The package label assignments that were written. Newly created assignments only -- existing (duplicate) assignments are not returned.

idintegerrequired

The ID of the package label assignment.

createdAtstring <date-time>required

The date and time the package label assignment was created.

updatedAtstring <date-time>required

The date and time the package label assignment was last updated.

organizationIdintegerrequired

The ID of the organization that owns the package label assignment.

labelIdintegerrequired

The ID of the label that was assigned to the package.

packageIdstringrequired

The ID of the package that the label was assigned to.

packageVersionstring

The version of the package that the label was assigned to or null if the label was assigned to all versions.

scopeenumrequired

The scope of the package label assignment.

orgprojectrevision
scopeIdstringrequired

The ID of the scope that the label was assigned to or null if the label was assigned to all scopes.

400Bad request
uuidstring

Unique identifier associated with the error

codeinteger

fossa specific error code

messagestring

message associated with this error

namestring

name of the error

httpStatusCodeinteger

http status code number

403Forbidden
uuidstring

Unique identifier associated with the error

codeinteger

fossa specific error code

messagestring

message associated with this error

namestring

name of the error

httpStatusCodeinteger

http status code number

500Internal server error
uuidstring

Unique identifier associated with the error

codeinteger

fossa specific error code

messagestring

message associated with this error

namestring

name of the error

httpStatusCodeinteger

http status code number

Try this endpoint

Build a request and run it against app.fossa.com.

Bearer

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/package-label-assignments
curl --request PUT \  --url 'https://app.fossa.com/api/package-label-assignments' \  --header 'accept: application/json' \  --header 'content-type: application/json' \  --data '{  "packageId": "npm+lodash",  "scope": "project",  "scopeId": "custom+1/my-cli-project",  "newLabelIds": {    "4.15.0": [      1,      2    ],    "all": [      3    ]  }}'

Real request. Mutating methods can change data.

Click Try It to run a request and see the response here.
application/json