YM REST Services

<back to all web services

Photos

Requires Authentication
Requires any of the roles:member, oauthmember
The following routes are available for this service:
GET/Ams/{ClientID}/Member/{MemberID}/PhotosReturn the list of photos in a single post including comments.
GET/Ams/{ClientID}/Member/{MemberID}/Photos/{PhotoId}Return the data for a photo including comments.
PUT/Ams/{ClientID}/Member/{MemberID}/Photos/{PhotoId}Update a photo.
Photos Parameters:
NameParameterData TypeRequiredDescription
PhotoIdpathintNo
PostIdbodyintNo
CaptionbodystringNo
PostedBybodystringNo
MemberBaseSharedDto Parameters:
NameParameterData TypeRequiredDescription
MemberIDformintNo
BaseSharedDto Parameters:
NameParameterData TypeRequiredDescription
ClientIDformintNo
ResponseStatusformResponseStatusNo
BypassCacheformboolNo
DateCachedformDateTimeNo
DeviceformDeviceNo
PhotosResponse Parameters:
NameParameterData TypeRequiredDescription
PhotoUrlformstringNo
PostedUTCformDateTimeNo
PostedByMugshotformstringNo
GroupIDformintNo
IsOwnerformboolNo
ShareCountformintNo
LikeCountformintNo
LikedPhotoformboolNo
LikeIdformintNo
AllowCommentsformboolNo
CommentCountformintNo
PhotoCommentListformList<PhotoComment>No
CanShareformboolNo
PhotoComment Parameters:
NameParameterData TypeRequiredDescription
CommentIDformintNo
CdbIDformintNo
PostedformDateTimeNo
PostedUTCformDateTimeNo
GalleryItemIDformintNo
SchoolIDformintNo
CommentformstringNo
PostedByformstringNo
PostedByMugshotformstringNo
PostedDateformstringNo
GroupIDformintNo
IsOwnerformboolNo
LikeIDformintNo
LikedCommentformboolNo
LikeCountformintNo
SkipCrossPostformboolNo

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.

PUT /Ams/{ClientID}/Member/{MemberID}/Photos HTTP/1.1 
Host: ws.yourmembership.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	PhotoId: 0,
	PostId: 0,
	Caption: String,
	PostedBy: String,
	MemberID: 0,
	ClientID: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	BypassCache: False,
	DateCached: 2024-05-03T01:26:54.3175104-04:00,
	Device: Desktop
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	PhotoUrl: String,
	PostedUTC: 0001-01-01,
	PostedByMugshot: String,
	GroupID: 0,
	IsOwner: False,
	ShareCount: 0,
	LikeCount: 0,
	LikedPhoto: False,
	LikeId: 0,
	AllowComments: False,
	CommentCount: 0,
	PhotoCommentList: 
	[
		{
			CommentID: 0,
			CdbID: 0,
			Posted: 0001-01-01,
			PostedUTC: 0001-01-01,
			GalleryItemID: 0,
			SchoolID: 0,
			Comment: String,
			PostedBy: String,
			PostedByMugshot: String,
			PostedDate: String,
			GroupID: 0,
			IsOwner: False,
			LikeID: 0,
			LikedComment: False,
			LikeCount: 0,
			SkipCrossPost: False
		}
	],
	CanShare: False,
	PhotoId: 0,
	PostId: 0,
	Caption: String,
	PostedBy: String,
	MemberID: 0,
	ClientID: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	BypassCache: False,
	DateCached: 2024-05-03T01:26:54.3331280-04:00,
	Device: Desktop
}