Skip to content
Md-Rakib-Hossain-(Misu) edited this page Feb 17, 2022 · 4 revisions

Endpoints

ADA provides many endpoints to consume as Restful web services. It is worth noting that most of the endpoints are POST mappings. The reason behind this is that POST request are not cached by the browser, as compared to the GET requests. If this was not a case, the caching could result in unnecessary calls being made by the browsers.

Repository Analyser

api/v1/analyser - POST

A top level endpoint which will analyse the entire repository branch which is provided, at the current time point.

produces = "application/json" parameters:

  • url: String - github repository url
  • branch: String - branch of the repository to be analysed

Owners

api/v1/owners - POST

Endpoint for retrieving all owners in the database

produces = "application/json"

api/v1/owners/{owner} - POST

Endpoint for getting an owner corresponding to the provided username

produces = "application/json" variables:

  • owner: String - username of the owner

api/v1/owners/names - POST

Endpoint for getting all usernames of all owners of git repositories in the database

produces = "application/json"

api/v1/owners - DELETE

Endpoint for deleting all owners in the database

api/v1/owners/{id} - DELETE

Endpoint for deleting all owners in the database

variables:

  • id: String - id of the owner in the database

Repository

api/v1/repositories - POST

Endpoint for listing all GitRepository entities in the DB.

produces = "application/json"

api/v1/repositories/names - POST

Endpoint for listing the names of all GitRepositories stored in the DB.

produces = "application/json"

api/v1/owners/{owner}/repositories - POST

Endpoint for getting all repositories owned by a given owner

produces = "application/json" variables:

  • owner: String - username of the owner

api/v1/owners/{owner}/repositories/{repository} - POST

Endpoint for getting a Git repository given its name and the username of its owner

produces = "application/json" variables:

  • owner: String - username of the owner
  • repository: String - name of the git repository

Branch

api/v1/owners/{owner}/repositories/{repository}/branches - POST

Endpoint for getting all branches given a Git repository and its owner

produces = "application/json" variables:

  • owner: String - username of the owner
  • repository: String - name of the git repository

api/v1/owners/{owner}/repositories/{repository}/branches/{branch} - POST

Endpoint for getting a branch entity given a Git repository, its owner and the name of the branch

produces = "application/json" variables:

  • owner: String - username of the owner
  • repository: String - name of the git repository
  • branch: String - name of the branch

Snapshot

api/v1/owners/{owner}/repositories/{repository}/branches/{branch}/snapshots - POST

Endpoint for getting all snapshots given the name of a Git repository, the username of its owner and name of the branch

produces = "application/json" variables:

  • owner: String - username of the owner
  • repository: String - name of the git repository
  • branch: String - name of the branch

api/v1/owners/{owner}/repositories/{repository}/branches/{branch}/snapshots/{timestamp} - POST

Endpoint for getting a snapshot give the name of a Git repository, the username of its owner, name of branch and timestamp of request

produces = "application/json" variables:

  • owner: String - username of the owner
  • repository: String - name of the git repository
  • branch: String - name of the branch
  • timestamp: String - time when ADA received request for the snapshot

Project Structure

api/v1/owners/{owner}/repositories/{repository}/branches/{branch}/snapshots/{timestamp}/project-structure - POST

get ProjectStructure object given username, repository name, branch name and timestamp when ADA received request for the snapshot

produces = "application/json" variables:

  • owner: String - username of the owner
  • repository: String - name of the git repository
  • branch: String - name of the branch
  • timestamp: String - time when ADA received request for the snapshot