REST API:Obtain a Session ID

From AgileApps Support Wiki
Revision as of 22:36, 21 August 2013 by imported>Aeric
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To obtain a session ID for use in making a REST request, there are a couple of options:

Use the getEnv from with the platform
For methods running inside the platform, use the Java getEnv() method to obtain the session ID:
<syntaxhighlight lang="java" enclose="div">

String sessionID = Functions.getEnv(ENV.SESSION.ID); </syntaxhighlight>

Programmatic login
Use the code from the Sample Login Client to programmatically log in and obtain the session ID from the response.