<back to all web services

UpdatePermissionsMessage

The following routes are available for this service:
All Verbs/RestApi/Sitefinity/Analytics/UpdatePermissions
import 'package:servicestack/servicestack.dart';

// @DataContract
class DashboardPermission implements IConvertible
{
    // @DataMember
    String? DashboardId;

    // @DataMember
    bool? CanView;

    DashboardPermission({this.DashboardId,this.CanView});
    DashboardPermission.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DashboardId = json['DashboardId'];
        CanView = json['CanView'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DashboardId': DashboardId,
        'CanView': CanView
    };

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

class UpdatePermissionsMessage implements IConvertible
{
    List<DashboardPermission>? DashboardIds;
    String? Username;
    String? SiteId;

    UpdatePermissionsMessage({this.DashboardIds,this.Username,this.SiteId});
    UpdatePermissionsMessage.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DashboardIds = JsonConverters.fromJson(json['DashboardIds'],'List<DashboardPermission>',context!);
        Username = json['Username'];
        SiteId = json['SiteId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DashboardIds': JsonConverters.toJson(DashboardIds,'List<DashboardPermission>',context!),
        'Username': Username,
        'SiteId': SiteId
    };

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

class UpdatePermissionsData implements IConvertible
{
    UpdatePermissionsData();
    UpdatePermissionsData.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "UpdatePermissionsData";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'DashboardPermission': TypeInfo(TypeOf.Class, create:() => DashboardPermission()),
    'UpdatePermissionsMessage': TypeInfo(TypeOf.Class, create:() => UpdatePermissionsMessage()),
    'List<DashboardPermission>': TypeInfo(TypeOf.Class, create:() => <DashboardPermission>[]),
    'UpdatePermissionsData': TypeInfo(TypeOf.Class, create:() => UpdatePermissionsData()),
});

Dart UpdatePermissionsMessage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

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

POST /RestApi/Sitefinity/Analytics/UpdatePermissions HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"DashboardIds":[{"CanView":false}],"Username":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{}