Checking the number of users to be acquired from an Active Directory or LDAP server

Ops Center Common Services REST API Reference Guide

Version
11.0.x
Audience
anonymous
Part Number
MK-99OPS003-08
ft:lastEdition
2024-04-23
Check the number of users to be acquired from an Active Directory or LDAP server. This number is the number of users to be displayed in the Users window of the Hitachi Ops Center Portal.

Execution permission

You must be a system administrator or a security administrator.

Request line

POST base-URL/security/v1/external-user-storage-test-search-limit-exceeded

Request message

Object ID
None.
Query parameters
None.
Body
{
    "connectionUrl": "ldaps://example.com",
    "bindDn": "cn=Directory Manager",
    "bindPassword": "password",
    "baseDn": "OU=Subtree,DC=example,DC=com",
    "objectClasses": "person, organizationalPerson",
    "searchScope": "1",
    "customUserSearchFilter": "(ou=Ops Center*)",
    "usernameLDAPAttribute": "uid"
}

Attribute

Type

Description

connectionUrl

string

(Required) URL of the connection-destination Active Directory or LDAP server

bindDn

string

(Required) Bind DN

bindPassword

string

(Required) Password for the bind DN

baseDn

string

(Required) BaseDN

objectClasses

string

(Required)

For an Active Directory server

Specify person,organizationalPerson,user.

For an LDAP server

The object class of the users to be acquired

To specify multiple values, separate the values by using commas.

searchScope

string

(Required)

For an Active Directory server

Specify 2.

For an LDAP server

The range of hierarchy levels in which to search for users to be acquired

Specify either of the following.

  • 1: One level
  • 2: Subtree

customUserSearchFilter

string

(Optional) The search filter for narrowing down the users to be acquired

The syntax of the search filter conforms to RFC 2254.

usernameLDAPAttribute

string

(Required)

For an Active Directory server

Specify sAMAccountName.

For an LDAP server

LDAP attribute that uniquely identifies the user to be acquired

Response message

Body
{
    "count" : 5,
    "maxValue" : 100
}

Attribute

Type

Description

count

int

The number of users acquired from the Active Directory or LDAP server

If the number of users is greater than the value of the maxValue attribute, -1 is returned.

maxValue

int

The maximum number of users that can be displayed in the Users window of the Hitachi Ops Center Portal

Coding example

curl -v -X POST -H "Content-Type:application/json" -s "https://example.com:443/portal/security/v1/external-user-storage-test-search-limit-exceeded" -d @./request.json -H "Authorization:Bearer eyJhbxxx"
Tip: Because this request uses SSL communication, you must either run the curl command with the root certificate of the Common Services server certificate specified for the --cacert option, or run the command with the -k option specified. (The -k option runs the command by ignoring SSL errors.)