checkIfExistsAuthUserById
Check if AuthUser exists for the specified user ID
/users-keycloak/auth-users/{userId}
Usage and SDK Samples
curl -X GET \
-H "Accept: text/plain,application/json" \
"http://localhost:8081/users-keycloak/auth-users/{userId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AuthUserApi;
import java.io.File;
import java.util.*;
public class AuthUserApiExample {
public static void main(String[] args) {
// Create an instance of the API class
AuthUserApi apiInstance = new AuthUserApi();
UUID userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | User ID
try {
'String' result = apiInstance.checkIfExistsAuthUserById(userId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuthUserApi#checkIfExistsAuthUserById");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final UUID userId = new UUID(); // UUID | User ID
try {
final result = await api_instance.checkIfExistsAuthUserById(userId);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->checkIfExistsAuthUserById: $e\n');
}
import org.openapitools.client.api.AuthUserApi;
public class AuthUserApiExample {
public static void main(String[] args) {
AuthUserApi apiInstance = new AuthUserApi();
UUID userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | User ID
try {
'String' result = apiInstance.checkIfExistsAuthUserById(userId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuthUserApi#checkIfExistsAuthUserById");
e.printStackTrace();
}
}
}
// Create an instance of the API class
AuthUserApi *apiInstance = [[AuthUserApi alloc] init];
UUID *userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // User ID (default to null)
[apiInstance checkIfExistsAuthUserByIdWith:userId
completionHandler: ^('String' output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var UsersKeycloakApi = require('users_keycloak_api');
// Create an instance of the API class
var api = new UsersKeycloakApi.AuthUserApi()
var userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} User ID
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.checkIfExistsAuthUserById(userId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class checkIfExistsAuthUserByIdExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new AuthUserApi();
var userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | User ID (default to null)
try {
'String' result = apiInstance.checkIfExistsAuthUserById(userId);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling AuthUserApi.checkIfExistsAuthUserById: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AuthUserApi();
$userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | User ID
try {
$result = $api_instance->checkIfExistsAuthUserById($userId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthUserApi->checkIfExistsAuthUserById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AuthUserApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AuthUserApi->new();
my $userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | User ID
eval {
my $result = $api_instance->checkIfExistsAuthUserById(userId => $userId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AuthUserApi->checkIfExistsAuthUserById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.AuthUserApi()
userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | User ID (default to null)
try:
api_response = api_instance.check_if_exists_auth_user_by_id(userId)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthUserApi->checkIfExistsAuthUserById: %s\n" % e)
extern crate AuthUserApi;
pub fn main() {
let userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
let mut context = AuthUserApi::Context::default();
let result = client.checkIfExistsAuthUserById(userId, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| userId* |
UUID
(uuid)
User ID
Required
|