Test Plans - Get

Get test plan by ID.

GET https://dev.azure.com/{organization}/{project}/_apis/test/plans/{planId}?api-version=5.0

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

planId
path True

integer

int32

ID of the test plan to return.

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' to use this version of the api.

Responses

Name Type Description
200 OK

TestPlan

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/plans/1?api-version=5.0

Sample Response

{
  "id": 1,
  "name": "sprint1",
  "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1",
  "project": {
    "id": "eb6e4656-77fc-42a1-9181-4c6d8e9da5d1",
    "name": "Fabrikam-Fiber-TFVC",
    "url": "https://dev.azure.com/fabrikam/_apis/projects/Fabrikam-Fiber-TFVC"
  },
  "area": {
    "id": "343",
    "name": "Fabrikam-Fiber-TFVC"
  },
  "description": "",
  "startDate": "2014-05-04T16:21:36.253Z",
  "endDate": "2014-05-11T16:21:36.253Z",
  "iteration": "Fabrikam-Fiber-TFVC\\Release 1\\Sprint 1",
  "updatedDate": "2014-05-04T10:51:37.127Z",
  "updatedBy": {
    "id": "e5a5f7f8-6507-4c34-b397-6c4818e002f4",
    "displayName": "Fabrikam Fiber",
    "uniqueName": "fabrikamfiber1@outlook.com",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e5a5f7f8-6507-4c34-b397-6c4818e002f4",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=e5a5f7f8-6507-4c34-b397-6c4818e002f4"
  },
  "owner": {
    "id": "e5a5f7f8-6507-4c34-b397-6c4818e002f4",
    "displayName": "Fabrikam Fiber",
    "uniqueName": "fabrikamfiber1@outlook.com",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e5a5f7f8-6507-4c34-b397-6c4818e002f4",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=e5a5f7f8-6507-4c34-b397-6c4818e002f4"
  },
  "revision": 1,
  "state": "Active",
  "rootSuite": {
    "id": "1",
    "name": "sprint1",
    "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/1"
  },
  "clientUrl": "mtms://fabrikam.visualstudio.com:443/DefaultCollection/p:Fabrikam-Fiber-TFVC/Testing/testplan/connect?id=1"
}

Definitions

Name Description
IdentityRef
ReferenceLinks

The class to represent a collection of REST reference links.

ReleaseEnvironmentDefinitionReference

Reference to release environment resource.

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.

TestOutcomeSettings

Test outcome settings

TestPlan

The test plan resource.

IdentityRef

Name Type Description
_links

ReferenceLinks

This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.

descriptor

string

The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.

directoryAlias

string

displayName

string

This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.

id

string

imageUrl

string

inactive

boolean

isAadIdentity

boolean

isContainer

boolean

isDeletedInOrigin

boolean

profileUrl

string

uniqueName

string

url

string

This url is the full route to the source resource of this graph subject.

The class to represent a collection of REST reference links.

Name Type Description
links

object

The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.

ReleaseEnvironmentDefinitionReference

Reference to release environment resource.

Name Type Description
definitionId

integer

ID of the release definition that contains the release environment definition.

environmentDefinitionId

integer

ID of the release environment definition.

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

TestOutcomeSettings

Test outcome settings

Name Type Description
syncOutcomeAcrossSuites

boolean

Value to configure how test outcomes for the same tests across suites are shown

TestPlan

The test plan resource.

Name Type Description
area

ShallowReference

Area of the test plan.

build

ShallowReference

Build to be tested.

buildDefinition

ShallowReference

The Build Definition that generates a build associated with this test plan.

description

string

Description of the test plan.

endDate

string

End date for the test plan.

id

integer

ID of the test plan.

iteration

string

Iteration path of the test plan.

name

string

Name of the test plan.

owner

IdentityRef

Owner of the test plan.

previousBuild

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.

project

ShallowReference

Project which contains the test plan.

releaseEnvironmentDefinition

ReleaseEnvironmentDefinitionReference

Release Environment to be used to deploy the build and run automated tests from this test plan.

revision

integer

Revision of the test plan.

rootSuite

ShallowReference

Root test suite of the test plan.

startDate

string

Start date for the test plan.

state

string

State of the test plan.

testOutcomeSettings

TestOutcomeSettings

Value to configure how same tests across test suites under a test plan need to behave

updatedBy

IdentityRef

updatedDate

string

url

string

URL of the test plan resource.