Check Evaluations - Evaluate

İşlem hattında denetim için değerlendirme başlatma

POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/runs?api-version=7.1-preview.1
POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/runs?$expand={$expand}&api-version=7.1-preview.1

URI Parametreleri

Name İçinde Gerekli Tür Description
organization
path True

string

Azure DevOps kuruluşunun adı.

project
path True

string

Proje Kimliği veya proje adı

api-version
query True

string

Kullanılacak API'nin sürümü. Bu, api'nin bu sürümünü kullanmak için '7.1-preview.1' olarak ayarlanmalıdır.

$expand
query

CheckSuiteExpandParameter

İstek Gövdesi

Name Tür Description
context

JObject

Bir JSON nesnesini temsil eder.

id

string

resources

Resource[]

Yanıtlar

Name Tür Description
200 OK

CheckSuite

başarılı işlem

Güvenlik

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.build_execute Derleme sonuçları, tanımlar ve istekler dahil olmak üzere derleme yapıtlarına erişme ve derlemeyi kuyruğa alma, derleme özelliklerini güncelleştirme ve hizmet kancaları aracılığıyla derleme olayları hakkında bildirim alma olanağı verir.

Örnekler

Sample Request

POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/runs?api-version=7.1-preview.1

{
  "id": "64dc0df7-f224-4b3b-a251-f67cbe9cf7a3",
  "resources": [
    {
      "type": "queue",
      "id": "1",
      "name": "Default"
    }
  ],
  "context": {
    "PlanId": 1,
    "Pipeline.Id": 2,
    "GraphNode.Id": 3
  }
}

Sample Response

request-Context: appId=cid-v1:a892bfef-0287-4640-9f5e-cffc90fbcf94
access-Control-Expose-Headers: Request-Context
{
  "status": "canceled",
  "message": "",
  "completedDate": "2020-11-19T12:59:09.6567354Z",
  "checkRuns": [
    {
      "id": "c579b5e1-9722-42e1-981e-63e004e6cb69",
      "createdDate": "2020-11-19T12:59:09.6567354Z",
      "completedDate": "2020-11-19T12:59:09.6567354Z",
      "checkConfigurationRef": {
        "id": 15,
        "type": {
          "id": "e1a1fc6c-c278-4492-ae1c-c42f8697612c",
          "name": "Authorization"
        },
        "url": "https://dev.azure.com/fabrikam/d6b3e0ea-8197-4dec-831b-50e2e06ff95f/_apis/pipelines/checks/configurations/15",
        "resource": {
          "type": "queue",
          "id": "1"
        }
      },
      "status": "canceled",
      "resultMessage": "Check aborted. This could be because the run was canceled or another check on the stage failed."
    }
  ],
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/d6b3e0ea-8197-4dec-831b-50e2e06ff95f/_apis/pipelines/checks/runs"
    }
  },
  "id": "64dc0df7-f224-4b3b-a251-f67cbe9cf7a3",
  "context": {
    "PlanId": 1,
    "Pipeline.Id": 2,
    "GraphNode.Id": 3
  }
}

Tanımlar

Name Description
CheckConfigurationRef
CheckRun
CheckRunStatus
CheckSuite
CheckSuiteExpandParameter
CheckSuiteRequest
CheckType
JObject

Bir JSON nesnesini temsil eder.

ReferenceLinks

REST başvuru bağlantılarının koleksiyonunu temsil eden sınıf.

Resource

CheckConfigurationRef

Name Tür Description
id

integer

Yapılandırma kimliğini denetleyin.

resource

Resource

Denetimin yapılandırıldığı kaynak.

type

CheckType

Yapılandırma türünü denetleme

url

string

Yapılandırılan denetimi getirebileceği URL.

CheckRun

Name Tür Description
checkConfigurationRef

CheckConfigurationRef

completedDate

string

createdDate

string

id

string

resultMessage

string

status

CheckRunStatus

CheckRunStatus

Name Tür Description
all

string

approved

string

canceled

string

completed

string

failed

string

none

string

queued

string

rejected

string

running

string

timedOut

string

CheckSuite

Name Tür Description
_links

ReferenceLinks

Başvuru bağlantıları.

checkRuns

CheckRun[]

Verilen denetim paketi isteğiyle ilişkili denetim çalıştırmalarının listesi.

completedDate

string

Verilen denetim paketi isteğinin tamamlanma tarihi

context

JObject

Denetim paketi isteği için değerlendirme bağlamı

id

string

kaynak listesinde işlem hattı denetimi çalıştırma isteği için işlem hattı düzenleyicisi tarafından oluşturulan benzersiz paket kimliği İşlem hattı düzenleyicisi, bir aşamadaki denetim isteklerini eşlemek için bu tanımlayıcıyı kullanacaktır

message

string

Verilen denetim paketi isteği için isteğe bağlı ileti

status

CheckRunStatus

Genel denetim, verilen paket isteğinin durumunu çalıştırır. Bu denetim paketi durumudur

CheckSuiteExpandParameter

Name Tür Description
none

string

resources

string

CheckSuiteRequest

Name Tür Description
context

JObject

Bir JSON nesnesini temsil eder.

id

string

resources

Resource[]

CheckType

Name Tür Description
id

string

Denetim türü kimliğini alır veya ayarlar.

name

string

Denetim türünün adı.

JObject

Bir JSON nesnesini temsil eder.

Name Tür Description
item

string

type

string

Bu JToken için düğüm türünü alır.

REST başvuru bağlantılarının koleksiyonunu temsil eden sınıf.

Name Tür Description
links

object

Bağlantıların salt okunur görünümü. Başvuru bağlantıları salt okunur olduğundan, bunları yalnızca salt okunur olarak kullanıma açmak istiyoruz.

Resource

Name Tür Description
id

string

Kaynağın kimliği.

name

string

Kaynağın adı.

type

string

Kaynağın türü.