Directory module

“view” command

This flow allows to browse the Process directory such as organizations, localizations, groups and users. The browsing is done by tree structure, thanks to structuring objects that are organization, localizations and groups.

Ce flux correspond à un parcours de l’annuaire, tel qu’il est possible de le faire dans l’interface.

The tree structure of the managed objects:

  • IOrganization
    • IUser
    • IGroup
  • ILocalization
    • IUser
  • IGroup
    • IUser

In your queries, it is possible to define the structure (tree or not) of what you request. For example:

  • All users, grouped by organization.
  • All users, grouped by localization.
  • All users in an organization.
  • All groups grouped by organization.
  • All users and groups contained in a group.

All these requests are possible with the same flow. Indeed, it’s you who will define the structure of your definition objects.

Note

The tree must be respected in the declaration of “definitions”.

Scopes tags allows to reduce the search area.

URL

http://myvdocserver/vdoc/navigation/flow?module=directory&cmd=view&_AuthenticationKey=...

Request flow

Parameter Description Mandatory
maxlevel Defaut à 0. No
If the parameter is not specified, only elements in scope are retrieved.
If the parameter is defined with a value, all elements, up to that level, are retrieved.
If the parameter is set to -1, all sub-elements (starting from the scope, if we have one) are retrieved.

Here are several possible examples. This list is not exhaustive as there are of course many possible combinations by modifying the structure of definitions and scopes.

All users, grouped by organization:

<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
    <header>
        <configuration>
            <param name="maxlevel" value="-1"/>
        </configuration>
        <definition class="com.axemble.vdoc.sdk.interfaces.IOrganization">
            <definition class="com.axemble.vdoc.sdk.interfaces.IUser"/>
        </definition>
    </header>
</view>

Tous les utilisateurs, classés par localisations :

<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
    <header>
        <configuration>
            <param name="maxlevel" value="-1"/>
        </configuration>
        <definition class="com.axemble.vdoc.sdk.interfaces.ILocalization">
            <definition class="com.axemble.vdoc.sdk.interfaces.IUser"/>
        </definition>
    </header>
</view>

All users, grouped by localization:

<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
    <header>
        <configuration>
            <param name="maxlevel" value="-1"/>
        </configuration>
        <scopes>
            <organization protocol-uri="uri://vdoc/organization/1"/>
        </scopes>
        <definition class="com.axemble.vdoc.sdk.interfaces.IUser"/>
    </header>
</view>

All users in an organization:

<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
    <header>
        <configuration>
            <param name="maxlevel" value="-1"/>
        </configuration>
        <scopes>
            <organization protocol-uri="uri://vdoc/organization/1"/>
        </scopes>
        <definition class="com.axemble.vdoc.sdk.interfaces.IUser"/>
    </header>
</view>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
    <header>
        <configuration>
            <param name="maxlevel" value="-1"/>
        </configuration>
        <scopes>
            <organization protocol-uri="uril://vdoc/organization/DefaultOrganization"/>
        </scopes>
        <definition class="com.axemble.vdoc.sdk.interfaces.IUser"/>
    </header>
</view>

All groups grouped by organization:

<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
    <header>
        <configuration>
            <param name="maxlevel" value="-1"/>
        </configuration>
        <definition class="com.axemble.vdoc.sdk.interfaces.IOrganization">
            <definition class="com.axemble.vdoc.sdk.interfaces.IGroup"/>
        </definition>
    </header>
</view>

All users and groups contained in a group:

<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
    <header>
        <configuration>
            <param name="maxlevel" value="-1"/>
        </configuration>
        <scopes>
            <group protocol-uri="uri://vdoc/group/1"/>
        </scopes>
        <definition class="com.axemble.vdoc.sdk.interfaces.IGroup">
            <definition class="com.axemble.vdoc.sdk.interfaces.IUser"/>
        </definition>
    </header>
</view>

Response flow

The returned response flow will contain you a tree structure related to your request. If we take the previous example flow “All users grouped by organization”, here’s what Process could return:

<view xmlns:vw1="http://www.axemble.com/directory/view">
    <header login="sysadmin"/>
    <body>
        <organization id="1" name="DefaultOrganization" protocol-uri="uri://vdoc/organization/1"
                      path="DefaultOrganization">
            <user id="3" protocol-uri="uri://vdoc/user/3" external-id="00i-000001-000" login="user1" first-name="user1"
                  last-name="user1" email="user1@user1.commm" language="fr" phone-number="0478000000"
                  mobile-phone-number="0600000000" fax-number="0478000001" user-function="manager"/>
            <user id="6" protocol-uri="uri://vdoc/user/6" external-id="00i-000002-002" login="MyNewUser2"
                  first-name="Joe" last-name="Tribbiani" email="joe@friends.com"/>
            <user id="5" protocol-uri="uri://vdoc/user/5" external-id="00i-000002-001" login="MyNewUser1"
                  first-name="Joe" last-name="Tribbiani" email="joe@friends.com"/>
            <user id="7" protocol-uri="uri://vdoc/user/7" external-id="00i-000003-000" login="testuser3"
                  first-name="testuser3" last-name="testuser3" email="testuser3@testuser3.com"/>
        </organization>
        <organization id="2" name="Orga2" protocol-uri="uri://vdoc/organization/2" path="Orga2"/>
    </body>
