regis

<back to all web services

FacultyRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Faculty/{id}
import 'package:servicestack/servicestack.dart';

class FacultyResponse implements IConvertible
{
    ResponseStatus? responseStatus;
    int? id;
    String? first_name;
    String? last_name;

    FacultyResponse({this.responseStatus,this.id,this.first_name,this.last_name});
    FacultyResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        id = json['id'];
        first_name = json['first_name'];
        last_name = json['last_name'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
        'id': id,
        'first_name': first_name,
        'last_name': last_name
    };

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

class FacultyRequest implements IConvertible
{
    int? id;

    FacultyRequest({this.id});
    FacultyRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
    'FacultyResponse': TypeInfo(TypeOf.Class, create:() => FacultyResponse()),
    'FacultyRequest': TypeInfo(TypeOf.Class, create:() => FacultyRequest()),
});

Dart FacultyRequest 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 /Faculty/{id} HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"id":0,"first_name":"String","last_name":"String"}