Session Resource¶
Name | session |
URI | /api/session/ |
Description | Information on the active user’s session. This includes information on the user currently logged in through the calling client, if any. Currently, the resource links to that user’s own resource, making it easy to figure out the user’s information and any useful related resources. |
HTTP Methods |
|
Parent Resource | Root List Resource |
Child Resources | None |
Anonymous Access | Yes, if anonymous site access is enabled |
Links¶
Name | Method | Resource |
---|---|---|
self | GET | Session Resource |
user | GET | User Resource |
HTTP GET¶
Returns information on the client’s session.
This currently just contains information on the currently logged-in user (if any).
Examples¶
application/vnd.reviewboard.org.session+json¶
{
"session": {
"authenticated": true,
"links": {
"self": {
"href": "http://reviews.example.com/api/session/",
"method": "GET"
},
"user": {
"href": "http://reviews.example.com/api/users/admin/",
"method": "GET",
"title": "admin"
}
}
},
"stat": "ok"
}
application/vnd.reviewboard.org.session+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<stat>ok</stat>
<session>
<authenticated>1</authenticated>
<links>
<self>
<href>http://reviews.example.com/api/session/</href>
<method>GET</method>
</self>
<user>
<href>http://reviews.example.com/api/users/admin/</href>
<method>GET</method>
<title>admin</title>
</user>
</links>
</session>
</rsp>