AEON open API allows you to implement your resources management in your own way. This is a key point of AEON, your applications could have flexibility enough, not only to send/receive data, but also to configure your environment in a very dynamic way. For example, a chat application could manage rooms creating and deleting entities and channels regarding the needs.
If you are a developer, this should be your section. Here you will find a detailed description of the REST API for resources managment and pub/sub functionality.
Documentation for user’s management. Most of the AEON’s functionalities requires registered users. This registered users will make use of the AEON’s functionality to create entities and channels.
Documentation for entity’s management. AEON entities are the basic resource to organize your different communication channels. An entity could mean whatever you want, a truck, a box of fish, a chat application, a chat room, your personal mobile, whatever.. By the moment, entities contains just a little description.
Only users can create new entities, and these entities will contain the different channels.
AEON channels are the most valuable resource, actually, you are here because you want communication channels. A channel is a communication resource allowing publication an subscription mechanisms.
Channels need to be organized into an existing entity and contains: - A little description - The pub/sub urls - A list of allowed subscribers
Operations to work with channels are:
Logging process with an existing user and password (POST /users/) . If the process results “ok” you will receive a cookie with your session. This cookie will be used in most of the operations.
Logout process. The user set in the cookie will be unset from it. The cookie won’t be deleted from the server.
Get list of registered users. Just basic information. Preconditions:
Create/Register a new user into the system. By the moment, it only includes information about user and password.
Retrieves the information related to the user identified in the cookie.
Get complete information of an specific user. Preconditions:
In order to get extra information of an existing user you need to be logged
You need to be logged as (user_id): (Login)
Delete an specific user. When a user is deleted, all the entities and the information assigned will be deleted too. Preconditions:
In order to delete an existing user you need to be logged
You need to be logged as (user_id): (Login)
This function is in charge of helping to remember a forgotten or missed password. Mainly, an existing user id will be requested (users are registered with emails). Thus, the user will receive an email with extra information in his email address. The extra information contains a temporal code used to reset the password with (Reset the user’s password). Generate a temporal code to change the user’s password. (user_id) is the email of an existing user. Through this email he will receive the necessary information to (Reset the user’s password).
This function is in charge of resetting a forgotten or missed password. The user needs to provide an existing user id (users are registered with emails), the new password and a temporal code generated by (Remember the user’s password). Changes user’s password of (user_id) using the retrieved (code) by (Remember the user’s password).
Get list of entities owned by the logged user. Preconditions:
Create a new entity into the system. By the moment, entities only contains information about description and a list of channels. Some preconditions:
The entity will be created and owned by the logged user.
Get complete information of an specific entity. Preconditions:
In order to get extra information of an existing entity you need to be logged
You need to be logged (Login) as the owner of (entity_id):
Update the name or the description of an entity. Preconditions:
In order to delete an existing user you need to be logged
You need to be logged as the owner of the entity: (Login)
Delete an specific entity. When an entity is deleted, the channels that belongs to it will be deleted too. Preconditions:
In order to delete an existing entity you need to be logged
You need to be logged as the owner of the entity: (Login)
Get the list of channels of an specific entity. Preconditions:
You need to be logged: (Login)
You need to be logged as the owner of the (entity_id)
Create a new channel into the specific entity. Channels contains information about description and the pub/sub mechanisms. Some preconditions: - You need to be logged: (Login) - You need to be logged as the owner of the (entity_id) where your are requesting a new channel
The channel will be attached to the entity, together with Pub_Url and a (Sub_Url).
Get complete information of an specific channel. Preconditions:
You need to be logged: (Login)
You need to be logged as the owner of the (entity_id)
(channel_id) has to be attached to the list of channels of (entity_id)
Updates the information of an specific channel. Preconditions:
You need to be logged: (Login)
You need to be logged as the owner of the (entity_id)
(channel_id) has to be attached to the list of channels of (entity_id)
Delete an specific channel. Preconditions:
You need to be logged: (Login)
You need to be logged as the owner of the (entity_id)
(channel_id) has to be attached to the list of channels of (entity_id)
Headers
Content-Type: application/json
Body
{
"username": "john",
"password": "john",
"type": "user"
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok"
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok"
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok"
"result":
[
{
"username": "john",
"type": "user",
"_id": "john"
},
{
"username": "jammes",
"type": "user",
"_id": "jammes"
}
]
}
Headers
Content-Type: application/json
Body
{
"username": "john",
"password": "john",
"type": "user",
"_id": "john"
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok"
"result":
[
{
"username": "john",
"password": "john",
"type": "user",
"_id": "john"
}
]
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok",
"result": [
{
"_id": "userID",
"type": "user",
"username": "username"
}
]
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok",
"result": [
{
"_id": "userID",
"type": "user",
"username": "username"
}
]
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok",
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok",
"result": [
]
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok",
"result":
[
"You will receive an email with information for reset."
]
}
Headers
Content-Type: application/json
Body
{
"password": "newPassword",
"type": "user"
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok",
"result": [
]
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok"
"result":
[
{
"_id": "entityid",
"channels": [ … ],
"entitydescription": "entitydescription",
"entityname": "entityname",
"owner": "userid",
"type": "entity"
},
...
]
}
Headers
Content-Type: application/json
Body
{
"entityname": "entityname",
"entitydescription": "entitydescription",
"type": "entity",
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok"
"result":
[
{
"entityname": "entityname",
"entitydescription": "entitydescription",
"type": "entity",
"owner": "userid",
"channels": ["channelname"]
}
]
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok"
"result":
[
{
"_id": "entityid",
"channels": [ … ],
"entitydescription": "entitydescription",
"entityname": "entityname",
"owner": "userid",
"type": "entity"
},
]
}
Headers
Content-Type: application/json
Body
{
"entityname": "entityname modified",
"entitydescription": "entity description modified",
"type": "entity"
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok",
"result": [
]
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok",
"result": [
]
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok"
"result":
[
{
"_id": "51e7be461fb1a1f179000002",
"channelName": "channelname",
"channeldesc": "channeldesc",
"pubID": "4ca05d1f-ff02-481d-a1db-9d69c6bfff73",
"subID": "d203158e-bac8-49ee-b2d3-1fd82729fa09"
},
...
]
}
Headers
Content-Type: application/json
Body
{
"channelName": "channelname",
"channeldesc": "channeldesc",
"type": "channel"
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok"
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok"
"result":
[
{
"_id": "51e7be461fb1a1f179000002",
"channelName": "channelname",
"channeldesc": "channeldesc",
"pubID": "4ca05d1f-ff02-481d-a1db-9d69c6bfff73",
"subID": "d203158e-bac8-49ee-b2d3-1fd82729fa09",
"puburl": "http://130.206.81.70:3000/publish/4ca05d1f-ff02-481d-a1db-9d69c6bfff73",
"subscriptionsurl": "http://130.206.81.70:3000/subscribe/d203158e-bac8-49ee-b2d3-1fd82729fa09",
"subscriptions":
[
{
_id: "53bfe41faf5e6e0200000016",
desc: "demo-sub",
id: "demo-sub",
ip: "http://130.206.81.70:3000",
subkey: "Delivery Item 1-10925842-queu"
},
...
]
}
]
}
Headers
Content-Type: application/json
Body
{
"channelName": "new channelname",
"channeldesc": "new channeldesc",
"type": "channel"
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok",
"result": [
]
}
Headers
Content-Type: application/json
Body
{
"code": 200,
"desc": "ok",
"result": [
]
}