/auth/v1/domains: POST
Creates a domain.
The following table shows which roles can access this REST API endpoint:
Data admin | Data user | Collection Admin | Admin | Service user |
---|---|---|---|---|
Χ | Χ | Χ | ✓ | Χ |
Synopsis of the request URL
curl -k -H 'Content-Type: application/json' -H ‘Authorization: Bearer <token>’ -X POST
https://<spectrum_discover_host>/auth/v1/domains -d ‘<json domain details>'
In case of LDAP domain, you can specify the following attributes:
- "id"
- "type"
- "host"
- "port"
- "binddn"
- "bindpassword"
- "basedn"
Supported request types and response formats
Supported request types:
- POST
- JSON
Examples
The following example shows how to create the domain and pull in a list of LDAP users.
Type LDAP
Name LDAPForum
URL ( LDAP IP or host.domainame ) ldap.forumsys.com
Port 389
user cn=read-only-admin,dc=example,dc=com
password password
Suffix / Base DN dc=example,dc=com
Group Name Attribute cn
Group Object Class
Group Tree DN ou=mathematicians,dc=example,dc=com
Username Attribute uid
User Object Class person
User Tree DN dc=example,dc=com