| GET,POST,PUT,DELETE | /{Workspace}/Catalog/{ObjectId} | ||
|---|---|---|---|
| GET | /{Workspace}/Catalog |
import 'package:servicestack/servicestack.dart';
/**
* Contains the data for a catalog within the system.
*/
class Catalog implements IConvertible
{
String? Workspace;
String? AssignedWorkspace;
String? ObjectId;
String? VersionId;
String? BasedOn;
String? ExternalId;
String? Created;
String? LastUpdated;
String? Name;
String? Type;
String? Parent;
List<String>? Ancestors;
Map<String,Map<String,String>?>? Items;
bool? Enabled;
Catalog({this.Workspace,this.AssignedWorkspace,this.ObjectId,this.VersionId,this.BasedOn,this.ExternalId,this.Created,this.LastUpdated,this.Name,this.Type,this.Parent,this.Ancestors,this.Items,this.Enabled});
Catalog.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Workspace = json['Workspace'];
AssignedWorkspace = json['AssignedWorkspace'];
ObjectId = json['ObjectId'];
VersionId = json['VersionId'];
BasedOn = json['BasedOn'];
ExternalId = json['ExternalId'];
Created = json['Created'];
LastUpdated = json['LastUpdated'];
Name = json['Name'];
Type = json['Type'];
Parent = json['Parent'];
Ancestors = JsonConverters.fromJson(json['Ancestors'],'List<String>',context!);
Items = JsonConverters.fromJson(json['Items'],'Map<String,Map<String,String>?>',context!);
Enabled = json['Enabled'];
return this;
}
Map<String, dynamic> toJson() => {
'Workspace': Workspace,
'AssignedWorkspace': AssignedWorkspace,
'ObjectId': ObjectId,
'VersionId': VersionId,
'BasedOn': BasedOn,
'ExternalId': ExternalId,
'Created': Created,
'LastUpdated': LastUpdated,
'Name': Name,
'Type': Type,
'Parent': Parent,
'Ancestors': JsonConverters.toJson(Ancestors,'List<String>',context!),
'Items': JsonConverters.toJson(Items,'Map<String,Map<String,String>?>',context!),
'Enabled': Enabled
};
getTypeName() => "Catalog";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
'Catalog': TypeInfo(TypeOf.Class, create:() => Catalog()),
'Map<String,Map<String,String>?>': TypeInfo(TypeOf.Class, create:() => Map<String,Map<String,String>?>()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/Catalog/{ObjectId} HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<Catalog xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Catalogs">
<Ancestors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Ancestors>
<AssignedWorkspace>String</AssignedWorkspace>
<BasedOn>String</BasedOn>
<Created>String</Created>
<Enabled>false</Enabled>
<ExternalId>String</ExternalId>
<Items xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringArrayOfKeyValueOfstringstringty7Ep6D1>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>
<d2p1:KeyValueOfstringstring>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>String</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</d2p1:Value>
</d2p1:KeyValueOfstringArrayOfKeyValueOfstringstringty7Ep6D1>
</Items>
<LastUpdated>String</LastUpdated>
<Name>String</Name>
<ObjectId>String</ObjectId>
<Parent>String</Parent>
<Type>String</Type>
<VersionId>String</VersionId>
<Workspace>String</Workspace>
</Catalog>