Skip to content

API Design

Owen Buckley edited this page Nov 17, 2018 · 3 revisions

Overview

To support the Contributary UI and fetching topology / GitHub information, some backend APIs will be developed to support the frontend.

For more information on the backend architecture, check out the Technical Architecture docs.

Topology API

A simple GET request to return the available topologies and hierarchies.

(see the Topology docs for more info on the structure of the data)

/topology

curl http://www.contributary.community/api/topology
{"isBase64Encoded":false,"statusCode":200,"headers":{},"body":{"language":{"c":{"label":"C","projects":[{"name":"Git","type":"org","repositories":["*"]},{"name":"Torvalds","type":"user","repositories":[{"name":"linux"}]}]},"go":{"label":"Go","projects":[{"name":"Docker","type":"org","repositories":["*"]}]},"java":{"label":"Java","projects":[{"name":"JenkinsCI","type":"org","repositories":["*"]},{"name":"KenzanLabs","type":"org","repositories":["*"]},{"name":"Netflix","type":"org","repositories":["*"]}]},"javascript":{"label":"JavaScript","projects":[{"name":"Babel","type":"org","repositories":["*"]},{"name":"ContributaryCommunity","type":"org","repositories":["*"]},{"name":"DevelopIt","type":"user","repositories":["*"]},{"name":"Facebook","type":"org","repositories":["*"]},{"name":"jamiebuilds","type":"user","repositories":["*"]},{"name":"Microsoft","type":"org","repositories":["*"]},{"name":"NodeJS","type":"org","repositories":["*"]},{"name":"npm","type":"org","repositories":["*"]},{"name":"PayPal","type":"org","repositories":["*"]},{"name":"Polymer","type":"org","repositories":["*"]},{"name":"ProjectEvergreen","type":"org","repositories":["*"]},{"name":"ProvidenceGeeks","type":"org","repositories":["*"]},{"name":"TheGreenhouseIO","type":"org","repositories":["*"]},{"name":"thescientist13","type":"user","repositories":[{"name":"github-dashboard"}]},{"name":"VueJS","type":"org","repositories":["*"]},{"name":"webpack","type":"org","repositories":["*"]},{"name":"YarnPkg","type":"org","repositories":["*"]}]},"php":{"label":"PHP","projects":[{"name":"composer","type":"org","repositories":["*"]},{"name":"laravel","type":"org","repositories":["*"]}]}}}}

GitHub API

This is only a proxy to the GitHub API but right now supports searching by repositories and issues via GET.

/repositories

https://developer.github.com/v3/repos/#get

$ curl -v 'http://www.contributary.mmunity/api/github/issues?projectName=ContributaryCommunity&repoName=www.contributary.community'

/issues

https://developer.github.com/v3/issues/

curl -v 'http://www.contributary.community/api/github/issues?projectName=ContributaryCommunity&repoName=www.contributary.community'

Clone this wiki locally