# GET /api/v1/org/{orgId}/repos

**List repositories**

## 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.

> Requires `read:repository` permission.

## Parameters

- `orgId` (in: path, string<uuid>) *(required)* — UUID identifier for this StackHawk Organization.
- `query` (in: query, string) — A term used to filter results based on matching content in one or more fields.
- `sortField` (in: query, string) — Resource field to sort paginated response by.
- `sortDir` (in: query, string) — Paginated results are sorted 'asc' or 'desc'.
- `pageSize` (in: query, integer<int32>) — Pagination response size limit.
- `pageToken` (in: query, integer<int32>) — Pagination request page increment.
- `page` (in: query, string) — Pagination page key.
- `repoFilter` (in: query, string) — Repository search filter (Deprecated: Use filters param instead).
- `appFilter` (in: query, string) — Repository search application filter (Deprecated: Use filters param instead).
- `langIds` (in: query, string[]) — A comma-delimited list of UUID identifiers of repository languages.
- `topicIds` (in: query, string[]) — A comma-delimited list of UUID identifiers of repository topics.
- `frameworkNames` (in: query, string[]) — A comma-delimited list of String identifiers of repository frameworks.
- `repositorySource` (in: query, string[]) — A comma-delimited list of repository source types.
- `integrationIds` (in: query, string[]) — A comma-delimited list of integration UUIDs to filter repositories by specific integrations.
- `sensitiveDataTags` (in: query, string[]) — A comma-delimited list of sensitive data tags for repositories.
- `recentCommitTimeframe` (in: query, string) — The timeframe of the most recent commit for a repo.
- `webAppFilter` (in: query, string) — Return only repos with a high Hawkscore, indicating a web app. Defaults to ALL_REPOS, set to WEB_APP_REPOS to get only retrieve webapps.
- `uncoveredRepoFilter` (in: query, string) — Return 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.
- `filters` (in: query, string[]) — A comma-delimited list of repository search filters.

## Responses

### 200 — OK

#### application/json

- `currentPage` (pagination.Page)
  - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
    - `multi` (pagination.MultiValue)
      - `values` (string[]) — The values of a given filter to filter on.
    - `name` (string) — The name of the filter to apply.
    - `value` (string) — A single value to filter on.
  - `number` (integer<int32>) — The page number to retrieve - 0 based
  - `query` (string) — The query string to filter the results.
  - `size` (integer<int32>) — the page size to retrieve.
  - `sortOptions` (pagination.SortOptions)
    - `direction` (string) — The direction to sort the results.
    - `field` (string) — Generic here, each type should define its own Enums + Converters
- `hasNext` (boolean) — Whether or not there is a next page.
- `hasPrev` (boolean) — Whether or not there is a previous page.
- `nextPage` (pagination.Page)
  - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
    - `multi` (pagination.MultiValue)
      - `values` (string[]) — The values of a given filter to filter on.
    - `name` (string) — The name of the filter to apply.
    - `value` (string) — A single value to filter on.
  - `number` (integer<int32>) — The page number to retrieve - 0 based
  - `query` (string) — The query string to filter the results.
  - `size` (integer<int32>) — the page size to retrieve.
  - `sortOptions` (pagination.SortOptions)
    - `direction` (string) — The direction to sort the results.
    - `field` (string) — Generic here, each type should define its own Enums + Converters
- `nextPageKey` (string) — The url-encoded next page key.
- `orgId` (string) — The organization id these repositories belong to.
- `prevPage` (pagination.Page)
  - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
    - `multi` (pagination.MultiValue)
      - `values` (string[]) — The values of a given filter to filter on.
    - `name` (string) — The name of the filter to apply.
    - `value` (string) — A single value to filter on.
  - `number` (integer<int32>) — The page number to retrieve - 0 based
  - `query` (string) — The query string to filter the results.
  - `size` (integer<int32>) — the page size to retrieve.
  - `sortOptions` (pagination.SortOptions)
    - `direction` (string) — The direction to sort the results.
    - `field` (string) — Generic here, each type should define its own Enums + Converters
