List repositories
/api/v1/org/{orgId}/repos List Repositories
List all repositories found via repository integrations for the given organization.
Usage:
Results are paginated via the previous and next page keys.
To get additional pages, use the nextPageKey or previousPageKey from the response and send back in as the page query param.
When the page parameter is provided, all other query parameters are ignored.
Additional Parameters:
query- fuzzy find repositories by name.sortField- the field to sort the repositories by.sortDir- direction to sort.pageSize- number of results to return.pageToken- zero-based index of the page to return.filters- comma separated list of named filters to apply.windowDays- the scan window in days for theTESTED_CURRENT_REPOSandSTALE_REPOSfilters:7,30or90. Defaults to30.
Attack-surface filters:
These filters values split the attack surface into the same buckets as the attack-surface stats, so a filtered list matches the bucket's count for the same windowDays:
TESTED_CURRENT_REPOS- Current: mapped to at least one application, last scanned withinwindowDays, and last scanned at or after the last commit.STALE_REPOS- Stale: mapped and scanned at least once, but either not scanned withinwindowDaysor with a commit after the last scan.MAPPED_NEVER_TESTED_REPOS- Never: mapped to at least one application and never scanned.UNCOVERED_REPOS- Not Set Up: in the attack surface with no mapped application.
"Last commit" is the source provider's last push time, on any branch. "Last scan" is the newest scan across all applications mapped to the repository.
New-repository filters:
NEW_TO_ATTACK_SURFACE_REPOS- repositories added to the attack surface in the last 30 days, or since the integration was created if that is more recent.NEW_REPOS- repositories created in the last 30 days, or since the integration was created if that is more recent.
Requires
read:repositorypermission.
Path parameters
orgIdstring · uuidrequiredUUID identifier for this StackHawk Organization.
Query parameters
querystringA term used to filter results based on matching content in one or more fields.
sortFieldstringResource field to sort paginated response by.
10 available options
idfullNamelastCommitlastContributorlastScanTimeStampstackHawkApplicationscorestatuscommitCountsensitiveTagsCountsortDirstringPaginated results are sorted 'asc' or 'desc'.
3 available options
ASCDESCUNSORTEDpageSizeinteger · int32Pagination response size limit.
10pageTokeninteger · int32Pagination request page increment.
0pagestringPagination page key.
repoFilterstringRepository search filter (Deprecated: Use filters param instead).
"ALL_REPOS"21 available options
ALL_REPOSUNMAPPED_REPOSMAPPED_REPOSHIDDEN_REPOSREPOS_WITH_APP_SCANSREPOS_WITH_NO_APP_SCANSREPOS_WITH_INSIGHTSREPOS_WITH_NO_INSIGHTSWEB_APP_REPOSREPOS_IN_ATTACK_SURFACEREPOS_NOT_IN_ATTACK_SURFACEUNCOVERED_REPOSREPOS_WITH_RECENT_SCANSREPOS_WITH_GENERATED_OASREPOS_WITHOUT_GENERATED_OASREPOS_WITHOUT_RECENT_SCANSTESTED_CURRENT_REPOSSTALE_REPOSMAPPED_NEVER_TESTED_REPOSNEW_TO_ATTACK_SURFACE_REPOSNEW_REPOSappFilterstringRepository search application filter (Deprecated: Use filters param instead).
"ALL_REPOS"21 available options
ALL_REPOSUNMAPPED_REPOSMAPPED_REPOSHIDDEN_REPOSREPOS_WITH_APP_SCANSREPOS_WITH_NO_APP_SCANSREPOS_WITH_INSIGHTSREPOS_WITH_NO_INSIGHTSWEB_APP_REPOSREPOS_IN_ATTACK_SURFACEREPOS_NOT_IN_ATTACK_SURFACEUNCOVERED_REPOSREPOS_WITH_RECENT_SCANSREPOS_WITH_GENERATED_OASREPOS_WITHOUT_GENERATED_OASREPOS_WITHOUT_RECENT_SCANSTESTED_CURRENT_REPOSSTALE_REPOSMAPPED_NEVER_TESTED_REPOSNEW_TO_ATTACK_SURFACE_REPOSNEW_REPOSlangIdsstring[]A comma-delimited list of UUID identifiers of repository languages.
topicIdsstring[]A comma-delimited list of UUID identifiers of repository topics.
frameworkNamesstring[]A comma-delimited list of String identifiers of repository frameworks.
repositorySourcestring[]A comma-delimited list of repository source types.
integrationIdsstring[]A comma-delimited list of integration UUIDs to filter repositories by specific integrations.
sensitiveDataTagsstring[]A comma-delimited list of sensitive data tags for repositories.
recentCommitTimeframestringThe timeframe of the most recent commit for a repo.
"LAST_COMMIT_DATE_UNSPECIFIED"9 available options
LAST_COMMIT_DATE_UNSPECIFIEDLAST_24_HOURSLAST_7_DAYSLAST_14_DAYSLAST_30_DAYSOVER_30_DAYSLAST_90_DAYSLAST_180_DAYSLAST_365_DAYSwebAppFilterstringReturn only repos with a high Hawkscore, indicating a web app. Defaults to ALL_REPOS, set to WEB_APP_REPOS to get only retrieve webapps.
"ALL_REPOS"21 available options
ALL_REPOSUNMAPPED_REPOSMAPPED_REPOSHIDDEN_REPOSREPOS_WITH_APP_SCANSREPOS_WITH_NO_APP_SCANSREPOS_WITH_INSIGHTSREPOS_WITH_NO_INSIGHTSWEB_APP_REPOSREPOS_IN_ATTACK_SURFACEREPOS_NOT_IN_ATTACK_SURFACEUNCOVERED_REPOSREPOS_WITH_RECENT_SCANSREPOS_WITH_GENERATED_OASREPOS_WITHOUT_GENERATED_OASREPOS_WITHOUT_RECENT_SCANSTESTED_CURRENT_REPOSSTALE_REPOSMAPPED_NEVER_TESTED_REPOSNEW_TO_ATTACK_SURFACE_REPOSNEW_REPOSuncoveredRepoFilterstringReturn only uncovered repos, which are repos that are in the org's attack surface, but not mapped to any applications. Defaults to ALL_REPOS, set to UNCOVERED_REPOS to get only uncovered repos.
"ALL_REPOS"21 available options
ALL_REPOSUNMAPPED_REPOSMAPPED_REPOSHIDDEN_REPOSREPOS_WITH_APP_SCANSREPOS_WITH_NO_APP_SCANSREPOS_WITH_INSIGHTSREPOS_WITH_NO_INSIGHTSWEB_APP_REPOSREPOS_IN_ATTACK_SURFACEREPOS_NOT_IN_ATTACK_SURFACEUNCOVERED_REPOSREPOS_WITH_RECENT_SCANSREPOS_WITH_GENERATED_OASREPOS_WITHOUT_GENERATED_OASREPOS_WITHOUT_RECENT_SCANSTESTED_CURRENT_REPOSSTALE_REPOSMAPPED_NEVER_TESTED_REPOSNEW_TO_ATTACK_SURFACE_REPOSNEW_REPOSfiltersstring[]A comma-delimited list of repository search filters.
windowDaysinteger · int32The scan window in days (7, 30 or 90) for the attack-surface Current and Stale buckets: a mapped repository counts as Current when its last scan is within the window and at or after its last commit. Defaults to 30.
303 available options
73090Response
OK
Whether or not there is a next page.
Whether or not there is a previous page.
The url-encoded next page key.
The organization id these repositories belong to.
An internal previous page object. Will always be blank from the API response.
The list of repositories in the current page.
The total number of repositories in this organization.
Whether or not there is a next page.
Whether or not there is a previous page.
The url-encoded next page key.
The organization id these repositories belong to.
An internal previous page object. Will always be blank from the API response.
The list of repositories in the current page.
The total number of repositories in this organization.
Unauthorized