Group Create

Description

The group create operation allows you to create a group record. An attempt will be made to create a new group record if the groupname is not already taken. If the groupname is already taken, then an error will be returned.

URI

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

Content-Type: Application/xml

Example

Request POST
http://wsdev.onegreatfamily.com/v11.02/Group.svc/Create?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
<Result xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<Code>0</Code>
	<Message>Success</Message>
	<Value i:type="a:unsignedLong">1855450</Value>
</Result>
ailed Response Payload
<Result xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<Code>27001</Code>
	<Message>Your developer Id does not have permissions to make this call</Message>
</Result>
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 created

Type: Group entity

Default: None

Constraints: Must be a valid entity.

Yes

Response Elements

Name Description

Result

This operation returns a Result Entity

Type: Result

Result.Value

Result.Value will be a UInt64 for the id of the the group created

Type: UInt64

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 entity. Retrieve the RestFault from the Webexception response property.