Platform API

<back to all web services

GetMediaImages

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

namespace Eros.Saguna.Common.WebAPIModel.Models
{
    public partial class MediaModel
    {
        public virtual Guid MediaFileId { get; set; }
        public virtual string MediaName { get; set; }
        public virtual string FileContent { get; set; }
        public virtual string FileContentType { get; set; }
        public virtual string FilePath { get; set; }
        public virtual string OriginalFileName { get; set; }
        public virtual int ImageWidth { get; set; }
        public virtual int ImageHeight { get; set; }
        public virtual int FileSizeKB { get; set; }
        public virtual string BlobUriRaw { get; set; }
        public virtual string BlobUriFull { get; set; }
        public virtual string BlobUriThumbnail { get; set; }
        public virtual string WatermarkUri { get; set; }
        public virtual DateTime CapturedDate { get; set; }
        public virtual Guid? CapturedByContactId { get; set; }
        public virtual string CapturedByContactName { get; set; }
        public virtual string CapturedByContactThumbnailUrl { get; set; }
        public virtual string Notes { get; set; }
        public virtual string ResourceActionName { get; set; }
        public virtual string LocationVerified { get; set; }
        public virtual Guid TrafficLightLocationVerified { get; set; }
        public virtual string AudienceLevel { get; set; }
        public virtual string WorksFor { get; set; }
    }

}

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 virtual Guid ObjectId { get; set; }
    }

    [ApiResponse(Description="Returns list of images linked to an object.")]
    public partial class GetMediaImagesResponse
    {
        public virtual List<MediaModel> Images { get; set; }
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

C# GetMediaImages DTOs

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

HTTP + JSV

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/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Images: 
	[
		{
			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-01,
			CapturedByContactId: 00000000000000000000000000000000,
			CapturedByContactName: String,
			CapturedByContactThumbnailUrl: String,
			Notes: String,
			ResourceActionName: String,
			LocationVerified: String,
			AudienceLevel: String,
			WorksFor: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}