AlertRestClient class
VSS REST api에 대한 요청을 만드는 데 사용해야 하는 기본 클래스(파생)입니다.
- Extends
메서드
생성자 세부 정보
AlertRestClient(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
비밀 경고의 특성을 확장합니다. 가능한 값은 None 및 ValidationFingerprint입니다. 기본값은 None입니다. 설정expand되면 ValidationFingerprint 응답에 암호화되지 않은 형식의 비밀이 포함될 수 있습니다. 이 데이터를 사용할 때는 주의해야 합니다.
반환
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
반환
Promise<AlertAnalysisInstance[]>
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" 또는 "심각도" 기본값이 "id"여야 합니다.
- criteria
- SearchCriteria
반환된 경고를 제한하는 옵션
- expand
- AlertListExpandOption
- 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
비밀 경고의 특성을 확장합니다. 가능한 값은 None 및 ValidationFingerprint입니다. 기본값은 None입니다. 설정expand되면 ValidationFingerprint 응답에 암호화되지 않은 형식의 비밀이 포함될 수 있습니다. 이 데이터를 사용할 때는 주의해야 합니다.
반환
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
끌어오기 요청 분기를 포함할지 여부를 나타내는 부울 변수입니다.
반환
Promise<Branch[]>
getOrgLevelAlertsByIds(number[])
조직 수준에서 ID로 경고를 받습니다. 사용자에게 볼 수 있는 권한이 있는 경고만 다시 실행합니다. 사용하도록 설정된 SKU 계획에 대한 경고만 반환합니다.
function getOrgLevelAlertsByIds(alertIds: number[]): Promise<Alert[]>
매개 변수
- alertIds
-
number[]
검색할 경고 ID 목록
반환
Promise<Alert[]>
getSarif(number)
Sarif 처리 작업의 상태 가져오기
function getSarif(sarifId: number): Promise<SarifUploadStatus>
매개 변수
- sarifId
-
number
Sarif가 업로드되었을 때 반환된 Sarif ID
반환
Promise<SarifUploadStatus>
getUxFilters(string, string, AlertType)
getValidityData(string, string, number)
경고에 대한 유효성 세부 정보를 가져옵니다.
function getValidityData(project: string, repository: string, alertId: number): Promise<ValidationRequestInfo>
매개 변수
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
리포지토리의 이름 또는 ID
- alertId
-
number
경고의 ID
반환
Promise<ValidationRequestInfo>
initiateValidation(string, string, number)
지정된 경고에 대한 유효성 검사 프로세스 시작
function initiateValidation(project: string, repository: string, alertId: number): Promise<AlertValidationRequestStatus>
매개 변수
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
리포지토리의 이름 또는 ID
- alertId
-
number
경고의 ID
반환
Promise<AlertValidationRequestStatus>
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[]>
uploadOrgSarif(string)
조직 수준에서 Sarif 파일 업로드
function uploadOrgSarif(content: string): Promise<number>
매개 변수
- content
-
string
업로드할 콘텐츠
반환
Promise<number>
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>