Individual Add Media

Description

Attaches a media file to an Individual (jpg,bmp or other media file).

URI

REST URI [POST]:
/v11.02/Individual.svc/MediaAdd?SessionId={sessionId}&IndiOgfn={indiOgfn}&FileName={fileName}&FileType={fileType}&title={title}

Example

Request POST
http://wsdev.onegreatfamily.com/v11.02/Individual.svc/MediaAdd?SessionId==gl4q23cwofpshi55sg1dvc3o&IndiOgfn=1345&FileName=test.jpg&FileType=jpg&Title=grannysurfing
Request Headers
Content-Type: text/raw
RRequest Payload (this is the contents of the media file)
 

Success Response Payloadd
<Result xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<Code>0</Code>
	<Message>Success</Message>
</Result>
Failed 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

IndiOgfn

Individual OGFN

Type: UInt64

Default: None

Constraints:  Must be a valid Individual ID.

Yes

FileName

Name of the media file.

Type: String

Default: None

Constraints: media file name

Yes

FileType

File type of the media file.

Type: String

Default: None

Constraints: file type i.e. jpg, bmp, gif, txt

Yes

Title

The title for the media file.

Type: String

Default: None

Constraints: None

No

SessionId

The current session Id

Type: string

Default: None

Yes

Response Elements

Name Description

Result

This operation returns a Result Entity

Type: Result

Result.Value

Result.Value will be nothing

Type: Nothing

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.