ReportingRestClient class
Base class that should be used (derived from) to make requests to VSS REST apis
- Extends
Constructors
| Reporting |
Methods
| create |
Creates a new advanced filter for the organization. |
| delete |
Deletes an advanced filter. |
| get |
Gets a specific advanced filter by its ID. |
| get |
Get Alert summary by severity for the org |
| get |
Get Combined Alerts for the org |
| get |
Get all distinct dependency component names for the org (used for UX filtering) |
| get |
Get Enablement summary for the org |
| get |
Get all projects and repositories for the org (used for UX filtering) |
| get |
Get all distinct code scanning rule names for the org (used for UX filtering) |
| get |
Get all distinct secret types for the org (used for UX filtering) |
| get |
|
| list |
Gets all advanced filters for the organization. |
| update |
Updates an advanced filter. Only the name can be updated. |
Constructor Details
ReportingRestClient(IVssRestClientOptions)
Method Details
createAdvancedFilter(AdvancedFilterCreate)
Creates a new advanced filter for the organization.
function createAdvancedFilter(filter: AdvancedFilterCreate): Promise<AdvancedFilter>
Parameters
- filter
- AdvancedFilterCreate
The advanced filter to create.
Returns
Promise<AdvancedFilter>
deleteAdvancedFilter(string)
Deletes an advanced filter.
function deleteAdvancedFilter(filterId: string): Promise<void>
Parameters
- filterId
-
string
The ID of the advanced filter to delete.
Returns
Promise<void>
getAdvancedFilter(string)
Gets a specific advanced filter by its ID.
function getAdvancedFilter(filterId: string): Promise<AdvancedFilter>
Parameters
- filterId
-
string
The ID of the advanced filter to retrieve.
Returns
Promise<AdvancedFilter>
getAlertSummaryForOrg(FilterCriteria)
Get Alert summary by severity for the org
function getAlertSummaryForOrg(criteria?: FilterCriteria): Promise<OrgAlertSummary>
Parameters
- criteria
- FilterCriteria
Options to limit the summaries returned
Returns
Promise<OrgAlertSummary>
getCombinedAlertsForOrg(CombinedAlertFilterCriteria, number, string)
Get Combined Alerts for the org
function getCombinedAlertsForOrg(criteria?: CombinedAlertFilterCriteria, top?: number, continuationToken?: string): Promise<PagedList<DashboardAlert>>
Parameters
- criteria
- CombinedAlertFilterCriteria
Options to filter the combined alerts returned
- top
-
number
The maximum number of alerts to return
- continuationToken
-
string
If there are more alerts than can be returned, a continuation token is placed in the "x-ms-continuationtoken" header. Use that token here to get the next page of alerts
Returns
Promise<PagedList<DashboardAlert>>
getDependencyComponentNamesForOrg()
Get all distinct dependency component names for the org (used for UX filtering)
function getDependencyComponentNamesForOrg(): Promise<string[]>
Returns
Promise<string[]>
getEnablementSummaryForOrg(EnablementFilterCriteria)
Get Enablement summary for the org
function getEnablementSummaryForOrg(criteria?: EnablementFilterCriteria): Promise<OrgEnablementSummary>
Parameters
- criteria
- EnablementFilterCriteria
Options to limit the summaries returned
Returns
Promise<OrgEnablementSummary>
getProjectsAndReposForOrg()
Get all projects and repositories for the org (used for UX filtering)
function getProjectsAndReposForOrg(): Promise<ProjectAndRepoInfo[]>
Returns
Promise<ProjectAndRepoInfo[]>
getRuleNamesForOrg(string)
Get all distinct code scanning rule names for the org (used for UX filtering)
function getRuleNamesForOrg(toolName?: string): Promise<CodeScanningRuleInfo[]>
Parameters
- toolName
-
string
Optional tool name to filter rules by
Returns
Promise<CodeScanningRuleInfo[]>
getSecretTypesForOrg()
Get all distinct secret types for the org (used for UX filtering)
function getSecretTypesForOrg(): Promise<string[]>
Returns
Promise<string[]>
getUXComputedFilters()
function getUXComputedFilters(): Promise<ReportingUXComputedFilters>
Returns
Promise<ReportingUXComputedFilters>
listAdvancedFilters(boolean, string)
Gets all advanced filters for the organization.
function listAdvancedFilters(includeDeleted?: boolean, keywords?: string): Promise<AdvancedFilter[]>
Parameters
- includeDeleted
-
boolean
Whether to include soft-deleted filters.
- keywords
-
string
Optional filter to search filters by name (case-insensitive, partial match).
Returns
Promise<AdvancedFilter[]>
updateAdvancedFilter(AdvancedFilterUpdate, string)
Updates an advanced filter. Only the name can be updated.
function updateAdvancedFilter(filter: AdvancedFilterUpdate, filterId: string): Promise<void>
Parameters
- filter
- AdvancedFilterUpdate
The update data containing the new name.
- filterId
-
string
The ID of the advanced filter to update.
Returns
Promise<void>