Get snippet count
https://app.fossa.com/api/revisions/{locator}/snippets/countGet the total count of snippets detected in a revision with optional filtering.
Path parameters
locatorstringrequiredThe revision locator
Query parameters
pathstringrequiredThe path to filter snippets by
idsstring[]Filter by specific snippet IDs
packageIdsstring[]Filter by specific snippet package IDs
searchstringSearch term for filtering snippets by package name
rejectionStatusenum[]Filter by rejection status
packageLabelsstring[]Filter by package labels
vendoredMatchenum[]Filter snippets by vendored/converted match status. Accepts one or more of: | Value | Description | |-------|-------------| | `vendored` | Include snippets that exist as a vendored dependency | | `exVendored` | Exclude snippets that exist as a vendored dependency | | `converted` | Include snippets that have been converted to vendored dependencies | | `exConverted` | Exclude snippets that have been converted to vendored dependencies |
Responses
200Successfully retrieved snippet countcountintegerThe total number of snippets matching the filter criteria
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
404NotFounduuidstringUnique 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/countcurl --request GET \ --url 'https://app.fossa.com/api/revisions/%7Blocator%7D/snippets/count' \ --header 'accept: application/json'Real request. Mutating methods can change data.
Path params
locatorstringrequiredThe revision locator
Query params
pathstringrequiredThe path to filter snippets by
idsarrayFilter by specific snippet IDs
packageIdsarrayFilter by specific snippet package IDs
searchstringSearch term for filtering snippets by package name
rejectionStatusarrayFilter by rejection status
packageLabelsarrayFilter by package labels
vendoredMatcharrayFilter snippets by vendored/converted match status. Accepts one or more of: | Value | Description | |-------|-------------| | `vendored` | Include snippets that exist as a vendored dependency | | `exVendored` | Exclude snippets that exist as a vendored dependency | | `converted` | Include snippets that have been converted to vendored dependencies | | `exConverted` | Exclude snippets that have been converted to vendored dependencies |