Media Read

Description

This operation retrieves a media object associated with an Individual or Family.

URI

REST URI [GET]:
/v11.02/Media.svc/Read?SessionId={sessionId}&MediaOgfn={mediaOgfn}

Example

Request GET
http://wsdev.onegreatfamily.com/v11.02/Media.svc/Read?SessionId=ll3f3mdpag0yv2myypky2ocx&MediaOgfn=123456
Success Response Payload (the file contents) the mime type or Content-Type will be determined by the file type.
 
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

MediaOgfn

The OneGreatFamily ID for the media object to retrieve

Type: UInt64

Default: None

Constraints: Must be a valid individual ID.

Yes

SessionId

The current session Id

Type: string

Default: None

Yes

Response Elements

The only thing returned is the entity below:

Name Description

HttpResponse

This operation returns an HttpResponse (raw)

Type: HttpResponse

   

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.