次の方法で共有


AlertRestClient class

VSS REST API への要求を行うために使用する (派生する) 基本クラス

Extends

コンストラクター

AlertRestClient(IVssRestClientOptions)

メソッド

createLegalReview(string, string, number, string)

法的レビューを作成します。 これにより、アラートに関連付けられた法的レビューが作成されます。 これには、レビュー作業項目の URL が含まれます。

getAlert(string, number, string, string, ExpandOption)

アラートを取得します。

getAlertInstances(string, number, string, string)

@refで指定されたブランチ上のアラートのインスタンスを取得します。@ref が指定されていない場合は、既定のブランチ (既定のブランチにアラートが存在する場合) または影響を受ける最新のブランチでアラートのインスタンスを返します。

getAlerts(string, string, number, string, SearchCriteria, AlertListExpandOption, string)

リポジトリのアラートを取得する

getAlertSarif(string, number, string, string, ExpandOption)

アラートを取得します。

getBranches(string, string, AlertType, string, string, number, boolean)

分析結果が送信された分岐を返します。

getSarif(number)

Sarif 処理ジョブの状態を取得する

getUxFilters(string, string, AlertType)
getValidityData(string, string, number)

アラートの有効性の詳細を取得します。

initiateValidation(string, string, number)

特定のアラートの検証プロセスを開始する

updateAlert(AlertStateUpdate, string, number, string)

アラートの状態を更新する

updateAlertsMetadata(AlertMetadata[], string, string)

アラート メタデータの関連付けを更新します。

uploadSarif(string, string, string, String)

セキュリティ アラートを含む Sarif をアップロードする

コンストラクターの詳細

AlertRestClient(IVssRestClientOptions)

new AlertRestClient(options: IVssRestClientOptions)

パラメーター

メソッドの詳細

createLegalReview(string, string, number, string)

法的レビューを作成します。 これにより、アラートに関連付けられた法的レビューが作成されます。 これには、レビュー作業項目の URL が含まれます。

function createLegalReview(project: string, repository: string, alertId: number, ref?: string): Promise<LegalReview>

パラメーター

project

string

プロジェクト ID またはプロジェクト名

repository

string

法的アラートのリポジトリの名前または ID

alertId

number

法的レビューを取得するための法的アラートの事前セキュリティアラートID

ref

string

戻り値

Promise<LegalReview>

getAlert(string, number, string, string, ExpandOption)

アラートを取得します。

function getAlert(project: string, alertId: number, repository: string, ref?: string, expand?: ExpandOption): Promise<Alert>

パラメーター

project

string

プロジェクト ID またはプロジェクト名

alertId

number

取得するアラートの ID

repository

string

アラートが含まれるリポジトリの名前または ID

ref

string

expand
ExpandOption

アラート属性を展開します。 可能なオプションは {ValidationFingerprint,None} です。

戻り値

Promise<Alert>

getAlertInstances(string, number, string, string)

@refで指定されたブランチ上のアラートのインスタンスを取得します。@ref が指定されていない場合は、既定のブランチ (既定のブランチにアラートが存在する場合) または影響を受ける最新のブランチでアラートのインスタンスを返します。

function getAlertInstances(project: string, alertId: number, repository: string, ref?: string): Promise<AlertAnalysisInstance[]>

パラメーター

project

string

プロジェクト ID またはプロジェクト名

alertId

number

取得するアラートの ID

repository

string

アラートが含まれるリポジトリの名前または ID

ref

string

戻り値

getAlerts(string, string, number, string, SearchCriteria, AlertListExpandOption, string)

リポジトリのアラートを取得する

function getAlerts(project: string, repository: string, top?: number, orderBy?: string, criteria?: SearchCriteria, expand?: AlertListExpandOption, continuationToken?: string): Promise<PagedList<Alert>>

パラメーター

project

string

プロジェクト ID またはプロジェクト名

repository

string

リポジトリの名前または ID

top

number

返されるアラートの最大数

orderBy

string

"id" "firstSeen" "lastSeen" "fixedOn" または "severity" の既定値は "id" にする必要があります

criteria
SearchCriteria

返されるアラートを制限するオプション

continuationToken

string

返されるよりも多くのアラートがある場合は、継続トークンが "x-ms-continuationtoken" ヘッダーに配置されます。 このトークンを使用して、アラートの次のページを取得します

