Logs - Append Log Content
Tambahkan log ke log tugas. Log harus dikirim dalam isi permintaan sebagai aliran objek TaskLog.
POST https://dev.azure.com/{organization}/{scopeIdentifier}/_apis/distributedtask/hubs/{hubName}/plans/{planId}/logs/{logId}?api-version=7.1
Parameter URI
| Nama | Dalam | Diperlukan | Jenis | Deskripsi |
|---|---|---|---|---|
|
hub
|
path | True |
string |
Nama hub server. Contoh umum: "build", "rm", "checks" |
|
log
|
path | True |
integer (int32) |
ID log. |
|
organization
|
path | True |
string |
Nama organisasi Azure DevOps. |
|
plan
|
path | True |
string (uuid) |
ID paket. |
|
scope
|
path | True |
string (uuid) |
GUID proyek untuk mencakup permintaan |
|
api-version
|
query | True |
string |
Versi API yang akan digunakan. Ini harus diatur ke '7.1' untuk menggunakan versi api ini. |
Isi Permintaan
Media Types: "application/octet-stream"
| Nama | Jenis | Deskripsi |
|---|---|---|
| body |
string (Stream) |
Streaming untuk diunggah |
Respons
| Nama | Jenis | Deskripsi |
|---|---|---|
| 200 OK |
operasi berhasil |
Keamanan
accessToken
Token akses pribadi. Gunakan nilai apa pun untuk nama pengguna dan token sebagai kata sandi.
Jenis:
basic
Contoh
Append content to a log
Permintaan sampel
POST https://dev.azure.com/{organization}/{scopeIdentifier}/_apis/distributedtask/hubs/{hubName}/plans/{planId}/logs/{logId}?api-version=7.1
Respon sampel
{
"path": "logs\\5e6d5dbf-ac69-5f56-8b85-8e9038703a8b",
"lineCount": 36,
"createdOn": "2022-12-02T09:33:14.873Z",
"lastChangedOn": "2022-12-02T09:49:22.097Z",
"id": 3,
"location": null
}
Definisi
TaskLog
Log tugas tersambung ke rekaman garis waktu.
| Nama | Jenis | Deskripsi |
|---|---|---|
| createdOn |
string (date-time) |
Waktu pembuatan log tugas. |
| id |
integer (int32) |
ID log tugas. |
| indexLocation |
string |
URL REST log tugas saat diindeks. |
| lastChangedOn |
string (date-time) |
Waktu modifikasi terakhir log tugas. |
| lineCount |
integer (int64) |
Jumlah baris log tugas. |
| location |
string |
URL REST log tugas. |
| path |
string |
Jalur log tugas. |