| 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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ObjectReads":[{"ObjectReadId":"00000000-0000-0000-0000-000000000000","ViewingObjectId":"00000000-0000-0000-0000-000000000000","ViewingObjectName":"String","ViewingObjectPrimaryImageUrl":"String","ViewedObjectId":"00000000-0000-0000-0000-000000000000","ViewedObjectName":"String","TimeRead":"0001-01-01T00:00:00.0000000","TimeStartWatching":"0001-01-01T00:00:00.0000000","Flagged":"0001-01-01T00:00:00.0000000"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}