v2

latestOpenAPI 3.0.1private2026-07-2667209320.4 KB
Applications

List Environments - V2

List Environments V2

Lists environments that belong to this organization.

Returns a new style paginated list of Environments.

ParameterDefaultDescription
orgId""The org id that these environments belong to.
environments[]List of environment views.
totalCount0Total number of environments in the results.
currentPage{}The current page.
hasNextfalseWhether or not there is a next page.
nextPage{}
nextPageToken""
hasPrevfalseWhether or not there is a previous page.
prevPage{}
prevPageToken""
findingsHealth{}
scanFrequencyHealth{}

Environment

ParameterDefaultDescription
environmentId""The UUID identifier of this environment.
environmentName""The name of this environment.
applicationId""The UUID identifier of this application.
applicationName""The name of this application.
lastScanId""The UUID identifier of the last scan id
lastScanTotalUntriaged0The total number of untriaged alerts in the last scan.
lastScanHighUntriaged0The total number of high untriaged alerts in the last scan.
lastScanMediumUntriaged0The total number of medium untriaged alerts in the last scan.
lastScanLowUntriaged0The total number of low untriaged alerts in the last scan.
lastScanTimestamp0The timestamp of when the last scan started.
lastScanDuration0The duration of the last scan.
lastScanStatus"UNKNOWN"the status of the last scan.
applicationStatus"UNKNOWN"the status of the application.
repositoriesCount0the number of repositories mapped to an application
attackSurface{}the attack surface details for the application.
latestScanConfigHash""the config hash of the latest scan config
lastScanCompletedTimestamp0the timestamp of when the last scan completed.
lastScanHawkscanVersion""the version of HawkScan used for the last scan.
thirtyDayCommitActivity0the number of commits made in all connected repositories in the past 30 days for this application.
lastScanExternalAlertStats[]Stats about any linked external SAST integrations used to look for related findings.
cloudScanTarget{}Cloud Scan Target configuration.
applicationType"UNKNOWN"The type of this environment's associated application.
screenrMetadata[]Screenr (flightpath) session metadata. Null/absent if no session.
lastScanHawkScanType"UNKNOWN"The type of HawkScan execution for the last scan (traditional, hosted, etc.)

The returned list of environments is filtered by the organization id and User's API Token Team membership.

Filter Query Params

  • query: A string to filter by application and environment name (both are matched on for now).
  • appIds: A comma-separated list of application uuids to filter by.
  • envIds: A comma-separated list of environment uuids to filter by.
  • teamIds: A comma-separated list of team uuids to filter by.
  • envs: A comma-separated list of environment names to filter by.
  • lastScanDate: A last scan date qualifier to filter by. Possible values are LAST_24_HOURS, LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS, OVER_30_DAYS.
  • lastScanDateStatus: A comma-separated list of last scan date statuses to filter by. Possible values are LAST_SCAN_STATUS_SUCCESS, LAST_SCAN_STATUS_ERRORED, LAST_SCAN_STATUS_IN_PROGRESS, and LAST_SCAN_STATUS_PENDING.

Last Scan Fields

All fields relating to the last scan for a given environment are just that - the last scan recorded for that given environment. If there are no scans, these fields will be empty. If you need more than the most recent scan, use the scan list API instead.

Requires read:application permission.

get/api/v2/org/{orgId}/envs

Path parameters

orgIdstring uuid required

UUID identifier for this StackHawk Organization.

Query parameters

querystring

A term used to filter results based on matching content in one or more fields.

sortField'environmentId' | 'environmentName' | 'applicationName' | 'scanDate' | 'scanDuration' | 'mappedRepositoryCount' | 'scanFindingsCounts' | 'thirtyDayCommitActivity' | 'flightpathLastUpdated'

Resource field to sort paginated response by.

sortDir'ASC' | 'DESC' | 'UNSORTED'

Paginated results are sorted 'asc' or 'desc'.

includeAppHealthStatsboolean

Specifies whether to include application health statistics.

pagestring

Pagination page key.

pageSizeinteger

Pagination response size limit.

pageTokeninteger

Pagination request page increment.

appIdsstring[]

A comma-delimited list of UUID identifiers of StackHawk Applications.

envIdsstring[]

A comma-delimited list of UUID identifiers of StackHawk Environments.

teamIdsstring[]

A comma-delimited list of UUID identifiers of StackHawk Teams to filter by.

envsstring[]

A comma-delimited list of environment names of StackHawk Applications to filter by.

lastScanDate'LAST_SCAN_DATE_UNSPECIFIED' | 'LAST_24_HOURS' | 'LAST_7_DAYS' | 'LAST_14_DAYS' | 'LAST_30_DAYS' | 'OVER_30_DAYS'

The enum value for the last scan date filter.

applicationTypesstring[]

A comma-separated list of ApplicationType names.

lastScanStatusstring[]

A comma-separated list of last scan status filters.

hasFlightpathSessionboolean

Filter by whether the environment's application has a flightpath session.

Response

Paginated response of application environments.

hasNextboolean

Whether or not there is a next page.

hasPrevboolean

Whether or not there is a previous page.

nextPageTokenstring
orgIdstring

The org id that these environments belong to.

prevPageTokenstring
totalCountinteger

Total number of environments in the results.