- `prevPageKey` (string) — An internal previous page object. Will always be blank from the API response.
- `repositories` (repository.Repository[]) — The list of repositories in the current page.
  - `appInfos` (repository.AppInfo[]) — The mapped applications to this repository
    - `appStatus` (string) — Read-only field for the application status.
    - `id` (string) — The application id.
    - `lastScanHost` (string) — Read-only field for the last scan host.
    - `lastScanId` (string) — Read-only field for the last scan id.
    - `lastScanTimestamp` (integer<int64>) — Read-only field for the last scan timestamp.
    - `name` (string) — The application name.
  - `archived` (boolean) — Whether or not this repository is archived.
  - `cloneTimestamp` (integer<int64>) — clone timestamp.
  - `commitCount` (integer<int32>) — The number of commits in the past 30 days.
  - `commitSha` (string) — last recorded commitSha of the default branch.
  - `fork` (boolean) — Whether or not this repository is a fork.
  - `frameworkNames` (string[]) — the frameworks discovered for the repository
  - `hasGeneratedOpenApiSpec` (boolean) — Whether or not the repository has a generated open api spec
  - `hidden` (boolean) — Whether or not this repository is hidden.
  - `insights` (repository.Insight[]) — The StackHawk API Discovery results of this repository.
    - `name` (string) — The name of the StackHawk API Discover insight.
    - `value` (string) — The processed response of the StackHawk API Discovery insight.
  - `isInAttackSurface` (boolean) — Whether or not this repository is in the StackHawk API Discovery Attack Surface.
  - `isNewRepository` (boolean) — Whether or not this repository is new.
  - `isNewToAttackSurface` (boolean) — Whether or not this repository is new to the attack surface.
  - `languages` (repository.Language[]) — The languages used in this repository.
    - `name` (string) — The name of the language.
    - `percent` (number<double>) — The percentage that this language comprises in a repository.
    - `size` (integer<int64>) — The number of bytes of this language in a repository.
    - `stackHawkId` (string) — The StackHawk language id.
  - `lastCommitBranch` (string) — The last branch committed to for this repository.
  - `lastCommitTimestamp` (integer<int64>) — The last commit timestamp of the repository.
  - `lastContributor` (repository.Contributor)
    - `avatarUrl` (string) — The avatar url of the contributor.
    - `contributions` (integer<int64>) — The number recent of contributions.
    - `email` (string) — The email of the contributor - frequently blank.
    - `lastContributionTimestamp` (integer<int64>) — The last time this user contributed.
    - `name` (string) — The username of the contributor.
    - `remoteId` (string) — The remote contributor id.
    - `source` (string) — The source of the contributor.
    - `stackhawkId` (string) — The StackHawk contributor id.
  - `lastScanHost` (string) — Deprecated - the last scan host of the associated application. Use appInfos instead.
  - `lastScanId` (string) — Deprecated - the last scan id of the associated application. Use appInfos instead.
  - `lastScanTimestamp` (integer<int64>) — Deprecated - the last scan timestamp of the associated application. Use appInfos instead.
  - `name` (string) — The name of the repository
  - `namespace` (string) — Provider dependent, optional namespace/group/subgroup/folder the repository belongs to.
  - `namespaceId` (string) — If applicable, the unique identifier of the repository's namespace.
  - `notes` (repository.RepositoryNote[]) — Notes/comments added to this repository by users.
    - `note` (string) — The text content of the note.
    - `stackhawkId` (string) — The unique StackHawk identifier for this note.
    - `timestamp` (integer<int64>) — The timestamp when this note was created (Unix timestamp in milliseconds).
    - `userEmail` (string) — The email of the user who created this note.
  - `openApiSpecInfo` (open_api_spec.OpenAPISpecInfo)
    - `details` (string)
    - `generatedOasCount` (integer<int32>)
    - `info` (string)
    - `organizationId` (string)
    - `repositoryId` (string)
    - `repositoryMetadata` (open_api_spec.RepositoryMetadata)
      - `languages` (string[])
      - `matchWords` (codeWord.MatchWord[])
        - `category` (string)
        - `codeType` (string)
        - `count` (integer<int32>)
        - `matchName` (string)
        - `matchPercentage` (integer<int32>)
        - `matchScore` (integer<int32>)
        - `matchType` (string)
        - `name` (string)
        - `score` (integer<int32>)
      - `sourceRoots` (open_api_spec.SourceRoot[])
        - `buildFiles` (string[])
        - `directory` (string)
        - `framework` (string)
        - `generationResult` (open_api_spec.OASGenerationResult)
        - `hasOasSpec` (boolean)
        - `languages` (string[])
        - `oasAIPromptsDetected` (boolean)
        - `s3Key` (string)
    - `startDate` (integer<int64>)
    - `status` (string)
  - `private` (boolean) — Whether or not this repository is private.
  - `providerOrgId` (string) — Unique identifier of the repository's organization or equivalent entity type.
  - `providerOrgName` (string) — The repository provider's top level entity this repository is associated with.
  - `remoteUrl` (string) — The remote url of the repository.
  - `repoSize` (integer<int64>) — last recorded size of repository in bytes.
  - `repoSource` (string) — The source of the repository.
  - `score` (integer<int32>) — The StackHawk API Discovery Score.
  - `sensitiveDataTags` (repository.Tag[])
    - `name` (string) — The name of the tag.
    - `stackHawkId` (string) — The StackHawk tag id.
  - `stackHawkApplicationId` (string) — Deprecated - the application id associated with this repository. Use appInfos instead.
  - `stackHawkApplicationName` (string) — Deprecated - the application name associated with this repository. Use appInfos instead.
  - `stackHawkApplicationStatus` (string) — Deprecated - the application status of the associated application. Use appInfos instead.
  - `stackHawkIntegrationId` (string) — The Integration Id this repository is associated to.
  - `stackHawkRepoId` (string) — The StackHawk repository id.
  - `status` (string) — The StackHawk API Discovery Status.
  - `topics` (repository.Topic[]) — The topics of this repository.
    - `name` (string) — The name of the topic.
    - `stackHawkId` (string) — The StackHawk topic id.
