Field Squared API Services

<back to all web services

Conversation

The following routes are available for this service:
GET,POST/{Workspace}/Conversation
GET/{Workspace}/Conversation/{ObjectId}
GET/{Workspace}/Conversation/Search/{MemberId}
GET/{Workspace}/Conversation/Search/{SearchType}/{SearchText}

export class ConversationEvent
{
    public ObjectId: string;
    public Workspace: string;
    public Date: string;
    public ConversationId: string;
    public UserId: string;
    public Text: string;
    public ThumbnailId: string;
    public IsLink: boolean;

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

export class Conversation
{
    public ObjectId: string;
    public Workspace: string;
    public TeamId: string;
    public Members: string[];
    public Events: ConversationEvent[];
    public Unread: number;
    public MemberId: string;
    public SearchType: string;
    public SearchText: string;

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

TypeScript Conversation 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}/Conversation HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ObjectId: String,
	Workspace: String,
	TeamId: String,
	Members: 
	[
		String
	],
	Events: 
	[
		{
			ObjectId: String,
			Workspace: String,
			Date: String,
			ConversationId: String,
			UserId: String,
			Text: String,
			ThumbnailId: String,
			IsLink: False
		}
	],
	Unread: 0,
	MemberId: String,
	SearchType: String,
	SearchText: String
}