Analytics Service overview

Last Update: 3/6/2017

Team Services

NOTE

Feature availability: The Analytics Service is in private preview and only available to select customers of Visual Studio Team Services at this time.

The Analytics service provides a concise OData model over the Team Services suite—Work Item Tracking, Test, Version Control, Release and Build. You can use it to answer quantitative questions regarding past or present state and velocity of your projects. It is built upon a near real-time reporting warehouse hosted in the cloud and optimized for fast read-access and support of server-based aggregations.

You can learn more from one of these topics:

Available data

For more information about the following entities, see data model.

  • Areas
  • Dates
  • Iterations (including start/end dates)
  • Kanban data
  • Links:
    • Parent/child link relationships New!
    • Related links New!
  • Work Item Snapshots for trend reporting
  • Work Item Board (Kanban) Snapshots for trend reporting
  • Tags New!
  • Team projects
  • Teams (including owned areas/iterations)
  • User information for work item fields (Assigned To, Created By, etc.) New!
  • Work items
  • Work item revisions
  • Custom fields New!

Supported entites and metadata

This information can also be found by going to the service root url endpoint. The endpoint is:

AccountName.analytics.visualstudio.com/DefaultCollection/_odata

So, for the FabrikamFiber account:

fabrikamfiber.analytics.visualstudio.com/DefaultCollection/_odata   
Note: The OData analytics service URL is case sensitive.

Accessing this URL returns a metadata document similar to the following:

{
    "@odata.context":"https://fabrikamfiber.analytics.visualstudio.com/DefaultCollection/_odata/$metadata","value":[
    {
        "name":"WorkItems","kind":"EntitySet","url":"WorkItems"
    },{
        "name":"WorkItemRevisions","kind":"EntitySet","url":"WorkItemRevisions"
    },{
        "name":"WorkItemSnapshot","kind":"EntitySet","url":"WorkItemSnapshot"
    },{
        "name":"WorkItemBoardSnapshot","kind":"EntitySet","url":"WorkItemBoardSnapshot"
    },{
        "name":"WorkItemLeadTimes","kind":"EntitySet","url":"WorkItemLeadTimes"
    },{
        "name":"Dates","kind":"EntitySet","url":"Dates"
    },{
        "name":"Projects","kind":"EntitySet","url":"Projects"
    },{
        "name":"Iterations","kind":"EntitySet","url":"Iterations"
    },{
        "name":"Areas","kind":"EntitySet","url":"Areas"
    },{
      "name":"Tags","kind":"EntitySet","url":"Tags"
    },{
      "name":"Teams","kind":"EntitySet","url":"Teams"
    },{
      "name":"BoardLocations","kind":"EntitySet","url":"BoardLocations"
    },{
      "name":"WorkItemLinks","kind":"EntitySet","url":"WorkItemLinks"
    },{
      "name":"Users","kind":"EntitySet","url":"Users"
    }
  ]
}


To access detailed metadata, add $metadata to the end of the URL:

https://fabrikamfiber.analytics.visualstudio.com/DefaultCollection/_odata/$metadata


This returns a fully qualified XML document which describes all entities, fields, and relationships.

OData

OData supports access to the Analytics service through an OData v4 interface with aggregation extensions.

Currently, updates are pulled from the operational store every 15 minutes. Our goal is to reduce this to 30 seconds using a push model; we aren't there yet.

For details and examples on using OData with the Analytics Service, see WIT analytics.

Supported OData functions

The following table summarizes the supported and unsupported OData functions.

Note: OData aggregation extensions are relatively new and either not supported by various client tools (yet) or full support for the extension is not supported by the Analytics Service.
Implemented Currently not implemented
- $count (not in aggregation extensions)
- $apply (partially)
- $aggregate
- groupby
- filter
- average
- countdistinct
- max
- min
- sum
- $filter
- $expand
Canonical functions:
- contains
- endswith
- startswith
- length
- indexof
- substring
- tolower
- toupper
- trim
- concat
- year
- month
- day
- hour
- minute
- second
- fractionalseconds
- date
- time
- totaloffsetminutes
- maxdatetime
- mindatetime
- totalseconds
- round
- floor
- ceiling
- isof
- cast
- concat
- $search
- $rollup
- isdefined
- $crossjoin
- now
- topcount
- topsum
- toppercent
- bottomcount
- bottomsum
- bottompercent

You use OData functions in a filter clause, but not in a $select clause the way that you would use them in a SQL statement. For example, you can specify:

/WorkItems?$filter=toupper(Title) eq 'HELP' 

However, you can't enter the following:

/WorkItems?$select=WorkItemId,State,toupper(Title)
Note: Currently, the Analytics service is on a 15 minute refresh schedule.