Platform API

<back to all web services

GetActivityFeed

Get activity feed related to the specified object.

Requires Authentication
The following routes are available for this service:
All Verbs/api/activityfeed/{ObjectId}
import 'package:servicestack/servicestack.dart';

class ActivityFeedModel implements IConvertible
{
    /**
    * Object linked to the event.
    */
    // @ApiMember(DataType="Guid", Description="Object linked to the event.", IsRequired=true, Name="ObjectId")
    String? ObjectId;

    /**
    * Event Id
    */
    // @ApiMember(DataType="Guid", Description="Event Id", IsRequired=true, Name="ActionEventId")
    String? ActionEventId;

    /**
    * Name of the object linked to the event.
    */
    // @ApiMember(DataType="string", Description="Name of the object linked to the event.", Name="ObjectName")
    String? ObjectName;

    /**
    * Event description
    */
    // @ApiMember(DataType="string", Description="Event description", Name="ActionDescription")
    String? ActionDescription;

    /**
    * Date of occurence of the event.
    */
    // @ApiMember(DataType="DateTime", Description="Date of occurence of the event.", IsRequired=true, Name="OccurredDate")
    DateTime? OccurredDate;

    /**
    * User, system or triggered
    */
    // @ApiMember(DataType="Guid", Description="User, system or triggered", Name="AuditLevelId")
    String? AuditLevelId;

    /**
    * User, system or triggered
    */
    // @ApiMember(DataType="string", Description="User, system or triggered", Name="AuditLevelName")
    String? AuditLevelName;

    ActivityFeedModel({this.ObjectId,this.ActionEventId,this.ObjectName,this.ActionDescription,this.OccurredDate,this.AuditLevelId,this.AuditLevelName});
    ActivityFeedModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ObjectId = json['ObjectId'];
        ActionEventId = json['ActionEventId'];
        ObjectName = json['ObjectName'];
        ActionDescription = json['ActionDescription'];
        OccurredDate = JsonConverters.fromJson(json['OccurredDate'],'DateTime',context!);
        AuditLevelId = json['AuditLevelId'];
        AuditLevelName = json['AuditLevelName'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ObjectId': ObjectId,
        'ActionEventId': ActionEventId,
        'ObjectName': ObjectName,
        'ActionDescription': ActionDescription,
        'OccurredDate': JsonConverters.toJson(OccurredDate,'DateTime',context!),
        'AuditLevelId': AuditLevelId,
        'AuditLevelName': AuditLevelName
    };

    getTypeName() => "ActivityFeedModel";
    TypeContext? context = _ctx;
}

// @ApiResponse(Description="Activity feed related to the object.")
class GetActivityFeedResponse implements IConvertible
{
    List<ActivityFeedModel>? ActivityFeed;
    int? TotalRecords;
    ResponseStatus? ResponseStatus;

    GetActivityFeedResponse({this.ActivityFeed,this.TotalRecords,this.ResponseStatus});
    GetActivityFeedResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ActivityFeed = JsonConverters.fromJson(json['ActivityFeed'],'List<ActivityFeedModel>',context!);
        TotalRecords = json['TotalRecords'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ActivityFeed': JsonConverters.toJson(ActivityFeed,'List<ActivityFeedModel>',context!),
        'TotalRecords': TotalRecords,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "GetActivityFeedResponse";
    TypeContext? context = _ctx;
}

/**
* Get activity feed related to the specified object.
*/
// @Api(Description="Get activity feed related to the specified object.")
class GetActivityFeed implements IConvertible
{
    /**
    * Object to get activity feed for.
    */
    // @ApiMember(Description="Object to get activity feed for.", IsRequired=true, Name="ObjectId")
    String? ObjectId;

    /**
    * User, system or triggered.
    */
    // @ApiMember(Description="User, system or triggered.", Name="ActivityFeedType")
    List<String>? ActivityFeedType;

    /**
    * Return all feeds matching criteria or paged results?
    */
    // @ApiMember(Description="Return all feeds matching criteria or paged results?", Name="IsPagedMode")
    bool? IsPagedMode;

    /**
    * Return feeds matching criteria on the specified page number if paged mode.
    */
    // @ApiMember(Description="Return feeds matching criteria on the specified page number if paged mode.", Name="PageNumber")
    int? PageNumber;

    /**
    * Number of feeds on each page if paged mode
    */
    // @ApiMember(Description="Number of feeds on each page if paged mode", Name="PageSize")
    int? PageSize;

    GetActivityFeed({this.ObjectId,this.ActivityFeedType,this.IsPagedMode,this.PageNumber,this.PageSize});
    GetActivityFeed.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ObjectId = json['ObjectId'];
        ActivityFeedType = JsonConverters.fromJson(json['ActivityFeedType'],'List<String>',context!);
        IsPagedMode = json['IsPagedMode'];
        PageNumber = json['PageNumber'];
        PageSize = json['PageSize'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ObjectId': ObjectId,
        'ActivityFeedType': JsonConverters.toJson(ActivityFeedType,'List<String>',context!),
        'IsPagedMode': IsPagedMode,
        'PageNumber': PageNumber,
        'PageSize': PageSize
    };

    getTypeName() => "GetActivityFeed";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'pfapi.pstpf.com.au', types: <String, TypeInfo> {
    'ActivityFeedModel': TypeInfo(TypeOf.Class, create:() => ActivityFeedModel()),
    'GetActivityFeedResponse': TypeInfo(TypeOf.Class, create:() => GetActivityFeedResponse()),
    'List<ActivityFeedModel>': TypeInfo(TypeOf.Class, create:() => <ActivityFeedModel>[]),
    'GetActivityFeed': TypeInfo(TypeOf.Class, create:() => GetActivityFeed()),
});

Dart GetActivityFeed 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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/activityfeed/{ObjectId} HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ObjectId":"00000000-0000-0000-0000-000000000000","ActivityFeedType":["00000000-0000-0000-0000-000000000000"],"IsPagedMode":false,"PageNumber":0,"PageSize":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ActivityFeed":[{"ObjectId":"00000000-0000-0000-0000-000000000000","ActionEventId":"00000000-0000-0000-0000-000000000000","ObjectName":"String","ActionDescription":"String","OccurredDate":"0001-01-01T00:00:00.0000000","AuditLevelId":"00000000-0000-0000-0000-000000000000","AuditLevelName":"String"}],"TotalRecords":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}