</view>

##“get” command

This flow will allow retrieving detailed information on a Process object by using a URI protocol.

The managed objects:

  • IUser
  • IGroup
Info

The other directory’s objects are not managed because these objects do not carry any information.

URL

http://myvdocserver/vdoc/navigation/flow?module=directory&cmd=get&_AuthenticationKey=...

Request flow

This flow is simple to use, you just need to forward the URI protocol and some options.

parameter Description Mandatory
includeGroups Default to false.
If true, it recovers all groups for the chosen user.
No

Example :

<?xml version="1.0" encoding="UTF-8"?>
<get xmlns:d1="http://www.axemble.com/vdoc/user">
	<header />
	<body>
		<element class="com.axemble.vdoc.sdk.interfaces.IUser">
			<header protocol-uri="uri://vdoc/user/5" />
		</element>
	</body>
</get>

Response flow

The response flow will allow to retrieve all the information about a user, including the values of its extended attributes.

Info

The user’s localization and organization and its groups are recovered (if requested in the configuration).

<get xmlns:d1="http://www.axemble.com/directory" class="com.axemble.vdoc.sdk.interfaces.IUser">
  <header id="5" login="MyNewUser1" protocol-uri="uri://vdoc/user/5"/>
  <body>
    <string name="language" value="fr"/>
    <string name="node-label" value="MyNewUser1"/>
    <string name="password-decoded"/>
    <string name="signature"/>
    <string name="country"/>
    <string name="time-zone"/>
    <string name="password" value="GoVlqdxyBIugO0FWvj5WnyJ3HyM="/>
    <string name="email" value="joe@friends.com"/>
    <string name="first-name" value="Joe"/>
    <string name="nick-name"/>
    <string name="sex"/>
    <string name="title"/>
    <string name="employee-number"/>
    <string name="contract-type"/>
    <string name="user-function"/>
    <string name="social-category"/>
    <string name="fax-number"/>
    <string name="phone-number" value="0123"/>
    <string name="mobile-phone-number"/>
    <string name="skin"/>
    <string name="address1"/>
    <string name="address2"/>
    <string name="city"/>
    <string name="zipcode"/>
    <string name="last-name" value="Tribbiani"/>
    <string name="full-name" value="Joe Tribbiani"/>
    <string name="login" value="MyNewUser1"/>
    <string name="config-language"/>
    <string name="external-native-id" value="00i-000002-001"/>
    <string name="description"/>
    <string name="security-path" value="Organization:1/User:5/"/>
    <string name="external-id"/>
    <string name="path" value="DefaultOrganization/MyNewUser1"/>
    <string name="external-class-name" value="com.axemble.vdoc.directory.domain.User"/>
    <string name="protocol-uri" value="uri://vdoc/user/5"/>
    <string name="sys_Reference" value="MyNewUser1"/>
    <string name="sys_Title" value="Joe Tribbiani"/>
    <string name="attribute1"/>
    <string name="Attr01"/>
    <date name="expiration" value=""/>
    <date name="created-date" value="2011-12-19T17:06:21.120Z"/>
    <date name="last-visite" value=""/>
    <date name="entry" value=""/>
    <date name="birthday" value=""/>
    <date name="activation-date" value=""/>
    <date name="exit" value=""/>
    <date name="expiration-date" value=""/>
    <date name="last-visited-date" value=""/>
    <date name="last-password-update" value="2011-12-19T17:06:21.107Z"/>
    <date name="created" value="2011-12-19T17:06:21.120Z"/>
    <date name="modified" value="2011-12-23T09:11:23.403Z"/>
    <date name="sys_CreationDate" value="2011-12-23T09:11:16.747Z"/>
    <date name="sys_ModificationDate" value="2011-12-23T09:11:23.637Z"/>
    <date name="date1" value=""/>
    <long name="jdo-id" value="633318697664513"/>
    <long name="security-id" value="8"/>
    <user name="created-by" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator"/>
    <user name="created-by" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator"/>
    <user name="modified-by" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator"/>
    <organization id="1" name="DefaultOrganization" protocol-uri="uri://vdoc/organization/1" path="DefaultOrganization"/>
    <localization id="1" name="DefaultLocalization" protocol-uri="uri://vdoc/localization/1" path="DefaultLocalization"/>
  </body>
</get>
Info

For more information about the available data types, please refer to “Data types”.

Info

For more information about system names of standard attributes, please refer to this section.

“create” command

This flow allows to create new objects in the directory. Following the development in progress, soon it will be possible to also create an organization, a location or group.

Here is the information needed to create a user:

  • Login
  • Password
  • Organization
  • Values of standard attributes
  • Values of extended attributes

