From 1aca6fe08fadd40f878824f61361abef60251088 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Mon, 8 Aug 2016 07:28:10 -0400 Subject: [PATCH] some minor tweaks to the new users/aliases API documentation --- management/templates/aliases.html | 29 +++++++++---------- management/templates/custom-dns.html | 4 +-- management/templates/ssl.html | 6 ++-- management/templates/system-backup.html | 2 +- management/templates/users.html | 37 +++++++++++++------------ 5 files changed, 40 insertions(+), 38 deletions(-) diff --git a/management/templates/aliases.html b/management/templates/aliases.html index d5a123ff..bf8e63cd 100644 --- a/management/templates/aliases.html +++ b/management/templates/aliases.html @@ -106,37 +106,38 @@ -

Mail alias API

+

Mail aliases API (advanced)

-

Use your box’s Mail alias API to add/remove aliases.

+

Use your box’s mail aliases API to add and remove mail aliases from the command-line or custom services you build.

Usage:

-
curl -X VERB [-d "value"] --user {email}:{password} https://{{hostname}}/admin/mail/aliases[action]
+
curl -X VERB [-d "parameters"] --user {email}:{password} https://{{hostname}}/admin/mail/aliases[action]
-

(Brackets denote an optional argument.)

-

(Adding ?format=json will give json encoded results)

+

Brackets denote an optional argument. Please note that the POST body parameters must be URL-encoded.

-

Verbs

+

The email and password given to the --user option must be an administrative user on this system.

- +

Verbs

+ +
- - - + + +
Verb Action
GET Returns a list of existing mail aliases.
POST/add Adds a new mail alias. Required parameters are address and forward_to.
POST/remove Removes a mail alias. Required parameter is address.
GET(none) Returns a list of existing mail aliases. Adding ?format=json to the URL will give JSON-encoded results.
POST/add Adds a new mail alias. Required POST-body parameters are address and forward_to.
POST/remove Removes a mail alias. Required POST-body parameter is address.

Examples:

Try these examples. For simplicity the examples omit the --user me@mydomain.com:yourpassword command line argument which you must fill in with your email address and password.

-
# Gives a json encoded list of all mail users
-curl -X GET https://{{hostname}}/admin/mail/users?format=json
+
# Gives a JSON-encoded list of all mail aliases
+curl -X GET https://{{hostname}}/admin/mail/aliases?format=json
 
-# adds a new email alias
+# Adds a new alias
 curl -X POST -d "address=new_alias@mydomail.com" -d "forward_to=my_email@mydomain.com" https://{{hostname}}/admin/mail/aliases/add
 
-# removes a email alias
+# Removes an alias
 curl -X POST -d "address=new_alias@mydomail.com" https://{{hostname}}/admin/mail/aliases/remove
 
diff --git a/management/templates/custom-dns.html b/management/templates/custom-dns.html index bd5643c3..df3d82e5 100644 --- a/management/templates/custom-dns.html +++ b/management/templates/custom-dns.html @@ -10,7 +10,7 @@

It is possible to set custom DNS records on domains hosted here.

-

Set Custom DNS Records

+

Set custom DNS records

You can set additional DNS records, such as if you have a website running on another server, to add DKIM records for external mail providers, or for various confirmation-of-ownership tests.

@@ -66,7 +66,7 @@ -

Using a Secondary Nameserver

+

Using a secondary nameserver

If your TLD requires you to have two separate nameservers, you can either set up external DNS and ignore the DNS server on this box entirely, or use the DNS server on this box but add a secondary (aka “slave”) nameserver.

If you choose to use a seconday nameserver, you must find a seconday nameserver service provider. Your domain name registrar or virtual cloud provider may provide this service for you. Once you set up the seconday nameserver service, enter the hostname (not the IP address) of their secondary nameserver in the box below.

diff --git a/management/templates/ssl.html b/management/templates/ssl.html index d7e656c7..cefc82fd 100644 --- a/management/templates/ssl.html +++ b/management/templates/ssl.html @@ -8,7 +8,7 @@

