Get snippet count

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

Get the total count of snippets detected in a revision with optional filtering.

Path parameters

locatorstringrequired

The revision locator

Query parameters

pathstringrequired

The path to filter snippets by

idsstring[]

Filter by specific snippet IDs

packageIdsstring[]

Filter by specific snippet package IDs

searchstring

Search 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 count
countinteger

The total number of snippets matching the filter criteria

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

404NotFound
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/count
curl --request GET \  --url 'https://app.fossa.com/api/revisions/%7Blocator%7D/snippets/count' \  --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

Path params

locatorstringrequired

The revision locator

Query params

pathstringrequired

The path to filter snippets by

idsarray

Filter by specific snippet IDs

packageIdsarray

Filter by specific snippet package IDs

searchstring

Search term for filtering snippets by package name

rejectionStatusarray

Filter by rejection status

packageLabelsarray

Filter by package labels

vendoredMatcharray

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 |