- `totalCount` (integer<int64>) — The total number of repositories in this organization.

#### application/x-protobuf

- `currentPage` (pagination.Page)
  - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
    - `multi` (pagination.MultiValue)
      - `values` (string[]) — The values of a given filter to filter on.
    - `name` (string) — The name of the filter to apply.
    - `value` (string) — A single value to filter on.
  - `number` (integer<int32>) — The page number to retrieve - 0 based
  - `query` (string) — The query string to filter the results.
  - `size` (integer<int32>) — the page size to retrieve.
  - `sortOptions` (pagination.SortOptions)
    - `direction` (string) — The direction to sort the results.
    - `field` (string) — Generic here, each type should define its own Enums + Converters
- `hasNext` (boolean) — Whether or not there is a next page.
- `hasPrev` (boolean) — Whether or not there is a previous page.
- `nextPage` (pagination.Page)
  - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
    - `multi` (pagination.MultiValue)
      - `values` (string[]) — The values of a given filter to filter on.
    - `name` (string) — The name of the filter to apply.
    - `value` (string) — A single value to filter on.
  - `number` (integer<int32>) — The page number to retrieve - 0 based
  - `query` (string) — The query string to filter the results.
  - `size` (integer<int32>) — the page size to retrieve.
  - `sortOptions` (pagination.SortOptions)
    - `direction` (string) — The direction to sort the results.
    - `field` (string) — Generic here, each type should define its own Enums + Converters
- `nextPageKey` (string) — The url-encoded next page key.
- `orgId` (string) — The organization id these repositories belong to.
- `prevPage` (pagination.Page)
  - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
    - `multi` (pagination.MultiValue)
      - `values` (string[]) — The values of a given filter to filter on.
    - `name` (string) — The name of the filter to apply.
    - `value` (string) — A single value to filter on.
  - `number` (integer<int32>) — The page number to retrieve - 0 based
  - `query` (string) — The query string to filter the results.
  - `size` (integer<int32>) — the page size to retrieve.
  - `sortOptions` (pagination.SortOptions)
    - `direction` (string) — The direction to sort the results.
    - `field` (string) — Generic here, each type should define its own Enums + Converters
