Logging out of the Common REST API


To log out of a session that is open in the Common REST API, use the following URL:

https://<hostName>:<portNumber>/cra/serviceGateway/services/Logoff

In SPE2410, we have deprecated the serviceName parameter from the URL. However, you can still use the existing URL. By default, the service name is the one you have logged in.

https://<hostName>:<portNumber>/cra/serviceGateway/services/<serviceName>/Logoff

  1. Set the variables to the following values:
    • <hostName> is the name of the mainframe host where the CRA server is running.
    • <portNumber> is the port number of the CRA server.
    • (Optional) <serviceName> is the service name you use to log in to a service.

      Important

      By default, the service name is the one you have logged in to work with the API.

  2. In the Header, set the Content-Type to application/x-www-form-urlencoded.
  3. In the Body, set the following key:
    userToken=<userToken>
    <userToken> is the token issued to you when you logged on. For more information, see Logging-in-to-a-service-using-the-Common-REST-API.

Important

If you do not log out, the user token expires after the period of inactivity that the timeout value defines. The default timeout value is 15 minutes. For more information, see Managing-Common-REST-API-session-tokens-and-user-tokens.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*