sessionstorage

Download Spec

get /auth/api/v1/sessionstorage/users/{user_id}/sessions

Fetch valid user sessions.

offset

int

Offset from which to start fetching objects

Default
0

limit

int

Maximum number of objects to return

Default
50

sortdir

string

Sorting direction

Default
"ASC"
Enum
  • ASC
  • DESC

sortkey

string

Sorting key

Default
"expires"
Enum
  • id
  • user_id
  • source_id
  • parent_session_id
  • domain
  • username
  • remote_address
  • type
  • created
  • updated
  • expires
  • token_expires

Response

ExamplesSchema

Successful response, returns valid user sessions.

{
  "count": 1,
  "items": [
    {
      "id": "5bf77342-221c-11ee-be56-0242ac120002",
      "user_id": "5bf77342-221c-11ee-be56-0242ac120002",
      "source_id": "5bf77342-221c-11ee-be56-0242ac120002",
      "parent_session_id": "",
      "domain": "privx-ui",
      "username": "alice",
      "remote_addr": "127.0.0.1",
      "user_agent": "Mozilla....",
      "type": "login",
      "created": "2022-01-01T09:17:16Z",
      "updated": "2022-01-01T09:17:16Z",
      "expires": "2022-01-01T09:17:16Z",
      "token_expires": "2022-01-01T09:17:16Z",
      "logged_out": false,
      "current": false
    }
  ]
}

get /auth/api/v1/sessionstorage/users/current/sessions

Fetch current users valid sessions.

offset

int

Offset from which to start fetching objects

Default
0

limit

int

Maximum number of objects to return

Default
50

sortdir

string

Sorting direction

Default
"ASC"
Enum
  • ASC
  • DESC

sortkey

string

Sorting key

Default
"expires"
Enum
  • id
  • user_id
  • source_id
  • parent_session_id
  • domain
  • username
  • remote_address
  • type
  • created
  • updated
  • expires
  • token_expires

Response

ExamplesSchema

Successful response, returns current users valid sessions.

{
  "count": 1,
  "items": [
    {
      "id": "5bf77342-221c-11ee-be56-0242ac120002",
      "user_id": "5bf77342-221c-11ee-be56-0242ac120002",
      "source_id": "5bf77342-221c-11ee-be56-0242ac120002",
      "parent_session_id": "",
      "domain": "privx-ui",
      "username": "alice",
      "remote_addr": "127.0.0.1",
      "user_agent": "Mozilla....",
      "type": "login",
      "created": "2022-01-01T09:17:16Z",
      "updated": "2022-01-01T09:17:16Z",
      "expires": "2022-01-01T09:17:16Z",
      "token_expires": "2022-01-01T09:17:16Z",
      "logged_out": false,
      "current": false
    }
  ]
}

get /auth/api/v1/sessionstorage/sources/{source_id}/sessions

Fetch valid source sessions.

offset

int

Offset from which to start fetching objects

Default
0

limit

int

Maximum number of objects to return

Default
50

sortdir

string

Sorting direction

Default
"ASC"
Enum
  • ASC
  • DESC

sortkey

string

Sorting key

Default
"expires"
Enum
  • id
  • user_id
  • source_id
  • parent_session_id
  • domain
  • username
  • remote_address
  • type
  • created
  • updated
  • expires
  • token_expires

Response

ExamplesSchema

Successful response, returns current users valid sessions.

{
  "count": 1,
  "items": [
    {
      "id": "5bf77342-221c-11ee-be56-0242ac120002",
      "user_id": "5bf77342-221c-11ee-be56-0242ac120002",
      "source_id": "5bf77342-221c-11ee-be56-0242ac120002",
      "parent_session_id": "",
      "domain": "privx-ui",
      "username": "alice",
      "remote_addr": "127.0.0.1",
      "user_agent": "Mozilla....",
      "type": "login",
      "created": "2022-01-01T09:17:16Z",
      "updated": "2022-01-01T09:17:16Z",
      "expires": "2022-01-01T09:17:16Z",
      "token_expires": "2022-01-01T09:17:16Z",
      "logged_out": false,
      "current": false
    }
  ]
}

post /auth/api/v1/sessionstorage/sessions/search

Search for sessions

keywords

string

Keywords string which is separated by a comma

Example
"alice, 127.0.0.1, Mozilla/3.0"

user_id

string

uuid

The ID of the user the sessions belong to

type

string

Type of session, login or sso

Example
"login"

Response

ExamplesSchema

Successful response, returns valid sessions.

{
  "count": 1,
  "items": [
    {
      "id": "5bf77342-221c-11ee-be56-0242ac120002",
      "user_id": "5bf77342-221c-11ee-be56-0242ac120002",
      "source_id": "5bf77342-221c-11ee-be56-0242ac120002",
      "parent_session_id": "",
      "domain": "privx-ui",
      "username": "alice",
      "remote_addr": "127.0.0.1",
      "user_agent": "Mozilla....",
      "type": "login",
      "created": "2022-01-01T09:17:16Z",
      "updated": "2022-01-01T09:17:16Z",
      "expires": "2022-01-01T09:17:16Z",
      "token_expires": "2022-01-01T09:17:16Z",
      "logged_out": false,
      "current": false
    }
  ]
}

post /auth/api/v1/sessionstorage/sessions/{session_id}/terminate

Terminate signle session by ID

session_id

string

uuid

required

Session ID

Response

ExamplesSchema

Successful response.

Empty response

post /auth/api/v1/sessionstorage/users/{user_id}/sessions/terminate

Terminate all user sessions

user_id

string

uuid

required

User ID

Response

ExamplesSchema

Successful response.

Empty response

post /auth/api/v1/sessionstorage/users/current/sessions/{session_id}/terminate

Terminate currents user session by ID

session_id

string

uuid

required

Session ID

Response

ExamplesSchema

Successful response.

Empty response

post /auth/api/v1/sessionstorage/users/current/sessionpassword

Get session password

OAuth2 oauth

Required Scopes:

user

All Scopes

  • admin · Admin scope - used for built-in SSH PrivX admin account
  • service · Microservice scope - used for communication between SSH PrivX microservices
  • user · Normal users
  • usersManage · Clients with users-manage scope
  • usersView · Clients with users-view scope
Flow Type:
authorization_code
Auth URL:
https://api.x.com/v1/auth/auth
Token URL:
https://api.x.com/v1/auth/auth

Response

ExamplesSchema

Successful response.

{
  "password": "y~X4x4P%F)="
}

Was this page helpful?