Delete User

Description

 

The Delete User API is a crucial component for efficient user management within uKnowva. When invoked, this dedicated service seamlessly performs operations in the uKnowva system, allowing for the effortless removal of users. Experience streamlined user administration capabilities with the power of the Delete User API.

 


API Endpoint

https://Your-uknowva-site-url/api.php/system/uknowva/updateUser

Bearer Token 

 

Please refer to the token generation documentation for generating API tokens to invoke uKnowva APIs. (Token Generation Docs)

 

Method Type

 

  •  POST

Mandatory Fields

“delete=true”,“email”,“username”,“delete_employee_id”

Example Request


cURL

curl --location 'https://Your-uknowva-site-url/api.php/system/uknowva/updateUser' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer Token' \
--data-raw '{
"delete": "true",
"email": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
"username": "",
"delete_employee_id": ""
}'

PHP Code Snippet

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://Your-uknowva-site-url/api.php/system/uknowva/updateUser',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
 "delete": "true",
  "email": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
  "username": "",
  "delete_employee_id": ""
  }',
CURLOPT_HTTPHEADER => array(
  'Content-Type: application/json',
  'Authorization: Bearer Token',
  'Cookie: 66987f468890f0046c70903896601034=p5dcq26g2niu9tq3gsain9dnd0'
 ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Python Code Snippet

import requests
import json
url = "https://Your-uknowva-site-url/api.php/system/uknowva/updateUser"
payload = json.dumps({
"delete": "true",
"email": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
"username": "",
"delete_employee_id": ""
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer Token',
'Cookie': '66987f468890f0046c70903896601034=p5dcq26g2niu9tq3gsain9dnd0'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)

Java Code Snippet

OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{"delete": "true","email": "This email address is being protected from spambots. You need JavaScript enabled to view it.","username": "","delete_employee_id": ""}");
Request request = new Request.Builder()
.url("https://Your-uknowva-site-url/api.php/system/uknowva/updateUser")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer Token")
.build();
Response response = client.newCall(request).execute();

Sample Response


  • Success
{
"delete": "true",
"email": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
"username": "",
"delete_employee_id": ""
}

  • Failure
{
  "status": true,
  "payload": {
  "status": false,"message": "User is already block or Deleted"
             }
}

 

Sample Collection

Download Delete User API Collection

In case you face any problems, then please write to This email address is being protected from spambots. You need JavaScript enabled to view it., our awesome support team will surely help you!

Was this Article helpful?