GET | List a remote session by [id]
  • 3 minutes to read
  • Dark
    Light
  • PDF

GET | List a remote session by [id]

  • Dark
    Light
  • PDF

Article summary

Access information of a proxy session registered in PAM Core.

Requirements

Request

GET api/pam/session/remotesessions/[id]

Request parameters

Send the parameter below in the path of the URL.

id - int - required - Unique hash generated by senhasegura to exclusively identify a specific session.

Note: this value is automatically assigned by senhasegura when the session is created and is obtained in the response to the request GET | List all remote sessions.

Example request

GET {{url}}/api/session/remotesessions/53

Response

HTTP/1.1 200 OK
{
    "code": 200,
    "response": {
        "status": 200,
        "message": "",
        "error": false,
        "error_code": 0,
        "detail": "",
        "mensagem": "",
        "erro": false,
        "cod_erro": 0
    },
    "tenant": "senhasegura",
    "remote_session": [
        {
            "id": "30",
            "user": "MFASenhaSegura",
            "origin_ip": "172.16.20.158",
            "credential": "usrsudonopass",
            "device": "10.66.33.17:22",
            "protocol": "ssh",
            "proxy": "Web Proxy",
            "session_id": "df06257a1*********************9104dc43",
            "start": "2024-05-15 17:37:53",
            "end": "2024-05-15 17:38:00",
            "time": "00:00:07",
            "prevent_purge": "No",
            "request": null,
            "ITSM": null
        }
    ]
}

Response body fields

remote_sessions - array of objects - Data of the listed remote sessions.


    →id - int - Unique identification code for the remote session.    Note: this value is automatically assigned by senhasegura when the session is created and should not be confused with the session_id parameter.


    →user - string - Username used for authentication.


    →origin_ip - string - IP address of the session's originating device.


    →credential - string - Credential used for the session.


    →device - string - Hostname or IP address of the target device.


    →protocol - string - Network protocol (SSH, RDP, HTTPS, among others).


    →proxy - string - Type of proxy session.


    →session_id - string - Unique hash generated by senhasegura to exclusively identify a specific session.    Example: df06257a1*********************9104dc43

    Note: this identifier is used internally by the application for operations related to the session, such as access control, activity tracking, and resource management. Each time a session is started, a new session_id is generated for that specific session.


    →start - string - Start date and time of the session in ISO 8601 format.    Example: 2024-05-06 16:05:07


    →end - string - End date and time of the session in ISO 8601 format.    Example: 2024-05-06 16:07:59


    →time - string - Duration of the session.    Example: 00:02:52


    →prevent_purge - string - Indicates whether the session data will be automatically deleted.    Example: No


    →request - string - Request made by the user.


    →ITSM - string - ITSM software code.

Errors

404 - Not Found

Message: "Resource sub not found"

Possible cause: the URL or the requested resource isn’t correct.

Solution: check the URL and make sure the parameter is correct.


500 - Internal Server Error

Message: "Unexpected error."

Possible cause: the error is in the senhasegura server.

Solution: contact the support team for more information.


Message: "You are not authorized to access this resource."

Possible cause: you don’t have the authorization to access this resource.

Solution: ask the administrator to check your permission to access the Web Proxy Session resources in A2A.


Client authentication failed

Message: "Client authentication failed."

Possible cause: failure in your application authentication with the senhasegura server.

Solution: check the authentication parameters such as Access Token URL, Client ID e Client secret and request a new access token.


Invalid signature

Message: "Invalid signature"

Possible cause: failure in recognizing the URL of the client application.

Solution: check the URL of the client application and resent the request.


No route matched with those values

Message: "No route matched with those values."

Possible cause: the authorization header is missing in the API request.

Solution: request a new access token.


Request timed out

Message: "Request timed out."

Possible cause: the request time has expired.

Solution: check the connectivity between the source of the request and the senhasegura server.


Was this article helpful?