Get the details of a specific snippet

gethttps://app.fossa.com/api/revisions/{locator}/snippets/{snippetId}

Retrieve a specific snippet's details by its ID.

Path parameters

locatorstringrequired

The revision locator

snippetIdstringrequired

The unique identifier of the snippet

Query parameters

pathstring

An optional file path used to hydrate the snippet match details for that path.

Responses

200Successfully retrieved snippet
snippetobjectrequired
idstringrequired

Unique identifier for the snippet

packageIdstringrequired

Unique identifier for the snippet package

purlstringrequired

Package URL (purl) for the snippet

locatorstringrequired

The locator for the snippet (optional)

packagestringrequired

Name of the package containing the snippet

versionstringrequired

Version of the package

kindenumrequired

Type of snippet detection (snippet=partial match, file=100% match)

snippetfile
matchCountintegerrequired

Total number of matches for this snippet

matchesobject[]required

Array of path matches where this snippet was detected

pathstringrequired

The file path where the match was detected

matchPercentagenumberrequired

Match percentage for this specific match

rejectionDetailsobject
rejectedAtstring <date-time>required

Timestamp when the snippet was rejected

rejectedBystring

User who rejected the snippet (optional)

highestMatchPercentagenumberrequired

The highest match percentage across all matches

releaseDatestring <date-time>

Release date of the package (optional)

homeUrlstring <uri>

Homepage URL of the package (optional)

codeUrlstring <uri>

Source code URL of the package (optional)

licensesobject[]required

Array of licenses associated with the snippet

signaturestringrequired

License signature or identifier

typeenumrequired

How the license was identified

declareddiscovered
statusenum

Approval status of the license (optional; absent for licenses with no issue)

deniedflaggedunknown
issueIdinteger

ID of the related issue (optional)

issueCountsobjectrequired

Issue counts by type

licensingobject
deniedintegerrequired

Number of denied issues

flaggedintegerrequired

Number of flagged issues

unknownintegerrequired

Number of unknown issues

securityobject
criticalintegerrequired

Number of critical issues

highintegerrequired

Number of high issues

mediumintegerrequired

Number of medium issues

lowintegerrequired

Number of low issues

unknownintegerrequired

Number of unknown severity issues

rejectionDetailsobject
rejectedAtstring <date-time>required

Timestamp when the snippet was rejected

rejectedBystring

User who rejected the snippet (optional)

labelsobject[]required

Package labels assigned to this snippet

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.

namestringrequired

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

otherVersionsobject[]

Other versions of the package where this snippet was detected

versionstring

Version of the package

matchCountinteger

Total number of matches for the snippet in that version

isVendoredbooleanrequired

Whether the snippet exists as a vendored dependency

isConvertedbooleanrequired

Whether the snippet has been converted to a vendored dependency

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

401Unauthorized
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

404Snippet not found
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.

GET https://app.fossa.com/api/revisions/%7Blocator%7D/snippets/%7BsnippetId%7D
curl --request GET \  --url 'https://app.fossa.com/api/revisions/%7Blocator%7D/snippets/%7BsnippetId%7D' \  --header 'accept: application/json'

Real request. Mutating methods can change data.

Click Try It to run a request and see the response here.
Missing path params: locator, snippetId

Path params

locatorstringrequired

The revision locator

snippetIdstringrequired

The unique identifier of the snippet

Query params

pathstring

An optional file path used to hydrate the snippet match details for that path.