Field Squared API Services

<back to all web services

PublicCatalog

The following routes are available for this service:
GET, PUT, POST, DELETE/{Workspace}/API/Catalog/{CatalogType}
GET, PUT, POST, DELETE/{Workspace}/API/Catalog
GET/{Workspace}/API/Catalog/Schema/{CatalogType}
import Foundation
import ServiceStack

// @DataContract
public class PublicCatalog : Codable
{
    // @DataMember
    public var workspace:String

    // @DataMember
    public var catalogType:String

    // @DataMember
    public var catalog:Catalog

    // @DataMember
    public var catalogs:[Catalog] = []

    required public init(){}
}

/**
* Contains the data for a catalog within the system.
*/
public class Catalog : Codable
{
    public var workspace:String
    public var assignedWorkspace:String
    public var objectId:String
    public var versionId:String
    public var basedOn:String
    public var externalId:String
    public var created:String
    public var lastUpdated:String
    public var name:String
    public var type:String
    public var parent:String
    public var ancestors:[String] = []
    public var items:[String:[String:String]] = [:]
    public var enabled:Bool

    required public init(){}
}


Swift PublicCatalog 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.

POST /{Workspace}/API/Catalog/{CatalogType} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Workspace":"String","CatalogType":"String","Catalog":{"CatalogType":"String","LastUpdated":"String","Created":"String","Data":{"String":{}}},"Catalogs":[{"CatalogType":"String","LastUpdated":"String","Created":"String","Data":{"String":{}}}]}