| GET | /api/object/{ObjectId}/reads |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
/**
* Get reads (object access) for the specified object.
*/
@Api(Description="Get reads (object access) for the specified object.")
open class GetObjectReads
{
/**
* Object Id to get object access reads for
*/
@ApiMember(DataType="Guid", Description="Object Id to get object access reads for", IsRequired=true, Name="ObjectId")
open var ObjectId:UUID? = null
}
@ApiResponse(Description="Returns the reads (object access) to the specified object.")
open class GetObjectReadsResponse
{
open var ObjectReads:ArrayList<ObjectAccessModel>? = null
open var ResponseStatus:ResponseStatus? = null
}
open class ObjectAccessModel
{
/**
* Object Access Read Id.
*/
@ApiMember(Description="Object Access Read Id.", Name="ObjectReadId")
open var ObjectReadId:UUID? = null
/**
* Object Id viewing the specified Object.
*/
@ApiMember(Description="Object Id viewing the specified Object.", IsRequired=true, Name="ViewingObjectId")
open var ViewingObjectId:UUID? = null
/**
* Name of the object viewing the specified Object.
*/
@ApiMember(Description="Name of the object viewing the specified Object.", Name="ViewingObjectName")
open var ViewingObjectName:String? = null
/**
* Name of the object viewing the specified Object.
*/
@ApiMember(Description="Name of the object viewing the specified Object.", Name="ViewingObjectPrimaryImageUrl")
open var ViewingObjectPrimaryImageUrl:String? = null
/**
* Id of the object being viewed.
*/
@ApiMember(Description="Id of the object being viewed.", IsRequired=true, Name="ViewedObjectId")
open var ViewedObjectId:UUID? = null
/**
* Name of the object being viewed.
*/
@ApiMember(Description="Name of the object being viewed.", Name="ViewedObjectName")
open var ViewedObjectName:String? = null
/**
* Date and Time of object read
*/
@ApiMember(Description="Date and Time of object read", Name="TimeRead")
open var TimeRead:Date? = null
/**
* Date and Time object started watching the specified object.
*/
@ApiMember(Description="Date and Time object started watching the specified object.", Name="TimeStartWatching")
open var TimeStartWatching:Date? = null
/**
* Date and Time of object being flagged.
*/
@ApiMember(Description="Date and Time of object being flagged.", Name="Flagged")
open var Flagged:Date? = null
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
HTTP/1.1 200 OK
Content-Type: text/csv
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"}}}