« Azure devops api » : différence entre les versions

De Banane Atomic
Aller à la navigationAller à la recherche
Ligne 18 : Ligne 18 :
== [https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/get%20work%20item Get Work Item] ==
== [https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/get%20work%20item Get Work Item] ==
<pre>GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}?api-version=6.0</pre>
<pre>GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}?api-version=6.0</pre>
<kode lang='json' collapsed>
{
  "id": 111,
  "fields": {
    "System.AreaPath": "My Projetc\\My Team",
    "System.TeamProject": "My Projetc",
    "System.IterationPath": "My Projetc\\Sprint 81",
    "System.WorkItemType": "Product Backlog Item",
    "System.State": "Done",
    "System.Reason": "Moved out of state 05_Ready for review",
    "System.AssignedTo": {
      "displayName": "Firstname Lastname",
      "id": "13245678-1234-134-1234-123465789012",
      "uniqueName": "firstname.lastname@domain.net"
    },
    "System.Title": "My title",
  }
}
</kode>


= Pipeline =
= Pipeline =

Version du 28 janvier 2021 à 18:33

Links

Build

Get Build Work Items Refs

GET https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/workitems?api-version=6.0
Json.svg
{
  "count": 1,
  "value": [
    {
      "id": "111"
    }

Work Item

Get Work Item

GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}?api-version=6.0
Json.svg
{
  "id": 111,
  "fields": {
    "System.AreaPath": "My Projetc\\My Team",
    "System.TeamProject": "My Projetc",
    "System.IterationPath": "My Projetc\\Sprint 81",
    "System.WorkItemType": "Product Backlog Item",
    "System.State": "Done",
    "System.Reason": "Moved out of state 05_Ready for review",
    "System.AssignedTo": {
      "displayName": "Firstname Lastname",
      "id": "13245678-1234-134-1234-123465789012",
      "uniqueName": "firstname.lastname@domain.net"
    },
    "System.Title": "My title",
  }
}

Pipeline

List

GET https://dev.azure.com/{organization}/{project}/_apis/pipelines?api-version=6.0-preview.1
Json.svg
{
  "count": 1,
  "value": [
    {
      "id": 111,
      "revision": 1,
      "name": "MyPipeline",
      "folder": "\\MyFolder"
    }

Runs - List

GET https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs?api-version=6.0-preview.1
Json.svg
{
  "count": 1,
  "value": [
    {
      "pipeline": {
        "id": 111,
        "name": "MyPipeline"
      },
      "state": "completed",
      "result": "failed",
      "createdDate": "2021-01-27T08:26:17.5864636Z",
      "finishedDate": "2021-01-27T09:07:43.4227015Z",
      "id": 222,
      "name": "20210127.3"
    }

Team

List

GET https://dev.azure.com/{organization}/_apis/projects/{project}/teams?api-version=6.0
Json.svg
{
  "count": 1,
  "value": [
    {
      "id": "12345678-1234-1234-1234-123456789012",
      "name": "My Team",
      "description": "Team description",
      "projectName": "My Project",
      "projectId": "12345678-1234-1234-1234-123456789012"
    }

Iteration / Sprint

List

GET https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations?api-version=6.0
Json.svg
{
  "count": 1,
  "value": [
    {
      "id": "12345678-1234-1234-1234-123456789012",
      "name": "Sprint 111",
      "attributes": {
        "startDate": "2021-04-01T00:00:00Z",
        "finishDate": "2021-04-12T00:00:00Z",
        "timeFrame": "current" /* past, future */
      }
    }

Get Iteration Work Items

GET https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/workitems?api-version=6.0-preview.1
Json.svg
{
  "workItemRelations": [
    {
      "rel": null,
      "source": null,
      "target": {
        "id": 111,
        "url": "https://dev.azure.com/msc-dev/_apis/wit/workItems/111"
      }
    }