---
title: "List repositories"
method: GET
path: "/api/v1/org/{orgId}/repos"
tags: ["Repositories"]
---

# List repositories

`GET /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.


> Requires `read:repository` permission.

## Path parameters

- `orgId` string, uuid, required

## Query parameters

- `query` string
- `sortField` 'id' | 'fullName' | 'lastCommit' | 'lastContributor' | 'lastScanTimeStamp' | 'stackHawkApplication' | 'score' | 'status' | 'commitCount' | 'sensitiveTagsCount'
- `sortDir` 'ASC' | 'DESC' | 'UNSORTED'
- `pageSize` integer
- `pageToken` integer
- `page` string
- `repoFilter` 'ALL_REPOS' | 'UNMAPPED_REPOS' | 'MAPPED_REPOS' | 'HIDDEN_REPOS' | 'REPOS_WITH_APP_SCANS' | 'REPOS_WITH_NO_APP_SCANS' | 'REPOS_WITH_INSIGHTS' | 'REPOS_WITH_NO_INSIGHTS' | 'WEB_APP_REPOS' | 'REPOS_IN_ATTACK_SURFACE' | 'REPOS_NOT_IN_ATTACK_SURFACE' | 'UNCOVERED_REPOS' | 'REPOS_WITH_RECENT_SCANS' | 'REPOS_WITH_GENERATED_OAS' | 'REPOS_WITHOUT_GENERATED_OAS' | 'REPOS_WITHOUT_RECENT_SCANS'
- `appFilter` 'ALL_REPOS' | 'UNMAPPED_REPOS' | 'MAPPED_REPOS' | 'HIDDEN_REPOS' | 'REPOS_WITH_APP_SCANS' | 'REPOS_WITH_NO_APP_SCANS' | 'REPOS_WITH_INSIGHTS' | 'REPOS_WITH_NO_INSIGHTS' | 'WEB_APP_REPOS' | 'REPOS_IN_ATTACK_SURFACE' | 'REPOS_NOT_IN_ATTACK_SURFACE' | 'UNCOVERED_REPOS' | 'REPOS_WITH_RECENT_SCANS' | 'REPOS_WITH_GENERATED_OAS' | 'REPOS_WITHOUT_GENERATED_OAS' | 'REPOS_WITHOUT_RECENT_SCANS'
- `langIds` string[]
- `topicIds` string[]
- `frameworkNames` string[]
- `repositorySource` string[]
- `integrationIds` string[]
- `sensitiveDataTags` string[]
- `recentCommitTimeframe` 'LAST_COMMIT_DATE_UNSPECIFIED' | 'LAST_24_HOURS' | 'LAST_7_DAYS' | 'LAST_14_DAYS' | 'LAST_30_DAYS' | 'OVER_30_DAYS' | 'LAST_90_DAYS' | 'LAST_180_DAYS' | 'LAST_365_DAYS'
- `webAppFilter` 'ALL_REPOS' | 'UNMAPPED_REPOS' | 'MAPPED_REPOS' | 'HIDDEN_REPOS' | 'REPOS_WITH_APP_SCANS' | 'REPOS_WITH_NO_APP_SCANS' | 'REPOS_WITH_INSIGHTS' | 'REPOS_WITH_NO_INSIGHTS' | 'WEB_APP_REPOS' | 'REPOS_IN_ATTACK_SURFACE' | 'REPOS_NOT_IN_ATTACK_SURFACE' | 'UNCOVERED_REPOS' | 'REPOS_WITH_RECENT_SCANS' | 'REPOS_WITH_GENERATED_OAS' | 'REPOS_WITHOUT_GENERATED_OAS' | 'REPOS_WITHOUT_RECENT_SCANS'
- `uncoveredRepoFilter` 'ALL_REPOS' | 'UNMAPPED_REPOS' | 'MAPPED_REPOS' | 'HIDDEN_REPOS' | 'REPOS_WITH_APP_SCANS' | 'REPOS_WITH_NO_APP_SCANS' | 'REPOS_WITH_INSIGHTS' | 'REPOS_WITH_NO_INSIGHTS' | 'WEB_APP_REPOS' | 'REPOS_IN_ATTACK_SURFACE' | 'REPOS_NOT_IN_ATTACK_SURFACE' | 'UNCOVERED_REPOS' | 'REPOS_WITH_RECENT_SCANS' | 'REPOS_WITH_GENERATED_OAS' | 'REPOS_WITHOUT_GENERATED_OAS' | 'REPOS_WITHOUT_RECENT_SCANS'
- `filters` string[]

## Response `200`

OK

- RepositorySearchRepositoriesResponse
  - `currentPage` PaginationPage
    - `filters` PaginationFilter[] — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
      - `multi` PaginationMultiValue
        - `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 — The page number to retrieve - 0 based
    - `query` string — The query string to filter the results.
    - `size` integer — the page size to retrieve.
    - `sortOptions` PaginationSortOptions
      - `direction` 'ASC' | 'DESC' | 'UNSORTED' — 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` PaginationPage
    - `filters` PaginationFilter[] — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
      - `multi` PaginationMultiValue
        - `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 — The page number to retrieve - 0 based
    - `query` string — The query string to filter the results.
    - `size` integer — the page size to retrieve.
    - `sortOptions` PaginationSortOptions
      - `direction` 'ASC' | 'DESC' | 'UNSORTED' — 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` PaginationPage
    - `filters` PaginationFilter[] — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
      - `multi` PaginationMultiValue
        - `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 — The page number to retrieve - 0 based
    - `query` string — The query string to filter the results.
    - `size` integer — the page size to retrieve.
    - `sortOptions` PaginationSortOptions
      - `direction` 'ASC' | 'DESC' | 'UNSORTED' — 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` RepositoryRepository[] — The list of repositories in the current page.
    - `appInfos` RepositoryAppInfo[] — The mapped applications to this repository
      - `appStatus` 'ACTIVE' | 'ENV_INCOMPLETE' — 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 — Read-only field for the last scan timestamp.
      - `name` string — The application name.
    - `archived` boolean — Whether or not this repository is archived.
    - `cloneTimestamp` integer — clone timestamp.
    - `commitCount` integer — 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` RepositoryInsight[] — 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` RepositoryLanguage[] — 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 — 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 — The last commit timestamp of the repository.
    - `lastContributor` RepositoryContributor
      - `avatarUrl` string — The avatar url of the contributor.
      - `contributions` integer — The number recent of contributions.
      - `email` string — The email of the contributor - frequently blank.
      - `lastContributionTimestamp` integer — The last time this user contributed.
      - `name` string — The username of the contributor.
      - `remoteId` string — The remote contributor id.
      - `source` 'UNKNOWN' | 'GITHUB' | 'AZURE_DEVOPS' | 'BITBUCKET' | 'GITLAB' — 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 — 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` RepositoryRepositoryNote[] — 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 — The timestamp when this note was created (Unix timestamp in milliseconds).
      - `userEmail` string — The email of the user who created this note.
    - `openApiSpecInfo` OpenApiSpecOpenAPISpecInfo
      - `details` string
      - `generatedOasCount` integer
      - `info` string
      - `organizationId` string
      - `repositoryId` string
      - `repositoryMetadata` OpenApiSpecRepositoryMetadata
        - `languages` string[]
        - `matchWords` CodeWordMatchWord[]
          - `category` string
          - `codeType` 'VARIABLE' | 'FUNCTION' | 'CLASS' | 'MODULE' | 'FILE'
          - `count` integer
          - `matchName` string
          - `matchPercentage` integer
          - `matchScore` integer
          - `matchType` 'NUCLEO' | 'STARTS_WITH' | 'ENDS_WITH' | 'CONTAINS' | 'EXACT' | 'LEVENSHTEIN' | 'BREAKOUT'
          - `name` string
          - `score` integer
        - `sourceRoots` OpenApiSpecSourceRoot[]
          - `buildFiles` string[]
          - `directory` string
          - `framework` 'UNKNOWN_FRAMEWORK' | 'SPRING' | 'EXPRESS_JS' | 'PLAY' | 'FLASK'
          - `generationResult` OpenApiSpecOASGenerationResult
            - `generationMessages` string[]
            - `oasGenBatch` OpenApiSpecOASGenBatch[]
              - …
            - `oasJson` string
          - `hasOasSpec` boolean
          - `languages` string[]
          - `oasAIPromptsDetected` boolean
          - `s3Key` string
      - `startDate` integer
      - `status` 'NONE' | 'BUILDING' | 'DONE' | 'ERROR' | 'UNABLE_TO_COMPLETE' | 'NOT_APPLICABLE'
    - `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 — last recorded size of repository in bytes.
    - `repoSource` 'UNKNOWN' | 'GITHUB' | 'AZURE_DEVOPS' | 'BITBUCKET' | 'GITLAB' — The source of the repository.
    - `score` integer — The StackHawk API Discovery Score.
    - `sensitiveDataTags` RepositoryTag[]
      - `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` 'ACTIVE' | 'ENV_INCOMPLETE' — 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` 'NOT_APPLICABLE' | 'NOT_COVERED' | 'COVERED' — The StackHawk API Discovery Status.
    - `topics` RepositoryTopic[] — The topics of this repository.
      - `name` string — The name of the topic.
      - `stackHawkId` string — The StackHawk topic id.
  - `totalCount` integer — The total number of repositories in this organization.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/stackhawk/apis/stackhawk-public-api.md) · [All operations](https://skmtc.net/stackhawk/apis/stackhawk-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stackhawk/stackhawk-public-api/revisions/ad3dfd54cb63/schema)
