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}

/** @description Contains the data for a catalog within the system. */
export class Catalog
{
    public Workspace: string;
    public AssignedWorkspace: string;
    public ObjectId: string;
    public VersionId: string;
    public BasedOn: string;
    public ExternalId: string;
    public Created: string;
    public LastUpdated: string;
    public Name: string;
    public Type: string;
    public Parent: string;
    public Ancestors: string[];
    public Items: { [index: string]: { [index:string]: string; }; };
    public Enabled: boolean;

    public constructor(init?: Partial<Catalog>) { (Object as any).assign(this, init); }
}

// @DataContract
export class PublicCatalog
{
    // @DataMember
    public Workspace: string;

    // @DataMember
    public CatalogType: string;

    // @DataMember
    public Catalog: Catalog;

    // @DataMember
    public Catalogs: Catalog[];

    public constructor(init?: Partial<PublicCatalog>) { (Object as any).assign(this, init); }
}

TypeScript PublicCatalog DTOs

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

HTTP + JSV

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/jsv
Content-Type: text/jsv
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: {}
			}
		}
	]
}