he login, password and organization attributes will be required to create a user. The organization will go through a " scope" in the “header” tag.

Info

For more informations about system names of standard attributes, please refer to this section.

URL

http://myvdocserver/vdoc/navigation/flow?module=directory&cmd=create&_AuthenticationKey=...

Request flow

<?xml version="1.0" encoding="UTF-8"?>
<create>
	<header />
	<body>
		<element class="com.axemble.vdoc.sdk.interfaces.IUser">
			<header login="myRemoteUser" password="manager">
                                <organization protocol-uri="uri://vdoc/organization/1" />
                        </header>
			<body>
				<string name="lastName" value="RemoteUser" />
				<string name="firstName" value="My" />
				<string name="email" value="myremoteuser@directory.com" />
			</body>
		</element>
	</body>
</create>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors:

<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="User created [My RemoteUser]." detail="uri://vdoc/user/8"/>

“update” command

This flow updates an existing item in the directory. As for the creation flow, only the user can be updated.

So it will be possible to change:

  • Values of standard attributes.
  • Values of extended attributes.

URL

http://myvdocserver/vdoc/navigation/flow?module=directory&cmd=update&_AuthenticationKey=...

Request flow

The only difference compared to the flow creation, will be at the level of the header: we will provide the URI protocol of the item you wish to change.

<?xml version="1.0" encoding="UTF-8"?>
<update>
	<header />
	<body>
		<element class="com.axemble.vdoc.sdk.interfaces.IUser">
			<header protocol-uri="uri://vdoc/user/8" />
			<body>
				<string name="lastName" value="RemoteUser" />
				<string name="firstName" value="My" />
				<string name="email" value="myremoteuser@directory.com" />
                                <string name="phoneNumber" value="My new phone number" />
			</body>
		</element>
	</body>
</update>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors.

<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="User created [My RemoteUser]." detail="uri://vdoc/user/8"/>

“delete” command

This flow is very simple to use, but it must be used very carefully because it allows to remove an existing item in the directory.

It’s important to note that deleted items in the directory can’t be recovered..

The managed objects:

  • IUser
  • IOrganization
  • ILocalization
  • IGroup

URL

http://myvdocserver/vdoc/navigation/flow?module=directory&cmd=delete&_AuthenticationKey=...

Request flow

The syntax for the request flow is simple. The URI protocol of the item to delete just need to be forwarded.

Delete a user:

<?xml version="1.0" encoding="UTF-8"?>
<delete>
	<header />
	<body>
		<element class="com.axemble.vdoc.sdk.interfaces.IUser">
			<header login="" protocol-uri="" />
		</element>
	</body>
</delete>

Delete an organization:

<?xml version="1.0" encoding="UTF-8"?>
<delete>
	<header />
	<body>
		<element class="com.axemble.vdoc.sdk.interfaces.IOrganization">
			<header protocol-uri="" />
		</element>
	</body>
</delete>

Delete a localization:

<?xml version="1.0" encoding="UTF-8"?>
<delete>
	<header />
	<body>
		<element class="com.axemble.vdoc.sdk.interfaces.ILocalization">
			<header protocol-uri="" />
		</element>
	</body>
</delete>

Delete a group:

<?xml version="1.0" encoding="UTF-8"?>
<delete>
	<header />
	<body>
		<element class="com.axemble.vdoc.sdk.interfaces.IGroup">
			<header protocol-uri="" />
		</element>
	</body>
</delete>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors.:

<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Element deleted[ElementName]." detail="protocol-uri" />

“enable” command

This flow is very simple to use, it enables an object of Process directory.

The managed object: IUser.

URL

http://myvdocserver/vdoc/navigation/flow?module=directory&cmd=enable&_AuthenticationKey=...

Request flow

The syntax for the request flow is simple. The URI protocol of the item to enable just need to be forwarded.

Enabling a user:

<?xml version="1.0" encoding="UTF-8"?>
<enable>
	<header />
	<body>
		<element class="com.axemble.vdoc.sdk.interfaces.IUser">
			<header protocol-uri="uri://vdoc/user/8" />
		</element>
	</body>
</enable>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors.

<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Element deleted[ElementName]." detail="protocol-uri" />

“disable” command

This flow is very simple to use, it allows to disable an object of Process directory.

The managed object: IUser.

Info

Disabling organizations is not yet supported by the SDK flows.

URL

http://myvdocserver/vdoc/navigation/flow?module=directory&cmd=disable&_AuthenticationKey=...

Request flow

The syntax for the request flow is simple. The URI protocol of the item to disable just need to be forwarded.

<?xml version="1.0" encoding="UTF-8"?>
<disable>
	<header />
	<body>
		<element class="com.axemble.vdoc.sdk.interfaces.IUser">
			<header protocol-uri="uri://vdoc/user/8" />
		</element>
	</body>
</disable>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors:

<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Element deleted[ElementName]." detail="protocol-uri" />

Sources :