Available commands in the directory module

view command

This flow allows to browse the VDoc 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.

The tree structure of the managed objects:

  • IOrganization
    • IUser
    • IGroup
  • ILocalization
    • IUser
  • IGroup
    • IUser []

Tree structure logic in the request flows

In your queries, you can define the structure (tree or not) of what you request.
For example, you may wish to retrieve:

  • 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.

Warning: the tree must be respected in the declaration of "definitions"

Scopes tag

Scopes tags allows to reduce the search area.

View URL

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

Request flow

Parameter Description
maxlevel (default: 0) 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.

examples of the view command

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>
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>
        <definition class="com.axemble.vdoc.sdk.interfaces.ILocalization" >
            <definition class="com.axemble.vdoc.sdk.interfaces.IUser" />
        </definition>
    </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 VDoc 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" external-id="00i-000001-000" login="user1"         first-name="user1"  last-name="user1"       email="user1@user1.commm"/>
            <user id="6" external-id="00i-000002-002" login="MyNewUser2"    first-name="Joe"    last-name="Tribbiani"   email="joe@friends.com"/>
            <user id="5" external-id="00i-000002-001" login="MyNewUser1"    first-name="Joe"    last-name="Tribbiani"   email="joe@friends.com"/>
            <user id="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 to retrieve detailed information on a VDoc object by using a URI protocol.

The managed objects:

  • IGroup
  • IUser

We do not manage the other objects by now because these objects do not carry any information.

Get 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: false) If true, it recovers all groups for the chosen user. false
Example
<?xml version="1.0" encoding="UTF-8"?>
<get xmlns:d1="http://www.axemble.com/vdoc/user">
    <header>
                <configuration>
                        <param name="includeGroups" value="false" />
                </configuration>
        </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 informations about a user, including the values of its extended attributes.

Note: We can also recover the localization and organization of the user and their groups (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>

For more informations about the available data types, please refer to VDoc data types in SDK flows.

For more informations about system names of standard attributes, please refer to "System names of directory attributes". xox

create command

This flow will allow us to create new objects in the directory.

For now, only the creation of a user is possible. Following the development in progress, soon it will be possible to also create an organization, a location or group.

Here is the informations you need to create a user:

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

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

For more informations about system names of standard attributes, please refer to "System names of directory attributes". xox

Create 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 VDoc 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.

Update 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.
This flow 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

Delete URL

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

Request flow

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

Example 1: 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="uri://vdoc/user/8" />
        </element>
    </body>
</delete>
Example 2: Delete an organization
<?xml version="1.0" encoding="UTF-8"?>
<delete>
    <header />
    <body>
        <element class="com.axemble.vdoc.sdk.interfaces.IOrganization">
            <header protocol-uri="uri://vdoc/organization/1" />
        </element>
    </body>
</delete>
Example 3: Delete a localization
<?xml version="1.0" encoding="UTF-8"?>
<delete>
    <header />
    <body>
        <element class="com.axemble.vdoc.sdk.interfaces.ILocalization">
            <header protocol-uri="uri://vdoc/localization/1" />
        </element>
    </body>
</delete>
Example 4: Delete a group
<?xml version="1.0" encoding="UTF-8"?>
<delete>
    <header />
    <body>
        <element class="com.axemble.vdoc.sdk.interfaces.IGroup">
            <header protocol-uri="uri://vdoc/group/1" />
        </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 VDoc directory.

Enable URL

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

Request flow

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

Example : 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 enabled[ElementName]." detail="protocol-uri" />

disable command

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

The managed object:

  • IUser
Note
Disabling organizations is not yet supported by the SDK flows.

Disable URL

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

Request flow

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

<?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 disabled[ElementName]." detail="protocol-uri" />