update api doc

This commit is contained in:
Mengyi Zhou 2016-11-11 15:10:39 +08:00
parent 697cc5ccac
commit a446a4e0e6
3 changed files with 17 additions and 6 deletions

View file

@ -44,7 +44,8 @@ public class CertificateResource {
private ResponseHandler responseHandler;
/**
* @api {post} /api/cert/upload: Upload certificate if and only if the domain does not have any history certificates
* @api {post} /api/cert/upload: Upload certificate
* @apiDescription Upload certificate if and only if the domain does not have any history certificates.
* @apiName UploadCertificate
* @apiGroup Certificate
* @apiParam {Long} domain domain name of the certificate. Use '|' to join multiple domain values as a whole.
@ -72,7 +73,8 @@ public class CertificateResource {
}
/**
* @api {post} /api/cert/upgrade: Upgrade certificate if history certificate exists of the domain
* @api {post} /api/cert/upgrade: Upgrade certificate
* @apiDescription Upgrade certificate if history certificate exists for the domain. An extra installation of virtual server is required for the new certificate to take effect.
* @apiName UpgradeCertificate
* @apiGroup Certificate
* @apiParam {Long} domain domain name of the certificate. Use '|' to join multiple domain values as a whole.
@ -102,7 +104,7 @@ public class CertificateResource {
}
/**
* @api {post} /api/cert/activate: Activate canary certificate
* @api {get} /api/cert/activate: Activate canary certificate
* @apiName ActivateCertificate
* @apiGroup Certificate
* @apiParam {Long} certId id of certificate to be activated
@ -119,7 +121,7 @@ public class CertificateResource {
}
/**
* @api {post} /api/cert/activate: Activate canary certificate
* @api {get} /api/cert/remoteInstall: Install certificate for virtual server
* @apiName ActivateCertificate
* @apiGroup Certificate
* @apiParam {Long} certId id of certificate to be installed
@ -159,6 +161,15 @@ public class CertificateResource {
return responseHandler.handle("Certificates uploaded. Re-activate the virtual server to take effect.", hh.getMediaType());
}
/**
* @api {get} /api/cert/default/remoteInstall: Install default certificate for slb
* @apiName RemoteInstallDefaultCertificate
* @apiGroup Certificate
* @apiParam {Long} slbId id of slb to (re-)install default certificate
* @apiParam {String} domain domain of slb's default server
* @apiParam {Boolean} force [optional] force to overwrite the certificate file if exists
* @apiSuccess {String} message success message
*/
@GET
@Path("/default/remoteInstall")
public Response remoteInstallDefault(@Context HttpServletRequest request,

View file

@ -378,7 +378,7 @@ public class GroupResource {
}
/**
* @api {get} /api/group/update: Update group content
* @api {post} /api/group/update: Update group content
* @apiName UpdateGroup
* @apiGroup Group
* @apiSuccess {Group} group json object

View file

@ -210,7 +210,7 @@ public class VirtualServerResource {
}
/**
* @api {get} /api/vs/update: Update vs content
* @api {post} /api/vs/update: Update vs content
* @apiName UpdateVs
* @apiGroup VirtualServer
* @apiSuccess {VirtualServer} vs json object