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}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Field2Office.API.Model.PublicApi.Catalogs;
using Field2Office.API.Model.Catalogs;

namespace Field2Office.API.Model.Catalogs
{
    ///<summary>
    ///Contains the data for a catalog within the system.
    ///</summary>
    public partial class Catalog
    {
        public Catalog()
        {
            Ancestors = new List<string>{};
            Items = new Dictionary<string, Dictionary<String,String>>{};
        }

        public virtual string Workspace { get; set; }
        public virtual string AssignedWorkspace { get; set; }
        public virtual string ObjectId { get; set; }
        public virtual string VersionId { get; set; }
        public virtual string BasedOn { get; set; }
        public virtual string ExternalId { get; set; }
        public virtual string Created { get; set; }
        public virtual string LastUpdated { get; set; }
        public virtual string Name { get; set; }
        public virtual string Type { get; set; }
        public virtual string Parent { get; set; }
        public virtual List<string> Ancestors { get; set; }
        public virtual Dictionary<string, Dictionary<String,String>> Items { get; set; }
        public virtual bool Enabled { get; set; }
    }

}

namespace Field2Office.API.Model.PublicApi.Catalogs
{
    [DataContract]
    public partial class PublicCatalog
    {
        public PublicCatalog()
        {
            Catalogs = new List<Catalog>{};
        }

        [DataMember]
        public virtual string Workspace { get; set; }

        [DataMember]
        public virtual string CatalogType { get; set; }

        [DataMember]
        public virtual Catalog Catalog { get; set; }

        [DataMember]
        public virtual List<Catalog> Catalogs { get; set; }
    }

}

C# PublicCatalog DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
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":{}}}]}