You need a TLS certificate for this box’s hostname ({{hostname}}) and every other domain name and subdomain that this box is hosting a website for (see the list below).

-

Provision a Certificate

+

Provision a certificate

-

Certificate Status

+

Certificate status

Certificates expire after a period of time. All certificates will be automatically renewed through Let’s Encrypt 14 days prior to expiration.

@@ -53,7 +53,7 @@ -

Install Certificate

+

Install certificate

There are many other places where you can get a free or cheap certificate. If you don't want to use our automatic Let's Encrypt integration, you can give Namecheap’s $9 certificate, StartSSL’s free express lane, WoSign’s free TLS or any other certificate provider a try.

diff --git a/management/templates/system-backup.html b/management/templates/system-backup.html index dc925916..8fceafe6 100644 --- a/management/templates/system-backup.html +++ b/management/templates/system-backup.html @@ -74,7 +74,7 @@ -

Available Backups

+

Available backups

The backup location currently contains the backups listed below. The total size of the backups is currently .

diff --git a/management/templates/users.html b/management/templates/users.html index 793f0ff0..2cda327c 100644 --- a/management/templates/users.html +++ b/management/templates/users.html @@ -84,45 +84,46 @@ -

Mail user API

+

Mail user API (advanced)

-

Use your box’s Mail user API to add/change/remove users.

+

Use your box’s mail user API to add/change/remove users from the command-line or custom services you build.

Usage:

-
curl -X VERB [-d "value"] --user {email}:{password} https://{{hostname}}/admin/mail/users[action]
+
curl -X VERB [-d "parameters"] --user {email}:{password} https://{{hostname}}/admin/mail/users[action]
-

(Brackets denote an optional argument.)

-

(Adding ?format=json will give json encoded results)

+

Brackets denote an optional argument. Please note that the POST body parameters must be URL-encoded.

-

Verbs

+

The email and password given to the --user option must be an administrative user on this system.

- +

Verbs

+ +
- - - - - + + + + +
Verb Action
GET Returns a list of existing mail users.
POST/add Adds a new mail user. Required parameters are email and password.
POST/remove Removes a mail user. Required parameter is email.
POST/privileges/add Used to make a mail user an admin. Required parameters are email and privilege=admin.
POST/privileges/remove Used to remove the admin privilege from a mail user. Required parameter is email.
GET(none) Returns a list of existing mail users. Adding ?format=json to the URL will give JSON-encoded results.
POST/add Adds a new mail user. Required POST-body parameters are email and password.
POST/remove Removes a mail user. Required POST-by parameter is email.
POST/privileges/add Used to make a mail user an admin. Required POST-body parameters are email and privilege=admin.
POST/privileges/remove Used to remove the admin privilege from a mail user. Required POST-body parameter is email.

Examples:

-

Try these examples. For simplicity the examples omit the --user me@mydomain.com:yourpassword command line argument which you must fill in with your email address and password.

+

Try these examples. For simplicity the examples omit the --user me@mydomain.com:yourpassword command line argument which you must fill in with your administrative email address and password.

-
# Gives a json encoded list of all mail users
+
# Gives a JSON-encoded list of all mail users
 curl -X GET https://{{hostname}}/admin/mail/users?format=json
 
-# adds a new email user
+# Adds a new email user
 curl -X POST -d "email=new_user@mydomail.com" -d "password=s3curE_pa5Sw0rD" https://{{hostname}}/admin/mail/users/add
 
-# removes a email user
+# Removes a email user
 curl -X POST -d "email=new_user@mydomail.com" https://{{hostname}}/admin/mail/users/remove
 
-# adds admin privilege to an email user
+# Adds admin privilege to an email user
 curl -X POST -d "email=new_user@mydomail.com" -d "privilege=admin" https://{{hostname}}/admin/mail/users/privileges/add
 
-# removes admin privilege from an email user
+# Removes admin privilege from an email user
 curl -X POST -d "email=new_user@mydomail.com" https://{{hostname}}/admin/mail/users/privileges/remove