AlertRestClient class
VSS REST API에 대한 요청을 만드는 데 사용해야 하는 기본 클래스(파생)입니다.
- Extends
생성자
Alert |
메서드
get |
경고를 가져옵니다. |
get |
경고 인스턴스를 가져옵니다. |
get |
리포지토리에 대한 경고 가져오기 |
get |
경고를 가져옵니다. |
get |
Sarif 처리 작업의 상태 가져오기 |
get |
|
update |
경고의 상태 업데이트 |
update |
경고 메타데이터 연결을 업데이트합니다. |
upload |
보안 경고가 포함된 Sarif 업로드 |
생성자 세부 정보
AlertRestClient(IVssRestClientOptions)
메서드 세부 정보
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)
경고 인스턴스를 가져옵니다.
function getAlertInstances(project: string, alertId: number, repository: string, ref?: string): Promise<AlertAnalysisInstance[]>
매개 변수
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- alertId
-
number
검색할 경고의 ID
- repository
-
string
경고가 속한 리포지토리의 이름 또는 ID
- ref
-
string
반환
Promise<AlertAnalysisInstance[]>
getAlerts(string, string, number, string, SearchCriteria, string)
리포지토리에 대한 경고 가져오기
function getAlerts(project: string, repository: string, top?: number, orderBy?: string, criteria?: SearchCriteria, continuationToken?: string): Promise<PagedList<Alert>>
매개 변수
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
리포지토리의 이름 또는 ID
- top
-
number
반환할 최대 경고 수
- orderBy
-
string
"id" "firstSeen" "lastSeen" "fixedOn" 또는 "심각도" 기본값이 "id"여야 합니다.
- criteria
- SearchCriteria
반환된 경고를 제한하는 옵션
- continuationToken
-
string
반환할 수 있는 것보다 많은 경고가 있는 경우 연속 토큰이 "x-ms-continuationtoken" 헤더에 배치됩니다. 여기에서 해당 토큰을 사용하여 경고의 다음 페이지를 가져옵니다.
반환
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>
getSarif(number)
Sarif 처리 작업의 상태 가져오기
function getSarif(sarifId: number): Promise<SarifUploadStatus>
매개 변수
- sarifId
-
number
Sarif가 업로드되었을 때 반환된 Sarif ID
반환
Promise<SarifUploadStatus>
getUxFilters(string, string, AlertType)
function getUxFilters(project: string, repository: string, alertType: AlertType): Promise<UxFilters>
매개 변수
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
- alertType
- AlertType
반환
Promise<UxFilters>
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
경고와 연결할 메타데이터 목록입니다.
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
리포지토리의 이름 또는 ID입니다.
반환
Promise<AlertMetadataChange[]>
uploadSarif(string, string, string)
보안 경고가 포함된 Sarif 업로드
function uploadSarif(content: string, project: string, repository: string): Promise<number>
매개 변수
- content
-
string
업로드할 콘텐츠
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
리포지토리의 이름 또는 ID
반환
Promise<number>