Data Aggregator API Reference Documentation

I+ s.r.l.

This document is a reference for the services provided by the Data Aggregator module by I+. For the data model associated to the services, please refer to the model.xsd file provided with the documentation.

Resources

/

Description
Main entry point for the services.
Methods

GET

returns: An Hypermedia containing links to the main service entry points.

available response representations:

Links found in the Response's Hypermedia

/auth

Description
Wrapper for the authentication section of the services. Not a resource by itself.

/auth/register

Description
Registers a User in the system, also creating an associated authorization token that is then returned as an Authorized-by header. The token will expire after some time, defined in an associated expires header returned along with the token.
Methods

POST

returns: The newly registered User's representation, with only his PersonalData.

acceptable request representations:

available response representations:

Links found in the Response's Hypermedia

/auth/login

Description
Logs a User in, creating an associated authorization token that is then returned as an Authorized-by header. The token will expire after some time, defined in an associated expires header returned along with the token.
Methods

POST

returns: The User's representation, with only his PersonalData.

acceptable request representations:

available response representations:

Links found in the Response's Hypermedia

/auth/logout

Description
Logs a User out, removing any associated authorization token (Note: in order to log out, the 'Authorized-by' header must be provided in the logout Request).
Methods

POST

returns: Only the outcome (HTTP STATUS) of the operation

available response representations:

  • No response body is returned.
Links found in the Response's Hypermedia

/auth/reset

resource-wide template parameters
parameter value description

username

string

the username (which MUST be an email)

Description
Requires a password reset for a User. The system will send an email to the provided email (via the username parameter), providing a link for the password reset action.
Methods

POST

returns: An Hypermedia, containing the links for the actual password resetting and for repeating the reset request (i.e. to receive another email).

acceptable request representations:

available response representations:

Links found in the Response's Hypermedia

/auth/newpassword

resource-wide template parameters
parameter value description

password

string

the new password

token

string

the token that is in the URL received via email for the password reset

Description
Performs a password reset after a user has requested it.
Methods

POST

returns: Just the http status code, which will be 200 OK if the password was changed correctly.

acceptable request representations:

available response representations:

  • None, since no entity is returned
Links found in the Response's Hypermedia

/relations

Description
Relations section of the services. Enumerates the available Relations, and provides a description for each one of them.
Methods

GET

returns: A list of all the Relations defined in the system.

available response representations:

Links found in the Response's Hypermedia

/relations/{REL}

resource-wide template parameters
parameter value description

REL

string

an entry taken from the ERelations enumeration

Description
Provides links to resources related to this Relation
Methods

GET

returns: A single Relation object

available response representations:

Links found in the Response's Hypermedia

/relations/{REL}/desc

resource-wide template parameters
parameter value description

REL

string

an entry taken from the ERelations enumeration

Description
Provides a textual description of the semantics of this Relation
Methods

GET

returns: A textual description of the semantics associated with this Relation

available response representations:

Links found in the Response's Hypermedia

/users

Description
Provides a Users object wrapping a list of all the registered Users
Methods

GET

returns: A Users object, containing a list of all the Users registered in the system

available response representations:

Links found in the Response's Hypermedia

/users/new

Description
Allows the insertion of a new User to the system.
Methods

POST

returns: The newly added User's representation, empty.

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Allows the retrieval of a User's representation from the system.
Methods

GET

returns: A User's representation, with only his PersonalData.

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/update

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Allows the update of a User in the system.
Methods

PUT

returns: The updated User's representation, with only his PersonalData.

acceptable request representations (Request Body):

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/delete

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Allows the removal of a User from the system.
Methods

DELETE

returns: Only the outcome (HTTP STATUS) of the operation

available response representations:

  • No response body is returned.
Links found in the Response's Hypermedia

/users/{user_id}/sessions?fromTime&toTime

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Allows querying (by dates, which are optional anyway) on the user's sessions.
Methods

GET

request query parameters
parameter value description

fromTime

string

