\section{Git API} This section documents api calls that are associated with git repositories. \subsection{Get All Repositories} The following will get all the available git repositories \begin{apimethod} {Get All Repositories} {git/getAll.do} {GET} {YES} \begin{itemize} \item None \end{itemize} \end{apimethod} \ApiData{\input{api/sample/None}}{\input{api/sample/response/getAllReposResp}} \subsection{Add/Edit Git Repository} The following will add/edit a git repository \begin{apimethod} {Add/Edit Git Repository} {git/add.do} {POST} {YES} \begin{itemize} \item \Required{name}{Unique name of the repository} \item \Required{scm}{The git repository url to clone} \item \Required{branch}{The branch to checkout} \item \Required{directory}{Local directory to clone into (doesn't need to exist)} \item \Required{credentials}{The credentials to use. Requires the following:}\newline \begin{itemize} \item \Required{uid}{Unique identifer of the credentials to use.} \end{itemize} \end{itemize} \end{apimethod} \ApiData{\input{api/sample/request/addGitRepoReq}}{\input{api/sample/response/addGitRepoResp}} \subsection{Pull Repository} The following will issue a pull command to the desired repository \begin{apimethod} {Pull Repository} {git/pull.do} {POST} {YES} \begin{itemize} \item \Required{id}{Id of the repository to pull} \end{itemize} \end{apimethod} \ApiData{\input{api/sample/request/deleteGitRepoReq}}{\input{api/sample/response/addGitRepoResp}} \subsection{Delete Git Repository} The following will delete a git repository \begin{apimethod} {Delete Git Repository} {git/delete.do} {POST} {YES} \begin{itemize} \item \Required{id}{Id of the repository to delete} \end{itemize} \end{apimethod} \ApiData{\input{api/sample/request/deleteGitRepoReq}}{\input{api/sample/response/addGitRepoResp}}