مشاركة عبر


AlertRestClient class

الفئة الأساسية التي يجب استخدامها (مشتقة من) لتقديم طلبات إلى VSS REST apis

يمتد

المنشئون

AlertRestClient(IVssRestClientOptions)

الأساليب

createLegalReview(string, string, number, string)

إنشاء مراجعة قانونية. يؤدي ذلك إلى إنشاء المراجعة القانونية المقترنة بالتنبيه. يتضمن عنوان URL لعنصر عمل المراجعة.

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

الحصول على تنبيه.

getAlertInstances(string, number, string, string)

احصل على مثيلات تنبيه على فرع محدد باستخدام @ref. إذا @ref لم يتم توفيرها، فسترجع مثيلات تنبيه على الفرع الافتراضي (إذا كان التنبيه موجودا في الفرع الافتراضي) أو أحدث فرع متأثر.

getAlertMetadata(string, number, string)

احصل على بيانات وصفية للتنبيه.

getAlertMetadataBatch(AlertMetadataBatchRequest, string, string)

احصل على بيانات وصفية للتنبيهات.

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

الحصول على تنبيهات لمستودع

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

الحصول على تنبيه.

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

إرجاع الفروع التي تم إرسال نتائج التحليل لها.

getOrgLevelAlertsByIds(number[])

احصل على تنبيهات حسب معرفاتهم على مستوى المؤسسة. لا يعيد سوى إعادة تشغيل التنبيهات التي يمتلك المستخدم إذنا لعرضها. ترجع فقط تنبيهات خطط SKU التي تم تمكينها.

getSarif(number)

الحصول على حالة مهمة معالجة Sarif

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

احصل على تفاصيل الصلاحية للتنبيه.

initiateValidation(string, string, number)

بدء عملية التحقق من الصحة لتنبيه معين

updateAlert(AlertStateUpdate, string, number, string)

تحديث حالة التنبيه

updateAlertsMetadata(AlertMetadata[], string, string)

تحديث اقترانات بيانات تعريف التنبيه.

uploadOrgSarif(string)

تحميل ملف Sarif على مستوى المؤسسة

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

معرف المشروع أو اسم المشروع

repository

string

اسم أو معرف مستودع للتنبيه القانوني

alertId

number

معرف تنبيه الأمان المتقدم للتنبيه القانوني للحصول على المراجعة القانونية

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

معرف المشروع أو اسم المشروع

alertId

number

معرف التنبيه المراد استرداده

repository

string

اسم أو معرف مستودع يكون التنبيه جزءا منه

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

معرف المشروع أو اسم المشروع

alertId

number

معرف التنبيه المراد استرداده

repository

string

اسم أو معرف مستودع يكون التنبيه جزءا منه

ref

string

المرتجعات

getAlertMetadata(string, number, string)

احصل على بيانات وصفية للتنبيه.

function getAlertMetadata(project: string, alertId: number, repository: string): Promise<AlertMetadata>

المعلمات

project

string

معرف المشروع أو اسم المشروع

alertId

number

معرف التنبيه المراد استرداده

repository

string

اسم أو معرف مستودع يكون التنبيه جزءا منه

المرتجعات

Promise<AlertMetadata>

getAlertMetadataBatch(AlertMetadataBatchRequest, string, string)

احصل على بيانات وصفية للتنبيهات.

function getAlertMetadataBatch(alertMetadataBatchRequest: AlertMetadataBatchRequest, project: string, repository: string): Promise<AlertMetadata[]>

المعلمات

alertMetadataBatchRequest
AlertMetadataBatchRequest
project

string

معرف المشروع أو اسم المشروع

repository

string

اسم أو معرف مستودع يكون التنبيه جزءا منه

المرتجعات

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

معرف المشروع أو اسم المشروع

repository

string

اسم المستودع أو معرفه

top

number

الحد الأقصى لعدد التنبيهات التي يجب إرجاعها

orderBy

string

يجب أن يكون "id" "firstSeen" "lastSeen" "fixedOn" أو "severity" Defaults إلى "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

معرف المشروع أو اسم المشروع

alertId

number

معرف التنبيه المراد استرداده

repository

string

اسم أو معرف مستودع يكون التنبيه جزءا منه

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

معرف المشروع أو اسم المشروع

repository

string

alertType
AlertType

نوع التنبيه: فحص التبعية (1) والسرية (2) والرمز QL (3) وما إلى ذلك.

continuationToken

string

متغير سلسلة يمثل اسم الفرع ويستخدم لجلب الفروع التي تتبعه بترتيب أبجدي.

branchNameContains

string

متغير سلسلة يستخدم لجلب الفروع التي تحتوي على هذه السلسلة في أي مكان في اسم الفرع، غير حساس لحالة الأحرف.

top

number

متغير int يستخدم لإرجاع فروع أعلى k التي تفي بمعايير البحث.

includePullRequestBranches

boolean

متغير منطقي يشير إلى ما إذا كان يجب تضمين فروع طلب السحب أم لا.

المرتجعات

Promise<Branch[]>

getOrgLevelAlertsByIds(number[])

احصل على تنبيهات حسب معرفاتهم على مستوى المؤسسة. لا يعيد سوى إعادة تشغيل التنبيهات التي يمتلك المستخدم إذنا لعرضها. ترجع فقط تنبيهات خطط SKU التي تم تمكينها.

function getOrgLevelAlertsByIds(alertIds: number[]): Promise<Alert[]>

المعلمات

alertIds

number[]

قائمة معرفات التنبيه المطلوب استردادها

المرتجعات

Promise<Alert[]>

getSarif(number)

الحصول على حالة مهمة معالجة Sarif

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

المعلمات

sarifId

number

تم إرجاع معرف Sarif عند تحميل Sarif

المرتجعات

getUxFilters(string, string, AlertType)

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

المعلمات

project

string

معرف المشروع أو اسم المشروع

repository

string

alertType
AlertType

المرتجعات

Promise<UxFilters>

getValidityData(string, string, number)

احصل على تفاصيل الصلاحية للتنبيه.

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

المعلمات

project

string

معرف المشروع أو اسم المشروع

repository

string

اسم المستودع أو معرفه

alertId

number

معرف التنبيه

المرتجعات

initiateValidation(string, string, number)

بدء عملية التحقق من الصحة لتنبيه معين

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

المعلمات

project

string

معرف المشروع أو اسم المشروع

repository

string

اسم المستودع أو معرفه

alertId

number

معرف التنبيه

المرتجعات

updateAlert(AlertStateUpdate, string, number, string)

تحديث حالة التنبيه

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

المعلمات

stateUpdate
AlertStateUpdate

الحالة الجديدة للتنبيه

project

string

معرف المشروع أو اسم المشروع

alertId

number

معرف التنبيه

repository

string

اسم المستودع أو معرفه

المرتجعات

Promise<Alert>

updateAlertsMetadata(AlertMetadata[], string, string)

تحديث اقترانات بيانات تعريف التنبيه.

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

المعلمات

alertsMetadata

AlertMetadata[]

قائمة ببيانات التعريف لإقرانها بالتنبيهات.

project

string

معرف المشروع أو اسم المشروع

repository

string

اسم المستودع أو معرفه.

المرتجعات

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

معرف المشروع أو اسم المشروع

repository

string

اسم المستودع أو معرفه

notificationFlag

String

رأس للإشارة إلى أن هذا إعلام تقدم

المرتجعات

Promise<number>