戻り値

Promise<PagedList<Alert>>

getAlertSarif(string, number, string, string, ExpandOption)

アラートを取得します。

function getAlertSarif(project: string, alertId: number, repository: string, ref?: string, expand?: ExpandOption): Promise<string>

パラメーター

project

string

プロジェクト ID またはプロジェクト名

alertId

number

取得するアラートの ID

repository

string

アラートが含まれるリポジトリの名前または ID

ref

string

expand
ExpandOption

アラート属性を展開します。 可能なオプションは {ValidationFingerprint,None} です。

戻り値

Promise<string>

getBranches(string, string, AlertType, string, string, number, boolean)

分析結果が送信された分岐を返します。

function getBranches(project: string, repository: string, alertType: AlertType, continuationToken?: string, branchNameContains?: string, top?: number, includePullRequestBranches?: boolean): Promise<Branch[]>

パラメーター

project

string

プロジェクト ID またはプロジェクト名

repository

string

alertType
AlertType

アラートの種類: 依存関係スキャン (1)、シークレット (2)、コード QL (3)など。

continuationToken

string

分岐名を表し、その後の分岐をアルファベット順にフェッチするために使用される文字列変数。

branchNameContains

string

分岐名の任意の場所にこの文字列を含む分岐をフェッチするために使用される文字列変数。大文字と小文字は区別されません。

top

number

検索条件を満たす上位 k 個の分岐を返すために使用される int 変数。

includePullRequestBranches

boolean

pull request ブランチを含めるかどうかを示すブール変数。

戻り値

Promise<Branch[]>

getSarif(number)

Sarif 処理ジョブの状態を取得する

function getSarif(sarifId: number): Promise<SarifUploadStatus>

パラメーター

sarifId

number

Sarif がアップロードされたときに返された Sarif ID

戻り値

getUxFilters(string, string, AlertType)

function getUxFilters(project: string, repository: string, alertType: AlertType): Promise<UxFilters>

パラメーター

project

string

プロジェクト ID またはプロジェクト名

repository

string

alertType
AlertType

戻り値

Promise<UxFilters>

getValidityData(string, string, number)

アラートの有効性の詳細を取得します。

function getValidityData(project: string, repository: string, alertId: number): Promise<ValidationRequestInfo>

パラメーター

project

string

プロジェクト ID またはプロジェクト名

repository

string

リポジトリの名前または ID

alertId

number

アラートの ID

戻り値

initiateValidation(string, string, number)

特定のアラートの検証プロセスを開始する

function initiateValidation(project: string, repository: string, alertId: number): Promise<AlertValidationRequestStatus>

パラメーター

project

string

プロジェクト ID またはプロジェクト名

repository

string

リポジトリの名前または ID

alertId

number

アラートの ID

戻り値

updateAlert(AlertStateUpdate, string, number, string)

アラートの状態を更新する

function updateAlert(stateUpdate: AlertStateUpdate, project: string, alertId: number, repository: string): Promise<Alert>

パラメーター

stateUpdate
AlertStateUpdate

アラートの新しい状態

project

string

プロジェクト ID またはプロジェクト名

alertId

number

アラートの ID

repository

string

リポジトリの名前または ID

戻り値

Promise<Alert>

updateAlertsMetadata(AlertMetadata[], string, string)

アラート メタデータの関連付けを更新します。

function updateAlertsMetadata(alertsMetadata: AlertMetadata[], project: string, repository: string): Promise<AlertMetadataChange[]>

パラメーター

alertsMetadata

AlertMetadata[]

アラートに関連付けるメタデータの一覧。

project

string

プロジェクト ID またはプロジェクト名

repository

string

リポジトリの名前または ID。

戻り値

Promise<AlertMetadataChange[]>

uploadSarif(string, string, string, String)

セキュリティ アラートを含む Sarif をアップロードする

function uploadSarif(content: string, project: string, repository: string, notificationFlag?: String): Promise<number>

パラメーター

content

string

アップロードするコンテンツ

project

string

プロジェクト ID またはプロジェクト名

repository

string

リポジトリの名前または ID

notificationFlag

String

これが進行状況通知であることを通知するヘッダー

戻り値

Promise<number>