Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Updated Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcDufresne committed Nov 17, 2015
1 parent 874d962 commit 934efe6
Show file tree
Hide file tree
Showing 9 changed files with 546 additions and 41 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# enlightns-docs
The documentation for all enlightns projects

EnlightNS API documentation.

Create an account on [EnlightNS](http://enlightns.com)
Binary file modified build/doctrees/environment.pickle
Binary file not shown.
Binary file modified build/doctrees/index.doctree
Binary file not shown.
201 changes: 191 additions & 10 deletions build/html/_sources/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,201 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to EnlightNS's documentation!
=====================================
Welcome to EnlightNS's API Documentation!
=========================================

Contents:
This page outlines the EnlightNS APIs and their usage.

.. toctree::
:maxdepth: 2
The API is hosted at ``https://api.enlightns.com``

POST /api-token-auth
^^^^^^^^^^^^^^^^^^^^
Returns the API token for subsequent calls

**Request Headers**

Indices and tables
==================
::

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Content-Type: application/json

..

**Request Body**

::

{
"email": "your.email@enlightns.com",
"password": "<password>"
}

..

**Response**

::

{
"token": "<your_auth_token>"
}

..


GET /user/record/
^^^^^^^^^^^^^^^^^
Lists a user's records

**Request Headers**

::

Authorization: <your_auth_token>

..

**GET Parameters**

- ``type`` (*optionnal*), used to filter record type
- ``A``
- ``A,AAAA``
- ``CNAME``


**Response**
::

Content-Type: application/json

..


::

[
{
"id": 402,
"name": "domain1.enlightns.info",
"type": "A",
"content": "54.238.66.12",
"ttl": 3600,
"auth": null,
"active": true,
"is_free": true,
"owner": "your_user"
},
{
"id": 418,
"name": "domain2.enlightns.info",
"type": "CNAME",
"content": "domain2.enlightns.info",
"ttl": 60,
"auth": null,
"active": true,
"is_free": true,
"owner": "your_user"
}
]

..

GET /user/record/<record_id>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Gets the details for one record

**Request Headers**

::

Authorization: <your_auth_token>

..

**Request Parameters**

- ``record_id``: ID of the record to retrieve

**Response**

::

{
"id": 26,
"name": "ns2.enlightns.org",
"type": "A",
"content": "192.99.43.21",
"ttl": 86400,
"auth": null,
"active": true,
"is_free": false,
"owner": "d2s3admin"
}

..


PUT /user/record/<record_id>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Updates the content of a record

**Request Headers**

::

Authorization: <your_auth_token>
Content-Type: application/json

..

**Request Parameters**

- ``record_id``: ID of the record to update

**Request Body**

::


{
"content": "<new_record_content>"
}

..

**Response**

::

{
"id": 402,
"name": "domain1.enlightns.info",
"type": "A",
"content": "<new_record_content>",
"ttl": 3600,
"auth": null,
"active": true,
"is_free": true,
"owner": "your_user"
}

..

GET /tools/whatismyip/
^^^^^^^^^^^^^^^^^^^^^^
Returns your public IP

**Response**

::

Content-Type: application/json

..

::

{
"ip": "184.55.30.206"
}

..
5 changes: 2 additions & 3 deletions build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@



<ul class="simple">
</ul>

<!-- Local TOC -->
<div class="local-toc"></div>


</div>
Expand Down

0 comments on commit 934efe6

Please sign in to comment.