Hmx Accounts

<back to all web services

GetApplications

The following routes are available for this service:
GET/api/applicationsGet active Applications
import 'package:servicestack/servicestack.dart';

class Application implements IConvertible
{
    String? id;
    String? name;
    String? token;
    String? purchaseUrl;
    bool? isActive;

    Application({this.id,this.name,this.token,this.purchaseUrl,this.isActive});
    Application.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class GetApplicationsResponse implements IConvertible
{
    List<Application>? results;

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

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

    Map<String, dynamic> toJson() => {
        'results': JsonConverters.toJson(results,'List<Application>',context!)
    };

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

class GetApplications implements IConvertible
{
    bool? isActive;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'accounts.dev.healthmonix.com', types: <String, TypeInfo> {
    'Application': TypeInfo(TypeOf.Class, create:() => Application()),
    'GetApplicationsResponse': TypeInfo(TypeOf.Class, create:() => GetApplicationsResponse()),
    'List<Application>': TypeInfo(TypeOf.Class, create:() => <Application>[]),
    'GetApplications': TypeInfo(TypeOf.Class, create:() => GetApplications()),
});

Dart GetApplications DTOs

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

HTTP + CSV

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

GET /api/applications HTTP/1.1 
Host: accounts.dev.healthmonix.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"results":[{"id":"String","name":"String","token":"String","purchaseUrl":"String","isActive":false}]}