Platform API

<back to all web services

GetMediaImages

Requires Authentication
The following routes are available for this service:
All Verbs/api/mediaImages/{ObjectId}
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Eros.Saguna.Common.WebAPIModel.ServiceModels
Imports Eros.Saguna.Common.WebAPIModel.Models

Namespace Global

    Namespace Eros.Saguna.Common.WebAPIModel.Models

        Public Partial Class MediaModel
            Public Overridable Property MediaFileId As Guid
            Public Overridable Property MediaName As String
            Public Overridable Property FileContent As String
            Public Overridable Property FileContentType As String
            Public Overridable Property FilePath As String
            Public Overridable Property OriginalFileName As String
            Public Overridable Property ImageWidth As Integer
            Public Overridable Property ImageHeight As Integer
            Public Overridable Property FileSizeKB As Integer
            Public Overridable Property BlobUriRaw As String
            Public Overridable Property BlobUriFull As String
            Public Overridable Property BlobUriThumbnail As String
            Public Overridable Property WatermarkUri As String
            Public Overridable Property CapturedDate As Date
            Public Overridable Property CapturedByContactId As Guid?
            Public Overridable Property CapturedByContactName As String
            Public Overridable Property CapturedByContactThumbnailUrl As String
            Public Overridable Property Notes As String
            Public Overridable Property ResourceActionName As String
            Public Overridable Property LocationVerified As String
            Public Overridable Property TrafficLightLocationVerified As Guid
            Public Overridable Property AudienceLevel As String
            Public Overridable Property WorksFor As String
        End Class
    End Namespace

    Namespace Eros.Saguna.Common.WebAPIModel.ServiceModels

        Public Partial Class GetMediaImages
            '''<Summary>
            '''Object for which primary image is to be uploaded.
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Object for which primary image is to be uploaded.", IsRequired:=true, Name:="ObjectId")>
            Public Overridable Property ObjectId As Guid
        End Class

        <ApiResponse(Description:="Returns list of images linked to an object.")>
        Public Partial Class GetMediaImagesResponse
            Public Overridable Property Images As List(Of MediaModel)
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class
    End Namespace
End Namespace

VB.NET GetMediaImages DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/mediaImages/{ObjectId} HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"ObjectId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Images":[{"MediaFileId":"00000000-0000-0000-0000-000000000000","MediaName":"String","FileContent":"String","FileContentType":"String","FilePath":"String","OriginalFileName":"String","ImageWidth":0,"ImageHeight":0,"FileSizeKB":0,"BlobUriRaw":"String","BlobUriFull":"String","BlobUriThumbnail":"String","WatermarkUri":"String","CapturedDate":"0001-01-01T00:00:00.0000000","CapturedByContactId":"00000000000000000000000000000000","CapturedByContactName":"String","CapturedByContactThumbnailUrl":"String","Notes":"String","ResourceActionName":"String","LocationVerified":"String","TrafficLightLocationVerified":"00000000-0000-0000-0000-000000000000","AudienceLevel":"String","WorksFor":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}