Difference between revisions of "Quality Infrastructure API"

From wiki.gpii
Jump to: navigation, search
(First draft)
 
m
 
Line 5: Line 5:
 
=== Endpoints ===
 
=== Endpoints ===
  
This section describes available endpoints and provides information about the type of results they provide.
+
This section describes available endpoints and provides information about the types of results they provide.
  
 
==== Commits Endpoint Structure ====
 
==== Commits Endpoint Structure ====
Line 12: Line 12:
  
 
Method: GET
 
Method: GET
# 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.  
+
# Returns a commit summary for a GitHub repository showing the most active committer, their number of commits, and a total number of commits for the project.
 +
# A list of events detailing dates and total associated commits is also provided.  
  
 
* Example: https://qi-backend.gpii.net/a/asterics/keyboardx/commits
 
* Example: https://qi-backend.gpii.net/a/asterics/keyboardx/commits
Line 53: Line 54:
  
 
Method: GET
 
Method: GET
# Returns the total number of contributors to a repository along with a list of dates and how many people contributed on that particular day.
+
# Returns the total number of contributors for a repository.
 +
# Also returned is a list of dates and how many people contributed on that particular day.
  
 
* Example: https://qi-backend.gpii.net/a/asterics/keyboardx/contributors
 
* Example: https://qi-backend.gpii.net/a/asterics/keyboardx/contributors

Latest revision as of 23:29, 22 July 2016

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 types 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 a total number of commits for the project.
  2. A list of events detailing dates and total associated commits 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 for a repository.
  2. Also returned is 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
    }
  ]
}