Group Create or Update

Description

The GroupCreateUpdate operation allows you to create or update a group record. If a UserOGFN is included as part of the Group aggregate, then an attempt will be made to update an existing record. If the GroupOGFN is not included, an attempt will be made to create a new Group record if the groupname is not already taken. If in this case the groupname is already taken, then an error will be returned.

Version

2011-02-02

URI

REST URI [POST]:
/v11.02/Group.svc/CreateUpdate?SessionId={SessionId}

Content-Type: Application/xml

Example

Request POST
http://wsdev.onegreatfamily.com/v11.02/Group.svc/CreateUpdate?SessionId=gl4q23cwofpshi55sg1dvc3o
Request Headers
Content-Type: Application/xml
Request Payload
<Group xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
  <AdminUserName>UserWSAPI</AdminUserName>
  <AnchorOgfns xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <a:unsignedLong>0</a:unsignedLong>
  </AnchorOgfns>
  <GroupOgfn>0</GroupOgfn>
  <Name>groupWSAPI</Name>
  <Password>groupWSAPI</Password>
</Group>
Success Response Payload
<Group xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
  <AdminUserName>UserWSAPI</AdminUserName>
  <AnchorOgfns xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <a:unsignedLong>0</a:unsignedLong>
  </AnchorOgfns>
  <GroupOgfn>143713</GroupOgfn>
  <Name>groupWSAPI</Name>
  <Password>groupWSAPI</Password>
</Group>
 
Fault Response Payload
<RestFault xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<ErrorCode>551</ErrorCode>
	<FaultMessage>An unhandled exception has occurred</FaultMessage>
</RestFault>

Query String Parameters

Name Description Required

SessionId

The current session Id

Type: string

Default: None

Yes

POST Payload

Name Description Required

Group

The Group record to be updated or created

Type: Group aggregate

Default: None

Constraints: Must be a valid aggregate.

Yes

Response Elements

Name Description

Group

This operation returns a Group aggregate upon success. If an update was attempted, it will be the same aggreate passed, if a create was attempted it will include the newly created GroupOGFN

Type: Group

HTTP Status Code

The Web Server returns a status code which indicates if the operation was successful. Anything other than 200 should be regarded as a failure.

HTTP Status Code of 417

The Web Server threw an exception and contains a RestFault aggregate. Retrieve the RestFault from the Webexception response property.