Logs - Create

Create a log and connect it to a pipeline run's execution plan.

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

URI Parameters

Name In Required Type Description
hubName
path True

string

The name of the server hub. Common examples: "build", "rm", "checks"

organization
path True

string

The name of the Azure DevOps organization.

planId
path True

string

uuid

The ID of the plan.

scopeIdentifier
path True

string

uuid

The project GUID to scope the request

api-version
query True

string

Version of the API to use. This should be set to '7.1' to use this version of the api.

Request Body

Name Type Description
createdOn

string

The time of the task log creation.

id

integer

The ID of the task log.

indexLocation

string

The REST URL of the task log when indexed.

lastChangedOn

string

The time of the last modification of the task log.

lineCount

integer

The number of the task log lines.

location

string

The REST URL of the task log.

path

string

The path of the task log.

Responses

Name Type Description
200 OK

TaskLog

successful operation

Security

accessToken

Personal access token. Use any value for the user name and the token as the password.

Type: basic

Examples

Create a log

Sample request

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

{
  "path": "logs\\5e6d5dbf-ac69-5f56-8b85-8e9038703a8b",
  "createdOn": "0001-01-01T00:00:00",
  "lastChangedOn": "0001-01-01T00:00:00",
  "id": 0,
  "location": null
}

Sample response

{
  "path": "logs\\5e6d5dbf-ac69-5f56-8b85-8e9038703a8b",
  "lineCount": 49,
  "createdOn": "2022-12-02T09:33:14.873Z",
  "lastChangedOn": "2022-12-02T09:50:19.033Z",
  "id": 3,
  "location": null
}

Definitions

TaskLog

A task log connected to a timeline record.

Name Type Description
createdOn

string

The time of the task log creation.

id

integer

The ID of the task log.

indexLocation

string

The REST URL of the task log when indexed.

lastChangedOn

string

The time of the last modification of the task log.

lineCount

integer

The number of the task log lines.

location

string

The REST URL of the task log.

path

string

The path of the task log.