Records - Update

レコードタイムライン既に存在する場合は更新します。それ以外の場合は、同じタイムラインに対して新しいレコードを作成します。

PATCH https://dev.azure.com/{organization}/{scopeIdentifier}/_apis/distributedtask/hubs/{hubName}/plans/{planId}/timelines/{timelineId}/records?api-version=7.1-preview.1

URI パラメーター

名前 / 必須 説明
hubName
path True

string

サーバー ハブの名前。 一般的な例: "build"、"rm"、"checks"

organization
path True

string

Azure DevOps 組織の名前です。

planId
path True

string

uuid

プランの ID。

scopeIdentifier
path True

string

uuid

要求のスコープを設定するプロジェクト GUID

timelineId
path True

string

uuid

タイムラインの ID。

api-version
query True

string

使う API のバージョン。 このバージョンの API を使用するには、これを '7.1-preview.1' に設定する必要があります。

要求本文

名前 説明
count

integer

シリアル化された項目の数。

value

string

シリアル化された項目。

応答

名前 説明
200 OK

TimelineRecord[]

正常な操作

セキュリティ

accessToken

個人用アクセス トークン。 ユーザー名とトークンに任意の値をパスワードとして使用します。

Type: basic

Update timeline's records

Sample Request

PATCH https://dev.azure.com/{organization}/{scopeIdentifier}/_apis/distributedtask/hubs/{hubName}/plans/{planId}/timelines/{timelineId}/records?api-version=7.1-preview.1

{
  "value": [
    {
      "id": "5e6d5dbf-ac69-5f56-8b85-8e9038703a8b",
      "parentId": null,
      "type": null,
      "name": null,
      "startTime": null,
      "finishTime": null,
      "currentOperation": null,
      "percentComplete": null,
      "state": null,
      "result": null,
      "resultCode": null,
      "changeId": 0,
      "lastModified": "0001-01-01T00:00:00",
      "workerName": null,
      "log": {
        "path": "logs\\5e6d5dbf-ac69-5f56-8b85-8e9038703a8b",
        "createdOn": "0001-01-01T00:00:00",
        "lastChangedOn": "0001-01-01T00:00:00",
        "id": 0,
        "location": null
      },
      "details": null,
      "errorCount": null,
      "warningCount": null,
      "location": null,
      "attempt": 1,
      "identifier": null
    }
  ],
  "count": 1
}

Sample Response

{
  "count": 1,
  "value": [
    {
      "id": "5e6d5dbf-ac69-5f56-8b85-8e9038703a8b",
      "parentId": "096e11e7-c8bb-5a90-1a73-4e639c9ea0f9",
      "type": "Task",
      "name": "Invoke REST API",
      "startTime": "2022-12-02T09:33:15.0466667Z",
      "finishTime": "2022-12-02T09:37:37.8433333Z",
      "currentOperation": null,
      "percentComplete": null,
      "state": "completed",
      "result": "succeeded",
      "resultCode": null,
      "changeId": 13,
      "lastModified": "0001-01-01T00:00:00",
      "workerName": null,
      "order": 1,
      "refName": "InvokeRESTAPI0",
      "log": {
        "id": 0,
        "location": "https://dev.azure.com/fabrikam/_apis/distributedtask/plans/787562d7-f1da-59cf-22c4-8a94fa784503/logs/0"
      },
      "details": null,
      "errorCount": 0,
      "warningCount": 0,
      "task": {
        "id": "9c3e8943-130d-4c78-ac63-8af81df62dfb",
        "name": "InvokeRESTAPI",
        "version": "1.198.0"
      },
      "location": "https://dev.azure.com/fabrikam/_apis/distributedtask/plans/787562d7-f1da-59cf-22c4-8a94fa784503/timelines/787562d7-f1da-59cf-22c4-8a94fa784503/records/5e6d5dbf-ac69-5f56-8b85-8e9038703a8b",
      "attempt": 1,
      "identifier": null
    }
  ]
}

定義

名前 説明
Issue

パイプラインの実行に関連付けられている問題 (エラー、警告)。

IssueType

問題の種類 (エラー、警告)。

JObject

JSON オブジェクトを表します。

TaskLogReference

タスク ログへの参照。 このクラスには、パイプラインの実行中にタイムライン レコードのログ コンソールに出力される出力に関する情報が含まれます。

TaskReference

タスクへの参照。

TaskResult
TimelineAttempt

TimelineRecord の更新を試みます。

TimelineRecord

パイプラインの実行中のさまざまな操作の実行に関する詳細情報。

TimelineRecordState

レコードの状態。

TimelineReference

タイムラインへの参照。

VariableValue

ジェネリック変数のラッパー クラス。

VssJsonCollectionWrapper

このクラスは、ワイヤ上の単一の JSON オブジェクトとしてコレクションをシリアル化するために使用されます。

Issue

パイプラインの実行に関連付けられている問題 (エラー、警告)。

名前 説明
category

string

