AlertRestClient class
VSS REST api에 대한 요청을 만드는 데 사용해야 하는 기본 클래스(파생)입니다.
- Extends
메서드
생성자 세부 정보
AlertRestClient(IVssRestClientOptions)
메서드 세부 정보
createAutofixRequest(string, number, string)
지정된 알림에 대해 자동 고정 요청을 생성하세요.
function createAutofixRequest(project: string, alertId: number, repository: string): Promise<AutofixRequest>
매개 변수
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- alertId
-
number
자동 수정 알림 ID를 생성하세요.
- repository
-
string
리포지토리의 이름 또는 ID입니다.
반품
Promise<AutofixRequest>
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>
deleteAllPipelineAnalyses(string, string)
리포지토리의 모든 파이프라인에 대한 분석 데이터를 일시 삭제하여 연결된 고급 보안 경고를 정리합니다.
function deleteAllPipelineAnalyses(project: string, repository: string): Promise<void>
매개 변수
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
리포지토리의 이름 또는 ID입니다.
반품
Promise<void>
deletePipelineAnalysis(string, string, number)
특정 파이프라인에 대한 분석 데이터를 일시 삭제하여 관련 고급 보안 경고를 정리합니다.
function deletePipelineAnalysis(project: string, repository: string, adoPipelineId: number): Promise<void>
매개 변수
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
리포지토리의 이름 또는 ID입니다.
- adoPipelineId
-
number
분석 데이터를 정리해야 하는 ADO 파이프라인의 ID입니다.
반품
Promise<void>
exportSarif(string, string, number[], string)
알림을 하나의 SARIF 파일로 내보내기
function exportSarif(project: string, repository: string, alertIds: number[], branchName?: string): Promise<any>
매개 변수
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
리포지토리의 이름 또는 ID
- alertIds
-
number[]
내보낼 경고 ID 목록
- branchName
-
string
목표물의 지부명이 경고합니다. 명시되지 않은 경우, 기본 분기가 사용됩니다.
반품
Promise<any>
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[]>
getAlertMetadata(string, number, string)
알림 메타데이터를 확보하세요.
function getAlertMetadata(project: string, alertId: number, repository: string): Promise<AlertMetadata>
매개 변수
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- alertId
-
number
검색할 경고의 ID
- repository
-
string
경고가 속한 리포지토리의 이름 또는 ID
반품
Promise<AlertMetadata>
getAlertMetadataBatch(AlertMetadataBatchRequest, string, string)
알림 메타데이터를 받아보세요.
function getAlertMetadataBatch(alertMetadataBatchRequest: AlertMetadataBatchRequest, project: string, repository: string): Promise<AlertMetadata[]>
매개 변수
- alertMetadataBatchRequest
- AlertMetadataBatchRequest
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
경고가 속한 리포지토리의 이름 또는 ID
반품
Promise<AlertMetadata[]>
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>
getAlertsByIds(AlertBatchRequest, string, string)
경고 ID로 경고 가져오기 현재 비밀 경고 가져오기만 지원합니다.
function getAlertsByIds(request: AlertBatchRequest, project: string, repository: string): Promise<Alert[]>
매개 변수
- request
- AlertBatchRequest
알림 ID와 선택적 알림 유형 필터를 포함하는 요청
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- repository
-
string
리포지토리의 이름 또는 ID
반품
Promise<Alert[]>
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>
uploadSarifToGitHub(string, string, string, string, string)
GitOps 앱을 통해 GitHub 코드 스캔을 통해 SARIF 파일을 업로드하세요.
function uploadSarifToGitHub(content: string, project: string, hostname: string, owner: string, repo: string): Promise<string>
매개 변수
- content
-
string
업로드할 콘텐츠
- project
-
string
프로젝트 ID 또는 프로젝트 이름
- hostname
-
string
GitHub 호스트네임(예: github.com 또는 microsoft.ghe.com)
- owner
-
string
GitHub 저장소 소유자(조직 또는 사용자)
- repo
-
string
GitHub 저장소 이름
반품
Promise<string>