Logout Active Session

This API endpoint is used to logout a user by terminating their active session. It ensures that the user is no longer authenticated.

Request Structure

Endpoint /acctmgmt-perform-logout
Type POST
Sample URL https://<IP/HostName/TenantName>:<GWPORT>/avxapi/acctmgmt-perform-logout?gwsource=external

To understand the elements of the sample URL, click here.

Headers
Content-Type application/json
Table 1. Input Parameters
Name Description
sessionId

Header

(Mandatory) Use Session Id received after login.

Type: String

Example: "sessionId": "ce7f1a14-2bf9-4e4a-89a8-bc780a255813"

Content-Type

Header

(Mandatory) The parameter should be set to application/json to specify the nature of the data in the payload.

Type: String

Example: "application/json"

gwsource

Query

(Mandatory) Source from which the request is triggered. The values can be:
  • web
  • external

Type: String

Response Structure

  • Status Code: 200 OK
  • Message: SUCCESS
  • Headers:
    • Content-Type: application/json
Table 2. Response Parameters
Name Description
response The response contains the attributes needed to retrieve the session ID.
message Success message or failure description in case of error.
appStatusCode Application specific status code for the response. Will be non-null for failure response.
tags More info in case of failure response.
Name Description
status Indicates the overall status of the response. The values can be:
  • SUCCESS
appStatusCode An application-specific status code, if applicable.
statusDescription Description of the status, if available.
sessionId Unique identifier for the session.
lockDownPeriod Number of login attempts remaining.
termsAccepted
passwordExpiryMsg
emailId

Status Codes

HTTP Code appStatusCode Response Message
200 OK NA SUCCESS

Sample Request/Response

Use Case

Logout API is used to logout a user by terminating their active session.

Request URL
https://<IP/HostName/TenantName>:<GWPORT>/avxapi/acctmgmt-perform-logout?gwsource=external
Request Payload
{}
Sample Response
{
    "response": {
        "status": "SUCCESS",
        "appStatusCode": null,
        "statusDescription": null,
        "sessionId": null,
        "authCode": null,
        "lockDownPeriod": 0,
        "emailId": null,
        "termsAccepted": false,
        "passwordExpiryMsg": ""
    },
    "message": null,
    "appStatusCode": null,
    "tags": null,
    "headers": null
}

What's Next

Reference

Understanding the sample URL:
  • IP/HostName/TenantName: Replace with the actual IP address, hostname, or tenant name based on the specific configuration in AppViewX.
    • IP: A unique identifier assigned to each device connected to a computer network that uses the Internet Protocol for communication

      The IP address will be included in the endpoint URL for an on-prem deployment.

    • HostName: A human-readable label assigned to a device (host) on a network

      The hostname will be included in the endpoint URL for an on-prem deployment.

    • TenantName: An identifier label for a tenant given to indicate which tenant's data the API request will access/modify

      The tenant name will be included in the endpoint URL for a SaaS deployment.

  • GWPORT: AppViewX gateway port

    A gateway port refers to a network port through which data is sent and received to communicate with a gateway in an on-prem deployment.

    Example: 31443

  • avxapi: Path parameter value (static) that is part of the endpoint's URL
  • Endpoint: Endpoint of the API, for example: execute-hook
  • gwsource: Source or origin of a gateway, for example: external.