Clone Operation - Get

Get clone information.

GET https://dev.azure.com/{organization}/{project}/_apis/test/cloneoperation/{cloneOperationId}?api-version=5.0-preview.2
GET https://dev.azure.com/{organization}/{project}/_apis/test/cloneoperation/{cloneOperationId}?$includeDetails={$includeDetails}&api-version=5.0-preview.2

URI Parameters

Name In Required Type Description
cloneOperationId
path True

integer

int32

Operation ID returned when we queue a clone operation

organization
path True

string

The name of the Azure DevOps organization.

project
path True

string

Project ID or project name

api-version
query True

string

Version of the API to use. This should be set to '5.0-preview.2' to use this version of the api.

$includeDetails
query

boolean

If false returns only status of the clone operation information, if true returns complete clone information

Responses

Name Type Description
200 OK

CloneOperationInformation

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.test Grants the ability to read test plans, cases, results and other test management related artifacts.

Examples

Sample request

GET https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/cloneoperation/{cloneOperationId}?$includeDetails=true&api-version=5.0-preview.2

Sample response

{
  "opId": 2,
  "creationDate": "2015-12-22T08:41:39.403Z",
  "completionDate": "2015-12-22T08:41:40.49Z",
  "state": "succeeded",
  "message": null,
  "cloneStatistics": {
    "totalTestCasesCount": 7,
    "clonedTestCasesCount": 7,
    "clonedSharedStepsCount": 0,
    "totalRequirementsCount": 0,
    "clonedRequirementsCount": 0
  },
  "resultObjectType": "testPlan",
  "destinationObject": {
    "id": "18",
    "name": "DestinationPlan",
    "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc2/_apis/test/Plans/18"
  },
  "sourceObject": {
    "id": "1",
    "name": "TestPlan1",
    "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
  },
  "destinationPlan": {
    "id": "18",
    "name": "DestinationPlan",
    "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc2/_apis/test/Plans/18"
  },
  "sourcePlan": {
    "id": "1",
    "name": "TestPlan1",
    "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
  },
  "destinationProject": {
    "name": "fabrikam-fiber-tfvc2",
    "url": "https://dev.azure.com/fabrikam/_apis/projects/fabrikam-fiber-tfvc2"
  },
  "sourceProject": {
    "name": "fabrikam-fiber-tfvc",
    "url": "https://dev.azure.com/fabrikam/_apis/projects/fabrikam-fiber-tfvc"
  },
  "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/cloneOperation/2"
}

Definitions

Name Description
CloneOperationInformation

Detail About Clone Operation.

CloneOperationState

Current state of the operation. When State reaches Suceeded or Failed, the operation is complete

CloneStatistics
ResultObjectType

The type of the object generated as a result of the Clone operation

ShallowReference

An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links.

CloneOperationInformation

Detail About Clone Operation.

Name Type Description
cloneStatistics

CloneStatistics

Clone Statistics

completionDate

string

If the operation is complete, the DateTime of completion. If operation is not complete, this is DateTime.MaxValue

creationDate

string

DateTime when the operation was started

destinationObject

ShallowReference

Shallow reference of the destination

destinationPlan

ShallowReference

Shallow reference of the destination

destinationProject

ShallowReference

Shallow reference of the destination

message

string

If the operation has Failed, Message contains the reason for failure. Null otherwise.

opId

integer

The ID of the operation

resultObjectType

ResultObjectType

The type of the object generated as a result of the Clone operation

sourceObject

ShallowReference

Shallow reference of the source

sourcePlan

ShallowReference

Shallow reference of the source

sourceProject

ShallowReference

Shallow reference of the source

state

CloneOperationState

Current state of the operation. When State reaches Suceeded or Failed, the operation is complete

url

string

Url for geting the clone information

CloneOperationState

Current state of the operation. When State reaches Suceeded or Failed, the operation is complete

Name Type Description
failed

string

value for Failed State

inProgress

string

value for Inprogress state

queued

string

Value for Queued State

succeeded

string

value for Success state

CloneStatistics

Name Type Description
clonedRequirementsCount

integer

Number of Requirments cloned so far.

clonedSharedStepsCount

integer

Number of shared steps cloned so far.

clonedTestCasesCount

integer

Number of test cases cloned so far

totalRequirementsCount

integer

Total number of requirements to be cloned

totalTestCasesCount

integer

Total number of test cases to be cloned

ResultObjectType

The type of the object generated as a result of the Clone operation

Name Type Description
testPlan

string

Plan Clone

testSuite

string

Suite Clone

ShallowReference

An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links.

Name Type Description
id

string

ID of the resource

name

string

Name of the linked resource (definition name, controller name, etc.)

url

string

Full http link to the resource