Work item tracking artifact uri query

Last Update: 5/17/2017

api-version = 3.2-preview

If you haven't already, look at the information on getting started with these APIs.

Get work items referenced by artifactUri

Gets the work items linked to the artifact uri. For available artifacts, see the section Artifact link types

POST https://{instance}/_apis/wit/artifacturiquery?api-version={version}

Request parameters

Name In Type Notes
instance URL string Required. VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
api-version Query string Required. Version of the API to use. This should be set to '3.2-preview' to use this version of the API.
Body ArtifactUriQuery Required. List of artifact uris.

Response

Type Notes
ArtifactUriQueryResult work item reference linked to the artifact uri.

Sample request

POST https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/artifacturiquery?api-version=3.2-preview
Content-Type: application/json
{
  "artifactUris": [
    "vstfs:///Git/Commit/3065bb47-8344-4370-982a-5183abf197fa%2F649107bd-ab35-4192-8584-601f64172f80%2F4800cfa0be564b1e606d6811e99e0380f765a9c4"
  ]
}

Sample response

Status code: 200
{
  "artifactUrisQueryResult": {
    "vstfs:///Git/Commit/3065bb47-8344-4370-982a-5183abf197fa%2F649107bd-ab35-4192-8584-601f64172f80%2F4800cfa0be564b1e606d6811e99e0380f765a9c4": [
      {
        "id": 1,
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItems/1"
      },
      {
        "id": 2,
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItems/2"
      }
    ]
  }
}