Charts on a Kanban board

Last Update: 12/5/2016

api-version = 2.0-preview.1

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

Get charts on a board

GET https://{instance}/DefaultCollection/{project}/{team}/_apis/work/boards/{board}/charts?api-version={api-version}
Parameter Type Default Value Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
project string Name or ID of a team project.
team string Project's default team Id Name or ID of a team within the project.
board string Name or ID of the specific board.
Query
api-version string Version of the API to use.

Sample request

GET http://fabrikam.visualstudio.com/DefaultCollection/fabrikam/fabrikam%20team/_apis/work/boards/Stories/charts?api-version=2.0-preview.1

Sample response

Status code: 200
{
  "count": 1,
  "value": [
    {
      "name": "cumulativeFlow",
      "url": "http://fabrikam.visualstudio.com/DefaultCollection/bfeaf5d7-8bf6-4bc8-96c0-47a1727c7815/00f7c2e3-e13b-4e7d-8ecb-bb599e7a0764/_apis/work/boards/Stories/charts/cumulativeFlow"
    }
  ]
}

Get a chart by name

GET https://{instance}/DefaultCollection/{project}/{team}/_apis/work/boards/{board}/charts/{chart}?api-version={api-version}
Parameter Type Default Value Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
project string Name or ID of a team project.
team string Project's default team Id Name or ID of a team within the project.
board string Name or ID of the specific board.
chart enum (CumulativeFlow) Name of the specific chart.
Query
api-version string Version of the API to use.

Sample request

GET http://fabrikam.visualstudio.com/DefaultCollection/fabrikam/fabrikam%20team/_apis/work/boards/Stories/charts/cumulativeFlow?api-version=2.0-preview.1

Sample response

Status code: 200
{
  "name": "cumulativeFlow",
  "url": "http://fabrikam.visualstudio.com/DefaultCollection/bfeaf5d7-8bf6-4bc8-96c0-47a1727c7815/00f7c2e3-e13b-4e7d-8ecb-bb599e7a0764/_apis/work/boards/Stories/charts/cumulativeFlow",
  "settings": {
    "startDate": null,
    "hideIncomingColumn": false
  },
  "_links": {
    "self": {
      "href": "http://fabrikam.visualstudio.com/DefaultCollection/bfeaf5d7-8bf6-4bc8-96c0-47a1727c7815/00f7c2e3-e13b-4e7d-8ecb-bb599e7a0764/_apis/work/boards/Stories/charts/cumulativeFlow"
    },
    "board": {
      "href": "http://fabrikam.visualstudio.com/DefaultCollection/bfeaf5d7-8bf6-4bc8-96c0-47a1727c7815/00f7c2e3-e13b-4e7d-8ecb-bb599e7a0764/_apis/work/boards/Stories"
    }
  }
}

Update a cumulative flow chart

PATCH https://{instance}/DefaultCollection/{project}/{team}/_apis/work/boards/{board}/charts/CumulativeFlow?api-version={api-version}
Content-Type: application/json
{
  "settings": {
    "startDate": {startDate},
    "hideIncomingColumn": {hideIncomingColumn},
    "hideOutgoingColumn": {hideOutgoingColumn}
  }
}
Parameter Type Default Value Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
project string Name or ID of a team project.
team string Project's default team Id Name or ID of a team within the project.
board string Name or ID of the specific board.
chart enum (CumulativeFlow) Name of the specific chart.
Query
api-version string Version of the API to use.
Body
startDate date null The start date of the CFD chart. The date will be stored as UTC, it is the consumers' responsibility to convert their date to UTC.
hideIncomingColumn bool false Indicate if the CFD chart should hide the incoming column.
hideOutgoingColumn bool false Indicate if the CFD chart should hide the outgoing column.

Sample request

PATCH http://fabrikam.visualstudio.com/DefaultCollection/fabrikam/fabrikam%20team/_apis/work/boards/Stories/charts/cumulativeFlow?api-version=2.0-preview.1
Content-Type: application/json
{
  "settings": {
    "startDate": "2015-09-01T12:07:11Z",
    "hideIncomingColumn": true,
    "hideOutgoingColumn": true
  }
}

Sample response

Status code: 200
{
  "name": "cumulativeFlow",
  "url": "http://fabrikam.visualstudio.com/DefaultCollection/bfeaf5d7-8bf6-4bc8-96c0-47a1727c7815/00f7c2e3-e13b-4e7d-8ecb-bb599e7a0764/_apis/work/boards/Stories/charts/cumulativeFlow",
  "settings": {
    "startDate": "2015-09-01T12:07:11Z",
    "hideIncomingColumn": true,
    "hideOutgoingColumn": true
  },
  "_links": {
    "self": {
      "href": "http://fabrikam.visualstudio.com/DefaultCollection/bfeaf5d7-8bf6-4bc8-96c0-47a1727c7815/00f7c2e3-e13b-4e7d-8ecb-bb599e7a0764/_apis/work/boards/Stories/charts/cumulativeFlow"
    },
    "board": {
      "href": "http://fabrikam.visualstudio.com/DefaultCollection/bfeaf5d7-8bf6-4bc8-96c0-47a1727c7815/00f7c2e3-e13b-4e7d-8ecb-bb599e7a0764/_apis/work/boards/Stories"
    }
  }
}

Q&A

Q: Why do I only get the cumulative flow chart back?

A: The cumulative flow chart is the only chart supported at this point.