Get the details of a specific snippet
https://app.fossa.com/api/revisions/{locator}/snippets/{snippetId}Retrieve a specific snippet's details by its ID.
Path parameters
locatorstringrequiredThe revision locator
snippetIdstringrequiredThe unique identifier of the snippet
Query parameters
pathstringAn optional file path used to hydrate the snippet match details for that path.
Responses
200Successfully retrieved snippetsnippetobjectrequiredidstringrequiredUnique identifier for the snippet
packageIdstringrequiredUnique identifier for the snippet package
purlstringrequiredPackage URL (purl) for the snippet
locatorstringrequiredThe locator for the snippet (optional)
packagestringrequiredName of the package containing the snippet
versionstringrequiredVersion of the package
kindenumrequiredType of snippet detection (snippet=partial match, file=100% match)
snippetfilematchCountintegerrequiredTotal number of matches for this snippet
matchesobject[]requiredArray of path matches where this snippet was detected
pathstringrequiredThe file path where the match was detected
matchPercentagenumberrequiredMatch percentage for this specific match
rejectionDetailsobjectrejectedAtstring <date-time>requiredTimestamp when the snippet was rejected
rejectedBystringUser who rejected the snippet (optional)
highestMatchPercentagenumberrequiredThe 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[]requiredArray of licenses associated with the snippet
signaturestringrequiredLicense signature or identifier
typeenumrequiredHow the license was identified
declareddiscoveredstatusenumApproval status of the license (optional; absent for licenses with no issue)
deniedflaggedunknownissueIdintegerID of the related issue (optional)
issueCountsobjectrequiredIssue counts by type
licensingobjectdeniedintegerrequiredNumber of denied issues
flaggedintegerrequiredNumber of flagged issues
unknownintegerrequiredNumber of unknown issues
securityobjectcriticalintegerrequiredNumber of critical issues
highintegerrequiredNumber of high issues
mediumintegerrequiredNumber of medium issues
lowintegerrequiredNumber of low issues
unknownintegerrequiredNumber of unknown severity issues
rejectionDetailsobjectrejectedAtstring <date-time>requiredTimestamp when the snippet was rejected
rejectedBystringUser who rejected the snippet (optional)
labelsobject[]requiredPackage labels assigned to this snippet
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.
namestringrequiredThe name of the label that was assigned to the package.
otherVersionsobject[]Other versions of the package where this snippet was detected
versionstringVersion of the package
matchCountintegerTotal number of matches for the snippet in that version
isVendoredbooleanrequiredWhether the snippet exists as a vendored dependency
isConvertedbooleanrequiredWhether the snippet has been converted to a vendored dependency
400Bad RequestuuidstringUnique 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
403ForbiddenuuidstringUnique identifier associated with the error
codeintegerfossa specific error code
messagestringmessage associated with this error
namestringname of the error
httpStatusCodeintegerhttp status code number
404Snippet not founduuidstringUnique 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.
GET https://app.fossa.com/api/revisions/%7Blocator%7D/snippets/%7BsnippetId%7Dcurl --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.
Path params
locatorstringrequiredThe revision locator
snippetIdstringrequiredThe unique identifier of the snippet
Query params
pathstringAn optional file path used to hydrate the snippet match details for that path.