List Environments - V2
/api/v2/org/{orgId}/envs List Environments V2
Lists environments that belong to this organization.
Returns a new style paginated list of Environments.
| Parameter | Default | Description |
|---|---|---|
| orgId | "" | The org id that these environments belong to. |
| environments | [] | List of environment views. |
| totalCount | 0 | Total number of environments in the results. |
| currentPage | {} | The current page. |
| hasNext | false | Whether or not there is a next page. |
| nextPage | {} | |
| nextPageToken | "" | |
| hasPrev | false | Whether or not there is a previous page. |
| prevPage | {} | |
| prevPageToken | "" | |
| findingsHealth | {} | |
| scanFrequencyHealth | {} |
Environment
| Parameter | Default | Description |
|---|---|---|
| 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 |
| lastScanTotalUntriaged | 0 | The total number of untriaged alerts in the last scan. |
| lastScanHighUntriaged | 0 | The total number of high untriaged alerts in the last scan. |
| lastScanMediumUntriaged | 0 | The total number of medium untriaged alerts in the last scan. |
| lastScanLowUntriaged | 0 | The total number of low untriaged alerts in the last scan. |
| lastScanTimestamp | 0 | The timestamp of when the last scan started. |
| lastScanDuration | 0 | The duration of the last scan. |
| lastScanStatus | "UNKNOWN" | the status of the last scan. |
| applicationStatus | "UNKNOWN" | the status of the application. |
| repositoriesCount | 0 | the number of repositories mapped to an application |
| attackSurface | {} | the attack surface details for the application. |
| latestScanConfigHash | "" | the config hash of the latest scan config |
| lastScanCompletedTimestamp | 0 | the timestamp of when the last scan completed. |
| lastScanHawkscanVersion | "" | the version of HawkScan used for the last scan. |
| thirtyDayCommitActivity | 0 | the 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.unassignedApps: Whentrue, include environments of applications not assigned to any team. Unions withappIdsandteamIds.envs: A comma-separated list of environment names to filter by.lastScanDate: A last scan date qualifier to filter by. Possible values areLAST_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 areLAST_SCAN_STATUS_SUCCESS,LAST_SCAN_STATUS_ERRORED,LAST_SCAN_STATUS_IN_PROGRESS, andLAST_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:applicationpermission.
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.
9 available options
environmentIdenvironmentNameapplicationNamescanDatescanDurationmappedRepositoryCountscanFindingsCountsthirtyDayCommitActivityflightpathLastUpdatedsortDirstringPaginated results are sorted 'asc' or 'desc'.
3 available options
ASCDESCUNSORTEDincludeAppHealthStatsbooleanSpecifies whether to include application health statistics.
falsepagestringPagination page key.
pageSizeinteger · int32Pagination response size limit.
10pageTokeninteger · int32Pagination request page increment.
0appIdsstring[]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.
lastScanDatestringThe enum value for the last scan date filter.
6 available options
LAST_SCAN_DATE_UNSPECIFIEDLAST_24_HOURSLAST_7_DAYSLAST_14_DAYSLAST_30_DAYSOVER_30_DAYSapplicationTypesstring[]A comma-separated list of ApplicationType names.
["STANDARD"]lastScanStatusstring[]A comma-separated list of last scan status filters.
hasFlightpathSessionbooleanFilter by whether the environment's application has a flightpath session.
unassignedAppsbooleanWhen true, include Applications not assigned to any Team. Unions with appIds and teamIds.
falseResponse
Paginated response of application environments.
List of environment views.
Whether or not there is a next page.
Whether or not there is a previous page.
The org id that these environments belong to.
Total number of environments in the results.
List of environment views.
Whether or not there is a next page.
Whether or not there is a previous page.
The org id that these environments belong to.
Total number of environments in the results.
Unauthorized