- `prevPageKey` (string) — An internal previous page object. Will always be blank from the API response.
- `repositories` (repository.Repository[]) — The list of repositories in the current page.
  - `appInfos` (repository.AppInfo[]) — The mapped applications to this repository
    - `appStatus` (string) — Read-only field for the application status.
    - `id` (string) — The application id.
    - `lastScanHost` (string) — Read-only field for the last scan host.
    - `lastScanId` (string) — Read-only field for the last scan id.
    - `lastScanTimestamp` (integer<int64>) — Read-only field for the last scan timestamp.
    - `name` (string) — The application name.
  - `archived` (boolean) — Whether or not this repository is archived.
  - `cloneTimestamp` (integer<int64>) — clone timestamp.
  - `commitCount` (integer<int32>) — The number of commits in the past 30 days.
  - `commitSha` (string) — last recorded commitSha of the default branch.
  - `fork` (boolean) — Whether or not this repository is a fork.
  - `frameworkNames` (string[]) — the frameworks discovered for the repository
  - `hasGeneratedOpenApiSpec` (boolean) — Whether or not the repository has a generated open api spec
  - `hidden` (boolean) — Whether or not this repository is hidden.
  - `insights` (repository.Insight[]) — The StackHawk API Discovery results of this repository.
    - `name` (string) — The name of the StackHawk API Discover insight.
    - `value` (string) — The processed response of the StackHawk API Discovery insight.
  - `isInAttackSurface` (boolean) — Whether or not this repository is in the StackHawk API Discovery Attack Surface.
  - `isNewRepository` (boolean) — Whether or not this repository is new.
  - `isNewToAttackSurface` (boolean) — Whether or not this repository is new to the attack surface.
  - `languages` (repository.Language[]) — The languages used in this repository.
    - `name` (string) — The name of the language.
    - `percent` (number<double>) — The percentage that this language comprises in a repository.
    - `size` (integer<int64>) — The number of bytes of this language in a repository.
    - `stackHawkId` (string) — The StackHawk language id.
  - `lastCommitBranch` (string) — The last branch committed to for this repository.
  - `lastCommitTimestamp` (integer<int64>) — The last commit timestamp of the repository.
  - `lastContributor` (repository.Contributor)
    - `avatarUrl` (string) — The avatar url of the contributor.
    - `contributions` (integer<int64>) — The number recent of contributions.
    - `email` (string) — The email of the contributor - frequently blank.
    - `lastContributionTimestamp` (integer<int64>) — The last time this user contributed.
    - `name` (string) — The username of the contributor.
    - `remoteId` (string) — The remote contributor id.
    - `source` (string) — The source of the contributor.
    - `stackhawkId` (string) — The StackHawk contributor id.
  - `lastScanHost` (string) — Deprecated - the last scan host of the associated application. Use appInfos instead.
  - `lastScanId` (string) — Deprecated - the last scan id of the associated application. Use appInfos instead.
  - `lastScanTimestamp` (integer<int64>) — Deprecated - the last scan timestamp of the associated application. Use appInfos instead.
  - `name` (string) — The name of the repository
  - `namespace` (string) — Provider dependent, optional namespace/group/subgroup/folder the repository belongs to.
  - `namespaceId` (string) — If applicable, the unique identifier of the repository's namespace.
  - `notes` (repository.RepositoryNote[]) — Notes/comments added to this repository by users.
    - `note` (string) — The text content of the note.
    - `stackhawkId` (string) — The unique StackHawk identifier for this note.
    - `timestamp` (integer<int64>) — The timestamp when this note was created (Unix timestamp in milliseconds).
    - `userEmail` (string) — The email of the user who created this note.
  - `openApiSpecInfo` (open_api_spec.OpenAPISpecInfo)
    - `details` (string)
    - `generatedOasCount` (integer<int32>)
    - `info` (string)
    - `organizationId` (string)
    - `repositoryId` (string)
    - `repositoryMetadata` (open_api_spec.RepositoryMetadata)
      - `languages` (string[])
      - `matchWords` (codeWord.MatchWord[])
        - `category` (string)
        - `codeType` (string)
        - `count` (integer<int32>)
        - `matchName` (string)
        - `matchPercentage` (integer<int32>)
        - `matchScore` (integer<int32>)
        - `matchType` (string)
        - `name` (string)
        - `score` (integer<int32>)
      - `sourceRoots` (open_api_spec.SourceRoot[])
        - `buildFiles` (string[])
        - `directory` (string)
        - `framework` (string)
        - `generationResult` (open_api_spec.OASGenerationResult)
        - `hasOasSpec` (boolean)
        - `languages` (string[])
        - `oasAIPromptsDetected` (boolean)
        - `s3Key` (string)
    - `startDate` (integer<int64>)
    - `status` (string)
  - `private` (boolean) — Whether or not this repository is private.
  - `providerOrgId` (string) — Unique identifier of the repository's organization or equivalent entity type.
  - `providerOrgName` (string) — The repository provider's top level entity this repository is associated with.
  - `remoteUrl` (string) — The remote url of the repository.
  - `repoSize` (integer<int64>) — last recorded size of repository in bytes.
  - `repoSource` (string) — The source of the repository.
  - `score` (integer<int32>) — The StackHawk API Discovery Score.
  - `sensitiveDataTags` (repository.Tag[])
    - `name` (string) — The name of the tag.
    - `stackHawkId` (string) — The StackHawk tag id.
  - `stackHawkApplicationId` (string) — Deprecated - the application id associated with this repository. Use appInfos instead.
  - `stackHawkApplicationName` (string) — Deprecated - the application name associated with this repository. Use appInfos instead.
  - `stackHawkApplicationStatus` (string) — Deprecated - the application status of the associated application. Use appInfos instead.
  - `stackHawkIntegrationId` (string) — The Integration Id this repository is associated to.
  - `stackHawkRepoId` (string) — The StackHawk repository id.
  - `status` (string) — The StackHawk API Discovery Status.
  - `topics` (repository.Topic[]) — The topics of this repository.
    - `name` (string) — The name of the topic.
    - `stackHawkId` (string) — The StackHawk topic id.
- `totalCount` (integer<int64>) — The total number of repositories in this organization.

### 401 — Unauthorized

- (no body)
