Condividi tramite


Logs - Append Log Content

Aggiungere un log al log di un'attività. Il log deve essere inviato nel corpo della richiesta come flusso di oggetti TaskLog.

POST https://dev.azure.com/{organization}/{scopeIdentifier}/_apis/distributedtask/hubs/{hubName}/plans/{planId}/logs/{logId}?api-version=7.1-preview.1

Parametri dell'URI

Nome In Necessario Tipo Descrizione
hubName
path True

string

Nome dell'hub del server. Esempi comuni: "build", "rm", "checks"

logId
path True

integer

int32

ID del log.

organization
path True

string

Nome dell'organizzazione di Azure DevOps.

planId
path True

string

uuid

ID del piano.

scopeIdentifier
path True

string

uuid

GUID del progetto per definire l'ambito della richiesta

api-version
query True

string

Versione dell'API da usare. Deve essere impostato su '7.1-preview.1' per usare questa versione dell'API.

Corpo della richiesta

Media Types: "application/octet-stream"

Nome Tipo Descrizione
body

string

Flusso da caricare

Risposte

Nome Tipo Descrizione
200 OK

TaskLog

operazione riuscita

Sicurezza

accessToken

Token di accesso personale. Usare qualsiasi valore per il nome utente e il token come password.

Type: basic

Esempio

Append content to a log

Sample Request

POST https://dev.azure.com/{organization}/{scopeIdentifier}/_apis/distributedtask/hubs/{hubName}/plans/{planId}/logs/{logId}?api-version=7.1-preview.1

Sample Response

{
  "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
}

Definizioni

TaskLog

Un log attività connesso a un record della sequenza temporale.

Nome Tipo Descrizione
createdOn

string

Ora della creazione del log attività.

id

integer

ID del log attività.

indexLocation

string

URL REST del log attività quando indicizzato.

lastChangedOn

string

Ora dell'ultima modifica del log attività.

lineCount

integer

Numero delle righe del log attività.

location

string

URL REST del log attività.

path

string

Percorso del log attività.