Hi hope you can help.
I need to build a service which will bulk create users in a non-sync partition in OTDS (10.5). So, in the first instance, I am trying to create a user through the REST API examples via http://:8080/otdsws/api/?rest and also via http://:8080/otdsws/api/?v1
In either case, I try the following example body and both fail:
{
"user_partition_id": "ONLINESERVICES",
"name": "asmith",
"location": "cn=asmith,ou=Root,ou=ONLINESERVICES,ou=IdentityProviders,dc=identity,dc=opentext,dc=net",
"id": "asmith@ONLINESERVICES",
"description": "OpenText Engineer 2",
"values": [
{
"name": "schemaType",
"values": [
3
]
},
{
"name": "oTExternalID4",
"values": [
"ONLINESERVICES\\asmith"
]
},
{
"name": "oTExternalID3",
"values": [
"asmith@ONLINESERVICES"
]
},
{
"name": "oTExternalID2",
"values": [
"asmith@ONLINESERVICES"
]
},
{
"name": "oTExternalID1",
"values": [
"asmith"
]
},
{
"name": "oTGroupOfResources",
"values": [
"cn=OTAG,ou=Resources,dc=identity,dc=opentext,dc=net",
"cn=Portal 8.5,ou=Resources,dc=identity,dc=opentext,dc=net",
"cn=Content Server 10,ou=Resources,dc=identity,dc=opentext,dc=net"
]
},
{
"name": "givenName",
"values": [
"Alfonso"
]
},
{
"name": "sn",
"values": [
"Smith"
]
},
{
"name": "cn",
"values": [
"asmith"
]
},
{
"name": "oTUserID4",
"values": [
"ONLINESERVICES\\asmith"
]
},
{
"name": "description",
"values": [
"OpenText Engineer 2"
]
},
{
"name": "oTUserID3",
"values": [
"asmith@ONLINESERVICES"
]
},
{
"name": "oTUserID2",
"values": [
"asmith@ONLINESERVICES"
]
},
{
"name": "oTUserID1",
"values": [
"asmith"
]
},
{
"name": "entryDN",
"values": [
"cn=asmith,ou=Root,ou=ONLINESERVICES,ou=IdentityProviders,dc=identity,dc=opentext,dc=net"
]
},
{
"name": "oTDeleteFromResource",
"values": [
"cn=Collab,ou=Resources,dc=identity,dc=opentext,dc=net"
]
},
{
"name": "oTObjectGUID",
"values": [
"jKPvKssXT3uN0ByE7Kaf5A=="
]
}
],
"object_class": "oTPerson",
"url_id": "asmith@ONLINESERVICES",
"url_location": "cn=asmith,ou=Root,ou=ONLINESERVICES,ou=IdentityProviders,dc=identity,dc=opentext,dc=net"
}
Using the v1 url I get the following error:
{
"status": 2001,
"error": "com.opentext.otds.ds.repositoryhandler.repoconnector.impl.jndiconnector.LdapException: JNDIConnector::doCreate: [LDAP: error code 32 - Entry cn=asmith,cn=asmith,ou=Root,ou=ONLINESERVICES,ou=IdentityProviders,dc=identity,dc=opentext,dc=net cannot be added because its parent entry cn=asmith,ou=Root,ou=ONLINESERVICES,ou=IdentityProviders,dc=identity,dc=opentext,dc=net does not exist in the server]" }
and using the 'rest' url I get this error:
{
"status": -1,
"error": "com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"user_partition_id\" (class com.opentext.otds.usergroup.data.User), not marked as ignorable (9 known properties: , \"values\", \"urlLocation\", \"urlId\", \"name\", \"location\", \"objectClass\", \"userPartitionID\", \"id\", \"description\"])\n at [Source: org.apache.catalina.connector.CoyoteInputStream@1836cb4b; line: 2, column: 29] (through reference chain: com.opentext.otds.usergroup.data.User[\"user_partition_id\"])" }
In either case, I'm stuck!
Perhaps the format of the body is incorrect, but this seems to follow the schema and more over I created a user manually in OTDS, then did a '/users' call and got back the body that I then used for the template which matched the schema.
Can you point me in the right direction.
Thanks,
Anthony
P.S. Currently using the swagger integrated javadocs on my server