REST API Reference > Platform REST API version 2 resources > Logout
  

Logout

You can use the REST API to log out of an organization and end the version 2 REST API session, or you can end all version 2 REST API sessions for the organization.

Logging out

Use this resource to log out of an organization and end the version 2 REST API session specified in the request.
Don't log out of a REST API session until all the requests that you've sent have been executed.

POST Request

To log out an organization and end the version 2 REST API session, include the session ID in the request header with the following URI:
/api/v2/user/logout

POST Response

Returns the 200 response code if the request is successful.
Returns the error object if errors occur.

POST Example

To log out of your organization, you might use the following request:
POST <serverURL>/api/v2/user/logout
Content-Type: application/json
Accept: application/json
icSessionId: <icSessionId>

Logging out and ending all sessions

Use this resource to log out of an organization and end all version 2 REST API sessions for the organization.
Don't log out of the sessions until all the API requests have been executed.

POST Request

To log out of an organization and end all version 2 REST API sessions for the organization, use the following URL:
https://<cloud provider>-<region>.informaticacloud.com/ma/api/v2/user/logoutall
With this URL, use the following attributes in a logout object:
username
Informatica Intelligent Cloud Services user name.
password
Informatica Intelligent Cloud Services password.

POST Response

Returns the success object if the request is successful.
Returns the error object if errors occur.

POST Example

To log out of an organization and all version 2 REST API sessions, you might use the following request:
POST https://dm-us.informaticacloud.com/ma/api/v2/user/logoutall
Content-Type: application/json
Accept: application/json
{
"@type": "logout",
"username": "useremail@company.com",
"password": "mypassword"
}