Session
From ToxBank API Wiki
(Difference between revisions)
m |
m |
||
Line 12: | Line 12: | ||
||REST_op_status=200,401,403,500 | ||REST_op_status=200,401,403,500 | ||
}} | }} | ||
+ | |||
+ | === cURL example === | ||
+ | |||
+ | $curl -X POST -d "user=myname" -d "pass=mypass" https://toxbank.net/services/session | ||
+ | >HTTP/1.1 200 OK | ||
+ | >Content-Language: en | ||
+ | >Date: Fri, 16 Sep 2011 06:45:16 GMT | ||
+ | >Set-Cookie: subjectid=AQIC5wM2LY4SfczdemotokenzuhvIfb6LJj5SOVppnOTw7M.*AAJTSQACMDE.*; Path=/ | ||
+ | >Set-Cookie: subjectid_secure=true; Path=/ | ||
+ | >Content-Type: text/plain;charset=UTF-8 | ||
+ | >Content-Length: 7241 | ||
+ | >AQIC5wM2LY4SfczdemotokenzuhvIfb6LJj5SOVppnOTw7M.*AAJTSQACMDE.* | ||
= Logout = | = Logout = | ||
Line 24: | Line 36: | ||
|REST_op_status=200,401,403,500 | |REST_op_status=200,401,403,500 | ||
}} | }} | ||
+ | |||
+ | === cURL example === | ||
+ | |||
+ | $curl -X DELETE -H "subjectid:AQIC5wM2LY4SfczdemotokenzuhvIfb6LJj5SOVppnOTw7M.*AAJTSQACMDE.*" https://toxbank.net/services/session |
Revision as of 06:48, 16 September 2011
This could be a wrapper for the OpenTox_API_1.2_A&A (OpenAM) login/logout.
Contents |
Login
Description | Login |
---|---|
Resource | [[]] |
Method | POST |
URI | /session |
Parameters | user name and password ,optionally scheme (default OpenAM) , OpenAM server URI (has default ) |
Header Parameters | |
Media Type (input) | application/x-www-form-urlencoded |
Results | the token in the html body , optional cookie |
Media Type (output) | text/plain |
Status code | 200,401,403,500 |
cURL example
$curl -X POST -d "user=myname" -d "pass=mypass" https://toxbank.net/services/session >HTTP/1.1 200 OK >Content-Language: en >Date: Fri, 16 Sep 2011 06:45:16 GMT >Set-Cookie: subjectid=AQIC5wM2LY4SfczdemotokenzuhvIfb6LJj5SOVppnOTw7M.*AAJTSQACMDE.*; Path=/ >Set-Cookie: subjectid_secure=true; Path=/ >Content-Type: text/plain;charset=UTF-8 >Content-Length: 7241 >AQIC5wM2LY4SfczdemotokenzuhvIfb6LJj5SOVppnOTw7M.*AAJTSQACMDE.*
Logout
Description | Logout |
---|---|
Resource | [[]] |
Method | DELETE |
URI | /session |
Parameters | header parameter subjectid |
Header Parameters | |
Media Type (input) | none |
Results | none |
Media Type (output) | text/plain |
Status code | 200,401,403,500 |
cURL example
$curl -X DELETE -H "subjectid:AQIC5wM2LY4SfczdemotokenzuhvIfb6LJj5SOVppnOTw7M.*AAJTSQACMDE.*" https://toxbank.net/services/session
Facts about SessionRDF feed
Acts on | |
Has output media type | text/plain + |
Has status code | 200,401,403,500 + |