| GET,OPTIONS | /v1/pm/agents |
|---|
import 'package:servicestack/servicestack.dart';
class PmAgentItem implements IConvertible
{
String? UserId;
String? Name;
PmAgentItem({this.UserId,this.Name});
PmAgentItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserId = json['UserId'];
Name = json['Name'];
return this;
}
Map<String, dynamic> toJson() => {
'UserId': UserId,
'Name': Name
};
getTypeName() => "PmAgentItem";
TypeContext? context = _ctx;
}
class PmAgentListResponse implements IConvertible
{
List<PmAgentItem>? Agents = [];
PmAgentListResponse({this.Agents});
PmAgentListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Agents = JsonConverters.fromJson(json['Agents'],'List<PmAgentItem>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Agents': JsonConverters.toJson(Agents,'List<PmAgentItem>',context!)
};
getTypeName() => "PmAgentListResponse";
TypeContext? context = _ctx;
}
class PmAgentListRequest implements IConvertible
{
PmAgentListRequest();
PmAgentListRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "PmAgentListRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'PmAgentItem': TypeInfo(TypeOf.Class, create:() => PmAgentItem()),
'PmAgentListResponse': TypeInfo(TypeOf.Class, create:() => PmAgentListResponse()),
'List<PmAgentItem>': TypeInfo(TypeOf.Class, create:() => <PmAgentItem>[]),
'PmAgentListRequest': TypeInfo(TypeOf.Class, create:() => PmAgentListRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/pm/agents HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Agents:
[
{
UserId: String,
Name: String
}
]
}