201 lines
4.5 KiB
TeX
201 lines
4.5 KiB
TeX
\section{System API}
|
|
This section documents api calls that are associated with the system environment.
|
|
|
|
\subsection{Get SMTP Configuration}
|
|
The following will get the current smtp configuration
|
|
|
|
\begin{apimethod}
|
|
{Get SMTP Configuration}
|
|
{system/getSmtpConfig.do}
|
|
{GET}
|
|
{YES}
|
|
\begin{itemize}
|
|
\item None
|
|
\end{itemize}
|
|
\end{apimethod}
|
|
|
|
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getSmtpConfigResp}}
|
|
|
|
\subsection{Update SMTP Configuration}
|
|
The following will set the smtp configuration. The return value will be the same values that were set.
|
|
|
|
Below is the list of the smtp names that can be used:
|
|
\begin{itemize}
|
|
\label{list:smtp-keys}
|
|
\item smtp.enabled
|
|
\item mail.transport.protocol
|
|
\item mail.smtp.port
|
|
\item mail.smtp.host
|
|
\item mail.smtp.auth
|
|
\item mail.smtp.starttls.enable
|
|
\item mail.smtp.starttls.required
|
|
\item mail.smtp.ssl.trust
|
|
\item smtp.from.user
|
|
\item smtp.username
|
|
\item smtp.password
|
|
\item mail.debug
|
|
\end{itemize}
|
|
|
|
\begin{apimethod}
|
|
{Update SMTP Configuration}
|
|
{system/updateSmtpConfig.do}
|
|
{POST}
|
|
{YES}
|
|
\begin{itemize}
|
|
\item \Required{name}{Name of the smtp configuration key}
|
|
\end{itemize}
|
|
\end{apimethod}
|
|
|
|
\ApiData{\input{api/sample/response/getSmtpConfigResp}}{\input{api/sample/response/getSmtpConfigResp}}
|
|
|
|
\subsection{Get All Environment Variables}
|
|
|
|
The following will get all global environment variables on the system.
|
|
|
|
\begin{apimethod}
|
|
{Get All Environment Variables}
|
|
{system/getAll.do}
|
|
{GET}
|
|
{YES}
|
|
\begin{itemize}
|
|
\item None
|
|
\end{itemize}
|
|
\end{apimethod}
|
|
|
|
\ApiData{\input{api/sample/None}}{\input{api/sample/response/deleteEnvVarsResp}}
|
|
|
|
\subsection{Add Environment Variables}
|
|
|
|
The following will add global environment variables to the system.
|
|
|
|
Both the request and response values are in json arrays.
|
|
|
|
\begin{apimethod}
|
|
{Add Environment Variables}
|
|
{system/addEnvVars.do}
|
|
{POST}
|
|
{YES}
|
|
\begin{itemize}
|
|
\item \Required{name}{Unique name of the environment variable}
|
|
\item \Required{value}{Value of the environment variable}
|
|
\item \Required{isNew}{\command{true} if its a new environment variable or
|
|
\command{false} if updating an existing variable}
|
|
\end{itemize}
|
|
\end{apimethod}
|
|
|
|
\ApiData{\input{api/sample/request/addEnvVarsReq}}{\input{api/sample/response/addEnvVarsResp}}
|
|
|
|
\subsection{Delete Environment Variables}
|
|
|
|
The following will delete global environment variables from the system.
|
|
|
|
Both the request and response values are in json arrays.
|
|
|
|
\begin{apimethod}
|
|
{Delete Environment Variables}
|
|
{system/deleteEnvVars.do}
|
|
{POST}
|
|
{YES}
|
|
\begin{itemize}
|
|
\item \Required{id}{id of the environment variable to remove}
|
|
\end{itemize}
|
|
\end{apimethod}
|
|
|
|
\ApiData{\input{api/sample/request/deleteEnvVarsReq}}{\input{api/sample/response/deleteEnvVarsResp}}
|
|
|
|
\subsection{Get Email Templates}
|
|
|
|
The following will get all the email templates on the system.
|
|
|
|
\begin{apimethod}
|
|
{Get Email Templates}
|
|
{system/getEmailTemplates.do}
|
|
{GET}
|
|
{YES}
|
|
\begin{itemize}
|
|
\item None
|
|
\end{itemize}
|
|
\end{apimethod}
|
|
|
|
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getEmailTemplateResp}}
|
|
|
|
\subsection{Add Email Template}
|
|
|
|
The following will add an email template to the system.
|
|
|
|
\begin{apimethod}
|
|
{Add Email Template}
|
|
{system/addEmailTemplate.do}
|
|
{POST}
|
|
{YES}
|
|
\begin{itemize}
|
|
\item \Required{emailName}{Unique name of the email template}
|
|
\item \Required{emailSubject}{Subject of the email.}
|
|
\item \Required{emailMessage}{Message to be sent to the recipients}
|
|
\end{itemize}
|
|
\end{apimethod}
|
|
|
|
\ApiData{\input{api/sample/request/addEmailTemplateReq}}{\input{api/sample/response/addEmailTemplateResp}}
|
|
|
|
\subsection{Delete Email Template}
|
|
|
|
The following will delete an email template from the system.
|
|
|
|
\begin{apimethod}
|
|
{Delete Email Template}
|
|
{system/deleteEmailTemplate.do}
|
|
{POST}
|
|
{YES}
|
|
\begin{itemize}
|
|
\item \Required{id}{Id of the template to delete}
|
|
\end{itemize}
|
|
\end{apimethod}
|
|
|
|
\ApiData{\input{api/sample/request/deleteEmailTemplateReq}}{\input{api/sample/response/addEmailTemplateResp}}
|
|
|
|
\subsection{Update Seed}
|
|
The following will update the aes seed
|
|
|
|
\begin{apimethod}
|
|
{Update Seed}
|
|
{system/updateSeed.do}
|
|
{POST}
|
|
{YES}
|
|
\begin{itemize}
|
|
\item \Required{seed}{New seed value}
|
|
\end{itemize}
|
|
\end{apimethod}
|
|
|
|
\ApiData{\input{api/sample/request/updateSeedReq}}{\input{api/sample/SuccessResp}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|