Digital Identity
  • Introduction
  • Quick Start
  • Reference
    • API Reference
      • Register
      • User Profile
      • Verify
      • CancelVerifiedDigitalIdentity
      • Get Verify Data
      • Login
      • Admin Login
      • Check Eligibility
      • Current
      • Get All Product Types
      • Get Business Request Type Template Fields
      • User Create Request
      • User Activate Request
      • ⚙️ Admin Control Panel
        • Login API
        • GetRequests API
        • GetContractToPdf
        • GetUsers
        • GetTransactionById API
        • CancelVerifiedDigitalIdentity
      • Error Codes
Powered by GitBook
On this page
  1. Reference
  2. API Reference
  3. ⚙️ Admin Control Panel

GetUsers

Base Endpoint:

POST https://api.vlenseg.com/api/DigitalIdentity/GetUsers

Overview:

This endpoint allows admins to retrieve a list of users based on specific filter criteria such as roles, permissions, and other user attributes. The response includes details about users in the system.

Headers:

  • ApiKey (required): The API key for authenticating the request.

  • TenancyName (required): The tenancy name that identifies the tenant.

  • Authorization (required): Bearer token for user authentication, obtained from the Login API.

  • Content-Type: application/json.

Body:

  • filter (optional): Search criteria for filtering user data. It can be used to search by name or other user attributes.

  • permissions (optional): An array of permissions to filter users based on their assigned permissions.

  • role (optional): The specific role ID or identifier to filter users belonging to that role.

  • onlyLockedUsers (optional): A boolean flag indicating whether to only retrieve users who are locked (true) or all users (false).

  • roleName (optional): The name of the role you want to filter users by. You should choose one of this (BusinessRequestUser, ...etc)

  • sorting (optional): The sorting criteria for user data, if any.

  • maxResultCount (optional): The maximum number of user records to return in the response.

  • skipCount (optional): The number of records to skip for pagination purposes.

const axios = require('axios');

const data = {
  filter: "",
  permissions: [],
  role: null,
  onlyLockedUsers: false,
  roleName: "BusinessRequestUser",
  sorting: "",
  maxResultCount: 25,
  skipCount: 0
};

axios.post('https://api.vlenseg.com/api/DigitalIdentity/GetUsers', data, {
  headers: {
    'ApiKey': 'YOUR_API_KEY',
    'TenancyName': 'YOUR_TENANCY_NAME',
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then((response) => {
  console.log(response.data);
})
.catch((error) => {
  console.error('Error:', error.response ? error.response.data : error.message);
});
import requests

url = "https://api.vlenseg.com/api/DigitalIdentity/GetUsers"

payload = {
    "filter": "",
    "permissions": [],
    "role": None,
    "onlyLockedUsers": False,
    "roleName": "BusinessRequestUser",
    "sorting": "",
    "maxResultCount": 25,
    "skipCount": 0
}

headers = {
    'ApiKey': 'YOUR_API_KEY',
    'TenancyName': 'YOUR_TENANCY_NAME',
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json'
}

response = requests.post(url, json=payload, headers=headers)

if response.status_code == 200:
    print("Response data:", response.json())
else:
    print(f"Error: {response.status_code}", response.text)
curl -X POST 'https://api.vlenseg.com/api/DigitalIdentity/GetUsers' \
-H 'ApiKey: YOUR_API_KEY' \
-H 'TenancyName: YOUR_TENANCY_NAME' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
    "filter": "",
    "permissions": [],
    "role": null,
    "onlyLockedUsers": false,
    "roleName": "BusinessRequestUser",
    "sorting": "",
    "maxResultCount": 25,
    "skipCount": 0
}'
PreviousGetContractToPdfNextGetTransactionById API

Last updated 8 months ago

Retrieve users based on specific filter criteria

post
Authorizations
Body
filterstringOptional

Search criteria to filter users (optional).

permissionsstring[]Optional

Array of permissions to filter users (optional).

rolestring | nullableOptional

Specific role ID to filter users by role (optional).

onlyLockedUsersbooleanOptional

Flag to retrieve only locked users (optional).

Example: false
roleNamestringOptional

Role name to filter users (optional).

Example: BusinessRequestUser
sortingstringOptional

Sorting criteria for the results (optional).

maxResultCountintegerOptional

Maximum number of results to return (optional).

Example: 25
skipCountintegerOptional

Number of records to skip for pagination (optional).

Example: 0
Responses
200
List of users retrieved successfully
application/json
400
Invalid request
401
Unauthorized, API key or token is missing/invalid
500
Internal server error
post
POST /api/DigitalIdentity/GetUsers HTTP/1.1
Host: api.vlenseg.com
ApiKey: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 146

{
  "filter": "",
  "permissions": [],
  "role": null,
  "onlyLockedUsers": false,
  "roleName": "BusinessRequestUser",
  "sorting": "",
  "maxResultCount": 25,
  "skipCount": 0
}
{
  "totalCount": 27,
  "error_code": "",
  "error_message": "",
  "items": [
    {
      "name": "JohnDoe",
      "surname": "Doe",
      "emailAddress": "john.doe@example.com",
      "phoneNumber": "+1234567890",
      "profilePictureId": "12345",
      "isEmailConfirmed": true,
      "isDigitalIdentityVerified": false,
      "isActive": true,
      "creationTime": "2024-02-17T19:56:56.6885267",
      "id": 454
    }
  ]
}