Quality Infrastructure API

From wiki.gpii
Revision as of 23:16, 22 July 2016 by Avtar (talk | contribs) (First draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

A Quality Infrastructure backend service is deployed at https://qi-backend.gpii.net/ and provides a REST API. The QI Dashboard prototype utilizes this service and the API described on this page.

Endpoints

This section describes available endpoints and provides information about the type of results they provide.

Commits Endpoint Structure

/a/:account-name/:github-repo-name/commits

Method: GET

  1. Returns a commit summary for a GitHub repository showing the most active committer, their number of commits, and then total number of commits for the project. A list of events detailing the number of commits and their dates is also provided.
{
  "summary": {
    "timeOfLastCommit": "2015-06-27",
    "mostFrequentCommitter": "s3huber",
    "mostFrequentCommitterTotalCommits": 9,
    "totalCommits": 9
  },
  "events": [
    {
      "timestamp": "2015-04-05",
      "value": 2
    },
    {
      "timestamp": "2015-03-29",
      "value": 2
    },
    {
      "timestamp": "2015-03-01",
      "value": 2
    },
    {
      "timestamp": "2015-02-22",
      "value": 2
    },
    {
      "timestamp": "2015-02-01",
      "value": 1
    }
  ]
}

Contributors Endpoint Structure

/a/:account-name/:github-repo-name/contributors

Method: GET

  1. Returns the total number of contributors to a repository along with a list of dates and how many people contributed on that particular day.
{
  "summary": {
    "numberOfContributors": 1
  },
  "events": [
    {
      "timestamp": "2015-04-05",
      "value": 1
    },
    {
      "timestamp": "2015-03-29",
      "value": 1
    },
    {
      "timestamp": "2015-03-01",
      "value": 1
    },
    {
      "timestamp": "2015-02-22",
      "value": 1
    },
    {
      "timestamp": "2015-02-01",
      "value": 1
    }
  ]
}