Platform API

<back to all web services

GetObjectReads

Get reads (object access) for the specified object.

Requires Authentication
The following routes are available for this service:
GET/api/object/{ObjectId}/reads

export class ObjectAccessModel
{
    /** @description Object Access Read Id. */
    // @ApiMember(Description="Object Access Read Id.", Name="ObjectReadId")
    public ObjectReadId: string;

    /** @description Object Id viewing the specified Object. */
    // @ApiMember(Description="Object Id viewing the specified Object.", IsRequired=true, Name="ViewingObjectId")
    public ViewingObjectId: string;

    /** @description Name of the object viewing the specified Object. */
    // @ApiMember(Description="Name of the object viewing the specified Object.", Name="ViewingObjectName")
    public ViewingObjectName: string;

    /** @description Name of the object viewing the specified Object. */
    // @ApiMember(Description="Name of the object viewing the specified Object.", Name="ViewingObjectPrimaryImageUrl")
    public ViewingObjectPrimaryImageUrl: string;

    /** @description Id of the object being viewed. */
    // @ApiMember(Description="Id of the object being viewed.", IsRequired=true, Name="ViewedObjectId")
    public ViewedObjectId: string;

    /** @description Name of the object being viewed. */
    // @ApiMember(Description="Name of the object being viewed.", Name="ViewedObjectName")
    public ViewedObjectName: string;

    /** @description Date and Time of object read */
    // @ApiMember(Description="Date and Time of object read", Name="TimeRead")
    public TimeRead?: string;

    /** @description Date and Time object started watching the specified object. */
    // @ApiMember(Description="Date and Time object started watching the specified object.", Name="TimeStartWatching")
    public TimeStartWatching?: string;

    /** @description Date and Time of object being flagged. */
    // @ApiMember(Description="Date and Time of object being flagged.", Name="Flagged")
    public Flagged: string;

    public constructor(init?: Partial<ObjectAccessModel>) { (Object as any).assign(this, init); }
}

// @ApiResponse(Description="Returns the reads (object access) to the specified object.")
export class GetObjectReadsResponse
{
    public ObjectReads: ObjectAccessModel[];
    public ResponseStatus: ResponseStatus;

    public constructor(init?: Partial<GetObjectReadsResponse>) { (Object as any).assign(this, init); }
}

/** @description Get reads (object access) for the specified object. */
// @Api(Description="Get reads (object access) for the specified object.")
export class GetObjectReads
{
    /** @description Object Id to get object access reads for */
    // @ApiMember(DataType="Guid", Description="Object Id to get object access reads for", IsRequired=true, Name="ObjectId")
    public ObjectId: string;

    public constructor(init?: Partial<GetObjectReads>) { (Object as any).assign(this, init); }
}

TypeScript GetObjectReads 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.

GET /api/object/{ObjectId}/reads HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ObjectReads: 
	[
		{
			ViewingObjectName: String,
			ViewingObjectPrimaryImageUrl: String,
			ViewedObjectName: String,
			TimeRead: 0001-01-01,
			TimeStartWatching: 0001-01-01,
			Flagged: 0001-01-01
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}