AddAssignmentsWithForcePrincipal |
This method adds user assignments. In this method you can mention whether the unit is a principal unit of a user or not. Automatically the assignment is published, as the dopublish element is ignored.
SOAP Request
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Body> <AddAssignmentsWithForcePrincipal xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0"> <WorkspaceID>002481F0-8E9F-11E2-EE36-A5EED1105F38</WorkspaceID> <AssignmentRoot>[Assignment Root]</AssignmentRoot> <Assignments> <dataset> <tuple xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0"> <new> <Assignment> <UnitID>001CC438-906D-11E2-EECC-49936ED1DF4B</UnitID> <RoleDN>cn=principal,cn=organizational roles,o=system,cn=cordys,o=orr.com</RoleDN> <UserDN>cn=tester1,cn=organizational users,o=system,cn=cordys,o=orr.com</UserDN> <Description/> <EffectiveDate>2013-02-13T00:00:00.0000</EffectiveDate> <FinishDate>2013-02-22T05:09:05.000</FinishDate> <IsPrincipalUnit>true</IsPrincipalUnit> </Assignment> </new> </tuple> </dataset> </Assignments> <DoPublish>true</DoPublish> <ForceSetPrincipal>true</ForceSetPrincipal> </AddAssignmentsWithForcePrincipal> </SOAP:Body> </SOAP:Envelope>
Request Parameters
Parameter |
Description |
Mandatory |
Accepted Input Value |
||
---|---|---|---|---|---|
WorkspaceID |
No |
GUID or null |
|||
AssignmentRoot |
Assignment root ID. GUID retrieved from InitializeAssignmentRoot must be used |
Yes |
GUID |
||
UnitID |
Unit ID of the assignment |
Yes |
ID of unit, usually GUID, which is retrieved using the getUnits API. |
||
RoleDN |
Role DN of the assignment. the role must exist in the unit. |
Yes |
Distinguished Name of a role. For Example, |
||
UserDN |
DN of the user to whom the task is assigned |
Yes |
Distinguished Name of the user. For example, |
||
EffectiveDate |
Date on which the assignment starts; if it is empty, there is no start date defined |
Yes |
Date in UTC format. For example 2008-09-23T22:37:53.234 |
||
FinishDate |
Date on which the assignment ends; if it is empty, the assignment does not end |
Yes |
Date in UTC format. For example 2008-09-23T22:37:53.234 |
||
IsPrincipalUnit |
Principal unit of the user |
Yes |
If the value provided is:
|
||
DoPublish |
|
Yes |
true or false |
||
ForceSetPrincipal |
Flag which is used to indicate whether any existing setting of the principal unit may be overwritten. If true, it overwrites. If false, an error is displayed that the principal has been set already. |
Yes |
true or false |
SOAP Response
<AddAssignmentsWithForcePrincipalResponse xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0"> <AddAssignmentsWithForcePrincipal> <dataset xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0"> <tuple> <new> <Assignment xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0"> <ID>001CC438-906D-11E2-EECC-951E26303F4B</ID> <UserDN>cn=mnagarjuna,cn=organizational users,o=system,cn=cordys,cn=defaultInst,o=vanenburg.com</UserDN> <EffectiveDate>2013-02-13T00:00:00.0000</EffectiveDate> <FinishDate>2013-02-22T05:09:05.000</FinishDate> <IsPrincipalUnit>true</IsPrincipalUnit> <IsEffective>yes</IsEffective> <UnitID>001CC438-906D-11E2-EECC-49936ED1DF4B</UnitID> <QName>teams/college</QName> <Name>001CC438-906D-11E2-EECC-49936ED1DF4B</Name> <RoleDN>cn=principal,cn=organizational roles,o=system,cn=cordys,cn=defaultInst,o=vanenburg.com</RoleDN> <UnitRoleID>001CC438-906D-11E2-EECC-951E262FFF4B</UnitRoleID> <IsLeadRole>true</IsLeadRole> <AssignmentRoot>001CC438-906D-11E2-EECC-8FE3BE469F4B</AssignmentRoot> </Assignment> </new> </tuple> </dataset> </AddAssignmentsWithForcePrincipal> </AddAssignmentsWithForcePrincipalResponse>
Response Parameters
Parameter |
Description |
---|---|
ID |
ID of the Assignment |
UserDN |
Distinguished name of the User |
EffectiveDate |
Date on which the assignment starts. If there is no start date, the effective date is taken as the default date. |
FinishDate |
Date on which the assignment ends. If there is no finish date, the assignment does not end. |
IsPrincipalUnit |
Principal unit of the user (true or false) |
IsEffective |
Assignment is valid, based on the calculations from the EffectiveDate and the FinishDate (true or false) |
UnitID |
ID of the organization unit |
QName |
Fully Qualified Name (FQN) of the organization unit |
Name | Name of the organization unit |
RoleDN |
Distinguished name of the Role |
UnitRoleID |
ID of the unit-role combination |
IsLeadRole |
If a role is lead role of this organization unit or not (true or false) |
AssignmentRoot |