The starting date, in ISO8601 format ("yyyy-MM-dd'T'HH:mm:ss.SSSZZ")

toTime

string

The ending date, in ISO8601 format ("yyyy-MM-dd'T'HH:mm:ss.SSSZZ")

returns:a Sessions object wrapping the result of the query.

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/sessions/new

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Allows the insertion of a list of Sessions for a user, wrapped in a Sessions object.
Methods

POST

returns: Only the outcome (HTTP STATUS) of the operation

acceptable request representations:

available response representations:

  • No response body is returned.
Links found in the Response's Hypermedia

/users/{user_id}/sessions/{session_id}

resource-wide template parameters
parameter value description

session_id

string

The Session's identifier (ID)

user_id

string

The User's identifier (ID)

Description
Service to retrieve a single Session of a user
Methods

GET

returns: a representation of the Session

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/sessions/{session_id}/update

resource-wide template parameters
parameter value description

session_id

string

The Session's identifier (ID)

user_id

string

The User's identifier (ID)

Description
Allows the update of a user's Session
Methods

PUT

returns: The updated Session.

acceptable request representations:

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/sessions/{session_id}/delete

resource-wide template parameters
parameter value description

session_id

string

The Session's identifier (ID)

user_id

string

The User's identifier (ID)

Methods

DELETE

returns: Only the outcome (HTTP STATUS) of the operation

available response representations:

  • No response body is returned.
Links found in the Response's Hypermedia

/users/{user_id}/events?fromTime&toTime

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Allows querying (by dates, which are optional anyway) on the user's events.
Methods

GET

request query parameters
parameter value description

fromTime

string

The starting date, in ISO8601 format ("yyyy-MM-dd'T'HH:mm:ss.SSSZZ")

toTime

string

The ending date, in ISO8601 format ("yyyy-MM-dd'T'HH:mm:ss.SSSZZ")

returns:an Events object wrapping the result of the query.

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/events/example

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Service providing query-by-example on the user's events.
Methods

POST

returns: The user's Events that matched the given example, wrapped in a Events object.

acceptable request representations:

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/events/new

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Allows the insertion of a list of Events for a user, wrapped in a Events object.
Methods

POST

returns: Only the outcome (HTTP STATUS) of the operation

acceptable request representations:

available response representations:

  • No response body is returned.
Links found in the Response's Hypermedia

/users/{user_id}/events/{event_id}

resource-wide template parameters
parameter value description

event_id

string

The Event's identifier (ID)

user_id

string

The User's identifier (ID)

Description
Allows the retrieval of a single Events associated to a user.
Methods

GET

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/events/{event_id}/update

resource-wide template parameters
parameter value description

event_id

string

The Event's identifier (ID)

user_id

string

The User's identifier (ID)

Description
Allows the update of a user's Event
Methods

PUT

returns: The updated Event.

acceptable request representations:

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/events/{event_id}/delete

resource-wide template parameters
parameter value description

event_id

string

The Events's identifier (ID)

user_id

string

The User's identifier (ID)

Methods

DELETE

returns: Only the outcome (HTTP STATUS) of the operation

available response representations:

  • No response body is returned.
Links found in the Response's Hypermedia

/users/{user_id}/settings

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Service to retrieve the user's settings.
Methods

GET

returns: a representation of the user0s settings in a SettingsData object.

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/settings/update

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Service to update the user's settings.
Methods

PUT

returns: the updated user's SettingsData

acceptable request representations:

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/accounts

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Service to retrieve the user's accounts.
Methods

GET

returns: a representation of the user's accounts in an AccountsData object.

available response representations:

Links found in the Response's Hypermedia

/users/{user_id}/accounts/update

resource-wide template parameters
parameter value description

user_id

string

The User's identifier (ID)

Description
Service to update the user's accounts.
Methods

PUT

returns: the updated user's AccountsData

acceptable request representations:

available response representations:

Links found in the Response's Hypermedia

Representations

application/xml

application/json

text/plain

application/x-www-form-urlencoded