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
"use strict";
export class ObjectAccessModel {
    /** @param {{ObjectReadId?:string,ViewingObjectId?:string,ViewingObjectName?:string,ViewingObjectPrimaryImageUrl?:string,ViewedObjectId?:string,ViewedObjectName?:string,TimeRead?:string,TimeStartWatching?:string,Flagged?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Object Access Read Id. */
    ObjectReadId;
    /**
     * @type {string}
     * @description Object Id viewing the specified Object. */
    ViewingObjectId;
    /**
     * @type {string}
     * @description Name of the object viewing the specified Object. */
    ViewingObjectName;
    /**
     * @type {string}
     * @description Name of the object viewing the specified Object. */
    ViewingObjectPrimaryImageUrl;
    /**
     * @type {string}
     * @description Id of the object being viewed. */
    ViewedObjectId;
    /**
     * @type {string}
     * @description Name of the object being viewed. */
    ViewedObjectName;
    /**
     * @type {?string}
     * @description Date and Time of object read */
    TimeRead;
    /**
     * @type {?string}
     * @description Date and Time object started watching the specified object. */
    TimeStartWatching;
    /**
     * @type {string}
     * @description Date and Time of object being flagged. */
    Flagged;
}
export class GetObjectReadsResponse {
    /** @param {{ObjectReads?:ObjectAccessModel[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ObjectAccessModel[]} */
    ObjectReads;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class GetObjectReads {
    /** @param {{ObjectId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Object Id to get object access reads for */
    ObjectId;
}

JavaScript 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
		}
	}
}