| GET, PUT, POST, DELETE | /{Workspace}/API/Catalog/{CatalogType} | ||
|---|---|---|---|
| GET, PUT, POST, DELETE | /{Workspace}/API/Catalog | ||
| GET | /{Workspace}/API/Catalog/Schema/{CatalogType} |
import java.math.*
import java.util.*
import net.servicestack.client.*
@DataContract
open class PublicCatalog
{
@DataMember
var Workspace:String? = null
@DataMember
var CatalogType:String? = null
@DataMember
var Catalog:Catalog? = null
@DataMember
var Catalogs:ArrayList<Catalog> = ArrayList<Catalog>()
}
/**
* Contains the data for a catalog within the system.
*/
open class Catalog
{
var Workspace:String? = null
var AssignedWorkspace:String? = null
var ObjectId:String? = null
var VersionId:String? = null
var BasedOn:String? = null
var ExternalId:String? = null
var Created:String? = null
var LastUpdated:String? = null
var Name:String? = null
var Type:String? = null
var Parent:String? = null
var Ancestors:ArrayList<String> = ArrayList<String>()
var Items:HashMap<String,HashMap<String,String>> = HashMap<String,HashMap<String,String>>()
var Enabled:Boolean? = null
}
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}/API/Catalog/{CatalogType} HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<PublicCatalog xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.PublicApi.Catalogs">
<Catalog>
<CatalogType>String</CatalogType>
<Created>String</Created>
<Data xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringanyType>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value />
</d3p1:KeyValueOfstringanyType>
</Data>
<LastUpdated>String</LastUpdated>
</Catalog>
<CatalogType>String</CatalogType>
<Catalogs>
<Catalog>
<CatalogType>String</CatalogType>
<Created>String</Created>
<Data xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringanyType>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value />
</d4p1:KeyValueOfstringanyType>
</Data>
<LastUpdated>String</LastUpdated>
</Catalog>
</Catalogs>
<Workspace>String</Workspace>
</PublicCatalog>