AgileApps Support Wiki Pre Release

Difference between revisions of "REST API:logout Resource"

From AgileApps Support Wiki
imported>Aeric
 
imported>Aeric
m (Text replace - '<tt><nowiki>https://{domain}/networking' to '<tt>{{platformURL}}')
Line 1: Line 1:
Performs a [[Logout]] action via the [[REST API]]
Performs a [[Logout]] action via the [[REST API]]
;Method:GET
;Method:GET
;URI:<tt><nowiki>https://{domain}/networking/rest/logout</nowiki></tt>
;URI:<tt>{{platformURL}}/rest/logout</nowiki></tt>


;Response:
;Response:

Revision as of 21:00, 30 March 2012

Performs a Logout action via the REST API

Method
GET
URI
https://{yourDomain}/networking/rest/logout</nowiki>
Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <message>

0 <description>Success</description>

   </message>

</platform> </syntaxhighlight>

Sample Logout Code

This code taken from the BaseClient sample shows how to make a REST logout request. (It ignores HTTP return codes, because the goal is to log out, and pretty much the only way to get an error would be if the session had already terminated.)

<syntaxhighlight lang="java" enclose="div">
 public void logout()
 {
   System.out.println("Logging out");
   String url = baseUrl + "/networking/rest/logout";
   Resource logoutResource = this.client.resource(url);
   logoutResource.accept("application/xml").get();
 }

</syntaxhighlight>