Votta API reference
« back to overviewSessions [1.0]
index
List all the sessions for the current user.
URL
GET /sessionsResponse Object
- Array<Session>
Examples
Request
(with authentication header)
Response
{
"sessions": [
{"id": 3, "comment": "my Mac"},
{"id": 5, "comment": "my iPhone"}
]
}
create
Log in as a registered user.
URL
POST /sessionsRequired Parameters
- email String
-
password
String
Plaintext password
Optional Parameters
-
session[comment]
String
comment to identify the session
Response Object
-
a token
Examples
Request
email=registered_user@example.com
password=p1aint3xt-pa55w0rd
session[comment]=foo bar
Response
{
"token": "abc"
}
update
Update the information of the session.
URL
PATCH /sessions/:idOptional Parameters
-
comment
String
Comment of the session.
Response Object
-
Session
the new session details
Examples
Request
session[comment]=my iMac
Response
{
"id": 5,
"comment": "my iMac"
}
destroy
Log out the session.