問題のカテゴリ。
例: コード - コンパイル エラーを参照します
例: 一般 - 一般的なエラーを参照します

data

object

問題に関する詳細を含むディクショナリ。

message

string

問題の説明。

type

IssueType

問題の種類 (エラー、警告)。

IssueType

問題の種類 (エラー、警告)。

名前 説明
error

string

warning

string

JObject

JSON オブジェクトを表します。

名前 説明
item

string

type

string

この JToken のノードの種類を取得します。

TaskLogReference

タスク ログへの参照。 このクラスには、パイプラインの実行中にタイムライン レコードのログ コンソールに出力される出力に関する情報が含まれます。

名前 説明
id

integer

タスク ログの ID。

location

string

タスク ログの REST URL。

TaskReference

タスクへの参照。

名前 説明
id

string

タスク定義の ID。 task.json ファイルの id 値に対応します。
例: CmdLineV2 { "id": "D9BAFED4-0B18-4F58-968D-86655B4D2CE9" }

inputs

object

タスク定義に固有の入力のディクショナリ。 task.json ファイルの入力値に対応します。

name

string

タスク定義の名前。 task.json ファイルの名前値に対応します。
例: CmdLineV2 { "name": "CmdLine" }

version

string

タスク定義のバージョン。 task.json ファイルのバージョン値に対応します。
例: CmdLineV2 { "version": { "Major": 2, "Minor": 212, "Patch": 0 } }

TaskResult

名前 説明
abandoned

string

canceled

string

failed

string

skipped

string

succeeded

string

succeededWithIssues

string

TimelineAttempt

TimelineRecord の更新を試みます。

名前 説明
attempt

integer

レコードの試行。

identifier

string

レコードの一意の識別子。

recordId

string

指定したタイムライン内にあるレコード識別子。

timelineId

string

この試行を表すレコードを所有するタイムライン識別子。

TimelineRecord

パイプラインの実行中のさまざまな操作の実行に関する詳細情報。

名前 説明
agentSpecification

JObject

パイプライン ジョブを実行しているエージェントの仕様 (バイナリ形式)。 レコードの種類が Job の場合に適用されます。
例: { "VMImage" : "windows-2019" }

attempt

integer

レコードの試行回数。

changeId

integer

同時に更新されたすべてのレコードを接続する ID。 この値は、タイムラインの ChangeId から取得されます。

currentOperation

string

現在の操作を示す文字列。

details

TimelineReference

サブタイムラインへの参照。

errorCount

integer

この操作によって生成されたエラーの数。

finishTime

string

レコードの終了時刻。

id

string

レコードの ID。

identifier

string

試行間で一貫性のある文字列識別子。

issues

Issue[]

この操作によって生成される問題の一覧。

lastModified

string

レコードが最後に変更された時刻。

location

string

レコードの REST URL。

log

TaskLogReference

この操作によって生成されたログへの参照。

name

string

レコードの名前。

order

integer

タイムライン内の他のレコードに対する相対的な序数。

parentId

string

レコードの親の ID。
例: Stage はフェーズの親、フェーズはジョブの親、Job はタスクの親です。

percentComplete

integer

レコードの完了率。

previousAttempts

TimelineAttempt[]

前のレコードが試行されます。

queueId

integer

操作が実行されたエージェント プールにプロジェクトを接続するキューの ID。 レコードの種類が Job の場合に適用されます。

refName

string

参照先レコードの名前。

result

TaskResult

レコードの結果。

resultCode

string

レコードの操作が完了した際の定義済みの条件の評価。
例: 評価、 succeeded()結果 = True
例: 評価、 and(succeeded(), eq(variables['system.debug'], False))結果 = False

startTime

string

レコードの開始時刻。

state

TimelineRecordState

レコードの状態。

task

TaskReference

タスクへの参照。 レコードの種類が Task の場合に適用されます。

type

string

レコードによって追跡される操作の種類。
例: Stage、Phase、Job、Task...

variables

<string,  VariableValue>

レコードの変数。

warningCount

integer

この操作によって生成される警告の数。

workerName

string

操作を実行しているエージェントの名前。 レコードの種類が Job の場合に適用されます。

TimelineRecordState

レコードの状態。

名前 説明
completed

string

inProgress

string

pending

string

TimelineReference

タイムラインへの参照。

名前 説明
changeId

integer

変更 ID。

id

string

タイムラインの ID。

location

string

タイムラインの REST URL。

VariableValue

ジェネリック変数のラッパー クラス。

名前 説明
isReadOnly

boolean

スクリプトの実行時に変数を変更できるかどうかを示します。

isSecret

boolean

変数を保存時に暗号化する必要があるかどうかを示します。

value

string

変数の値。

VssJsonCollectionWrapper

このクラスは、ワイヤ上の単一の JSON オブジェクトとしてコレクションをシリアル化するために使用されます。

名前 説明
count

integer

シリアル化された項目の数。

value

string

シリアル化された項目。