or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

attack-detection.mdauthentication-management.mdcache-management.mdclient-configuration.mdclient-management.mdclient-policies.mdclient-scopes.mdcomponents.mdgroup-management.mdidentity-providers.mdindex.mdorganization-management.mdrealm-management.mdrole-management.mdserver-info.mduser-management.mduser-storage-provider.mdutility-functions.mdwhoami.md
tile.json

server-info.mddocs/

0

# Server Info

1

2

Server information provides access to Keycloak server metadata, configuration details, and message bundles for internationalization. This includes server version, provider information, theme details, and locale-specific resources.

3

4

## Capabilities

5

6

### Server Information

7

8

Retrieve comprehensive server information and configuration details.

9

10

```typescript { .api }

11

/**

12

* Get server information including version, providers, and configuration

13

* @returns Server information representation with all server details

14

*/

15

find(): Promise<ServerInfoRepresentation>;

16

```

17

18

### Message Bundles

19

20

Access internationalization message bundles for themes and locales.

21

22

```typescript { .api }

23

/**

24

* Find effective message bundles for themes and locales

25

* @param query - Parameters for message bundle lookup

26

* @returns Array of effective message bundle representations

27

*/

28

findEffectiveMessageBundles(query: MessageBundleQuery): Promise<EffectiveMessageBundleRepresentation[]>;

29

```

30

31

## Usage Examples

32

33

```typescript

34

import KeycloakAdminClient from "@keycloak/keycloak-admin-client";

35

36

const kcAdminClient = new KeycloakAdminClient({

37

baseUrl: 'http://localhost:8080',

38

realmName: 'master',

39

});

40

41

await kcAdminClient.auth({

42

username: 'admin',

43

password: 'admin',

44

grantType: 'password',

45

clientId: 'admin-cli',

46

});

47

48

// Get server information

49

const serverInfo = await kcAdminClient.serverInfo.find();

50

console.log('Keycloak Version:', serverInfo.systemInfo?.version);

51

console.log('Available Providers:', Object.keys(serverInfo.providers || {}));

52

53

// Get message bundles for a specific theme and locale

54

const messageBundles = await kcAdminClient.serverInfo.findEffectiveMessageBundles({

55

realm: 'myrealm',

56

themeType: 'login',

57

locale: 'en',

58

theme: 'keycloak',

59

source: false

60

});

61

62

console.log('Available messages:', messageBundles[0]?.messages);

63

```

64

65

## Types

66

67

```typescript { .api }

68

interface MessageBundleQuery {

69

realm: string;

70

theme?: string;

71

themeType?: string;

72

locale?: string;

73

source?: boolean;

74

}

75

76

interface ServerInfoRepresentation {

77

systemInfo?: {

78

version?: string;

79

serverTime?: string;

80

uptime?: string;

81

uptimeMillis?: number;

82

javaVersion?: string;

83

javaVendor?: string;

84

javaVm?: string;

85

javaVmVersion?: string;

86

javaRuntime?: string;

87

javaHome?: string;

88

osName?: string;

89

osArchitecture?: string;

90

osVersion?: string;

91

fileEncoding?: string;

92

userName?: string;

93

userDir?: string;

94

userTimezone?: string;

95

userLocale?: string;

96

};

97

memoryInfo?: {

98

total?: number;

99

totalFormated?: string;

100

used?: number;

101

usedFormated?: string;

102

free?: number;

103

freePercentage?: number;

104

freeFormated?: string;

105

};

106

profileInfo?: {

107

name?: string;

108

disabledFeatures?: string[];

109

previewFeatures?: string[];

110

experimentalFeatures?: string[];

111

};

112

themes?: Record<string, string[]>;

113

socialProviders?: string[];

114

identityProviders?: string[];

115

providers?: Record<string, {

116

internal?: string[];

117

providers?: Record<string, {

118

order?: number;

119

}>;

120

}>;

121

protocolMapperTypes?: Record<string, Record<string, ProtocolMapperTypeRepresentation>>;

122

builtinProtocolMappers?: Record<string, ProtocolMapperRepresentation[]>;

123

clientInstallations?: Record<string, string>;

124

enums?: Record<string, string[]>;

125

}

126

127

interface EffectiveMessageBundleRepresentation {

128

messages?: Record<string, string>;

129

}

130

131

interface ProtocolMapperTypeRepresentation {

132

id?: string;

133

name?: string;

134

category?: string;

135

helpText?: string;

136

priority?: number;

137

properties?: ConfigPropertyRepresentation[];

138

}

139

```