Last Update: 9/26/2016

TaskHttpClient2_1

This API is in private preview and subject to change.

Module path: TFS/DistributedTask/TaskRestClient

Initialization sample

  import RestClient = require("TFS/DistributedTask/TaskRestClient");

  // Get an instance of the client
  var client = RestClient.getClient();

  // Call a method on the client
  // e.g. client.getResource(...).then(...);

Methods

appendLogContent()

Syntax

 IPromise<TFS_DistributedTask_Contracts.TaskLog> appendLogContent(content, scopeIdentifier, hubName, planId, logId)

Parameters

  • content: string. Content to upload
  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.
  • logId: number.

Returns

appendTimelineRecordFeed()

Syntax

 IPromise<void> appendTimelineRecordFeed(lines, scopeIdentifier, hubName, planId, timelineId, recordId)

Parameters

Returns

createAttachment()

Syntax

 IPromise<TFS_DistributedTask_Contracts.TaskAttachment> createAttachment(content, scopeIdentifier, hubName, planId, timelineId, recordId, type, name)

Parameters

  • content: string. Content to upload
  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.
  • timelineId: string.
  • recordId: string.
  • type: string.
  • name: string.

Returns

createLog()

Syntax

 IPromise<TFS_DistributedTask_Contracts.TaskLog> createLog(log, scopeIdentifier, hubName, planId)

Parameters

Returns

createTimeline()

Syntax

 IPromise<TFS_DistributedTask_Contracts.Timeline> createTimeline(timeline, scopeIdentifier, hubName, planId)

Parameters

Returns

deleteTimeline()

Syntax

 IPromise<void> deleteTimeline(scopeIdentifier, hubName, planId, timelineId)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.
  • timelineId: string.

Returns

getAttachment()

Syntax

 IPromise<TFS_DistributedTask_Contracts.TaskAttachment> getAttachment(scopeIdentifier, hubName, planId, timelineId, recordId, type, name)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.
  • timelineId: string.
  • recordId: string.
  • type: string.
  • name: string.

Returns

getAttachmentContent()

Syntax

 IPromise<ArrayBuffer> getAttachmentContent(scopeIdentifier, hubName, planId, timelineId, recordId, type, name)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.
  • timelineId: string.
  • recordId: string.
  • type: string.
  • name: string.

Returns

getAttachments()

Syntax

 IPromise<TFS_DistributedTask_Contracts.TaskAttachment[]> getAttachments(scopeIdentifier, hubName, planId, timelineId, recordId, type)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.
  • timelineId: string.
  • recordId: string.
  • type: string.

Returns

getLog()

Syntax

 IPromise<string[]> getLog(scopeIdentifier, hubName, planId, logId, startLine, endLine)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.
  • logId: number.
  • startLine: number. Optional.
  • endLine: number. Optional.

Returns

getLogs()

Syntax

 IPromise<TFS_DistributedTask_Contracts.TaskLog[]> getLogs(scopeIdentifier, hubName, planId)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.

Returns

getPlan()

Syntax

 IPromise<TFS_DistributedTask_Contracts.TaskOrchestrationPlan> getPlan(scopeIdentifier, hubName, planId)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.

Returns

getPlanAttachments()

Syntax

 IPromise<TFS_DistributedTask_Contracts.TaskAttachment[]> getPlanAttachments(scopeIdentifier, hubName, planId, type)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.
  • type: string.

Returns

getRecords()

Syntax

 IPromise<TFS_DistributedTask_Contracts.TimelineRecord[]> getRecords(scopeIdentifier, hubName, planId, timelineId, changeId)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.
  • timelineId: string.
  • changeId: number. Optional.

Returns

getTimeline()

Syntax

 IPromise<TFS_DistributedTask_Contracts.Timeline> getTimeline(scopeIdentifier, hubName, planId, timelineId, changeId, includeRecords)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.
  • timelineId: string.
  • changeId: number. Optional.
  • includeRecords: boolean. Optional.

Returns

getTimelines()

Syntax

 IPromise<TFS_DistributedTask_Contracts.Timeline[]> getTimelines(scopeIdentifier, hubName, planId)

Parameters

  • scopeIdentifier: string. The project GUID to scope the request
  • hubName: string. The name of the server hub: "build" for the Build server or "rm" for the Release Management server
  • planId: string.

Returns

updateRecords()

Syntax

 IPromise<TFS_DistributedTask_Contracts.TimelineRecord[]> updateRecords(records, scopeIdentifier, hubName, planId, timelineId)

Parameters

Returns