​
Select Service
ves-io-schema-access-access_active_sessions-CustomAPI-ListActiveSessions
Published April 5, 2023 | Last modified October 28, 2026
Examples of performing access_active_sessions CustomAPI ListActiveSessions
Usecase:
List Active Sessions
Request:
Request using vesctl:
vesctl request rpc access_active_sessions.CustomAPI.ListActiveSessions -i request.yaml --uri /public/namespaces/default/access/active-sessions --http-method GET
where file request.yaml has following contents:
clientIp: 10.192.0.1cursor: eyJzZXF1ZW5jZV9pZCI6MTIzNDU2fQ==limit: 25namespace: defaultusername: testUservirtualServer: web-appvesctl yaml response:
count: 2items:- clientIp: 10.192.229.1 expirationTime: "2026-09-28T04:24:25.667806Z" id: 9d6d591 lastActivityTime: "2026-09-28T04:24:25.667806Z" policy: default-policy site: us-west-2 startTime: "2026-09-28T04:24:25.667806Z" username: testUser1 virtualServer: web-app- clientIp: 10.192.229.2 expirationTime: "2026-09-28T04:24:25.667806Z" id: 6b4428e lastActivityTime: "2026-09-28T04:24:25.667806Z" policy: admin-policy site: us-east-1 startTime: "2026-09-28T04:24:25.667806Z" status: ESTABLISHED username: testUser2 virtualServer: api-servicenextCursor: eyJzZXF1ZW5jZV9pZCI6MTIzNDU2fQ==previousCursor: eyJzZXF1ZW5jZV9pZCI6MTIzNDAwfQ==totalEstablished: 1totalPending: 1Request using curl:
curl -X 'GET' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build3348201650_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/data/namespaces/default/access/active-sessions?client_ip=10.192.0.1&cursor=eyJzZXF1ZW5jZV9pZCI6MTIzNDU2fQ%3D%3D&direction=FORWARD&expiration_time_from=&expiration_time_to=&limit=25&namespace=default&policy=&site=&start_time_from=&start_time_to=&status=ANY&username=testUser&virtual_server=web-app'curl response:
HTTP/1.1 200 OKContent-Length: 977Content-Type: application/jsonDate: Mon, 28 Sep 2026 04:24:25 GMTVary: Accept-Encoding
{ "items": [ { "id": "9d6d591", "status": "PENDING", "virtual_server": "web-app", "policy": "default-policy", "username": "testUser1", "client_ip": "10.192.229.1", "start_time": "2026-09-28T04:24:25.667806Z", "expiration_time": "2026-09-28T04:24:25.667806Z", "last_activity_time": "2026-09-28T04:24:25.667806Z", "site": "us-west-2" }, { "id": "6b4428e", "status": "ESTABLISHED", "virtual_server": "api-service", "policy": "admin-policy", "username": "testUser2", "client_ip": "10.192.229.2", "start_time": "2026-09-28T04:24:25.667806Z", "expiration_time": "2026-09-28T04:24:25.667806Z", "last_activity_time": "2026-09-28T04:24:25.667806Z", "site": "us-east-1" } ], "count": 2, "next_cursor": "eyJzZXF1ZW5jZV9pZCI6MTIzNDU2fQ==", "previous_cursor": "eyJzZXF1ZW5jZV9pZCI6MTIzNDAwfQ==", "total_pending": 1, "total_established": 1}