Files
xSaherelmWorkspace/Documents/Resources/Json/Requests.md
T
2026-11-05 20:10:53 +03:30

9.2 KiB

Models for Use

Authentication

Request:

{
	"password": "s@H@1694056",
	"userSelectBy": "admin"
}

Response:

{
	"accessToken": "A6590CF564437A98E8F74C72E8F2EBDD8ECCFFB345D23AAC47784350E61A0140",
	"refreshToken": "C2A8FEBCCFF737397F83F2A76CF8511EF323C7F1F4733AB882B66D51AEDFB733",
	"expiresAt": 1793628969
}

ApiKeys:

IDS RPK

xapp_WUQW1XIVNPTLXkqH9kOLKsIueXpqA_Qx9ZWJqiC2mA4

IDS MacSlim 1

xapp_xIEUusVi0dmHCLeUvUrCGh-f6EtvEbCa8dYL4nGegus

IDS MacSlim 2

xapp_sH0MbXEkCNEP9CQ_RLEkD-Fh7QhGUnzwyGcJfSmy_VY

Chat With Documents

Ingest

Response:

{
	"sessionId": "36e4d6e4-768f-4622-90d7-f79af449df9d",
	"filesCount": 9,
	"chunksCount": 208,
	"totalVectorsCount": 208,
	"skippedFiles": [],
	"expiresAtUtc": "2026-11-02T13:48:15.7779591Z"
}

Ask from Documents

Request:

{
	"sessionId": "36e4d6e4-768f-4622-90d7-f79af449df9d",
	"prompt": "give me an overview of an ai system architecture",
	"topK": 5,
	"minScore": 0.35
}

{ "prompt": "who are you ?", "projectId": "", "conversationId": "" }

{ "prompt": "what is MCP ?", "projectId": "", "conversationId": "" }

Knowledge

Retrieve Documents

Response:

[
	{
		"scope": 2,
		"scopeId": null,
		"type": "XAiKnowledge",
		"fileName": "1-ParsaPolimer-RFP-Analythic.html",
		"mimeType": "text/html",
		"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"chunksCount": 18,
		"ingestedAtUtc": "2026-11-02T05:48:59.5176187Z"
	},
	{
		"scope": 2,
		"scopeId": null,
		"type": "XAiKnowledge",
		"fileName": "2-ParsaPolimer-BigArchitecture.html",
		"mimeType": "text/html",
		"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"chunksCount": 21,
		"ingestedAtUtc": "2026-11-02T05:48:59.5176187Z"
	},
	{
		"scope": 2,
		"scopeId": null,
		"type": "XAiKnowledge",
		"fileName": "3-ParsaPolimer-BPMN2.html",
		"mimeType": "text/html",
		"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"chunksCount": 9,
		"ingestedAtUtc": "2026-11-02T05:48:59.5176187Z"
	},
	{
		"scope": 2,
		"scopeId": null,
		"type": "XAiKnowledge",
		"fileName": "4-ParsaPolimer-Roadmap.html",
		"mimeType": "text/html",
		"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"chunksCount": 28,
		"ingestedAtUtc": "2026-11-02T05:48:59.5176187Z"
	},
	{
		"scope": 2,
		"scopeId": null,
		"type": "XAiKnowledge",
		"fileName": "5-RoadmapSH.html",
		"mimeType": "text/html",
		"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"chunksCount": 24,
		"ingestedAtUtc": "2026-11-02T05:48:59.5176187Z"
	},
	{
		"scope": 2,
		"scopeId": null,
		"type": "XAiKnowledge",
		"fileName": "6-ParsaPolimer-TechnicalRoadmap.html",
		"mimeType": "text/html",
		"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"chunksCount": 28,
		"ingestedAtUtc": "2026-11-02T05:48:59.5176187Z"
	},
	{
		"scope": 2,
		"scopeId": null,
		"type": "XAiKnowledge",
		"fileName": "AI Proposal 1.html",
		"mimeType": "text/html",
		"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"chunksCount": 26,
		"ingestedAtUtc": "2026-11-02T05:48:59.5176187Z"
	},
	{
		"scope": 2,
		"scopeId": null,
		"type": "XAiKnowledge",
		"fileName": "AI Proposal 2.html",
		"mimeType": "text/html",
		"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"chunksCount": 28,
		"ingestedAtUtc": "2026-11-02T05:48:59.5176187Z"
	},
	{
		"scope": 2,
		"scopeId": null,
		"type": "XAiKnowledge",
		"fileName": "AI Proposal 3.html",
		"mimeType": "text/html",
		"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"chunksCount": 26,
		"ingestedAtUtc": "2026-11-02T05:48:59.5176187Z"
	},
	{
		"scope": 2,
		"scopeId": null,
		"type": "XAiKnowledge",
		"fileName": "AirLLM-Document.html",
		"mimeType": "text/html",
		"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"chunksCount": 8,
		"ingestedAtUtc": "2026-11-02T05:48:59.5176187Z"
	}
]

MCP Server

Add

Request:

{
	"scope": 1,
	"headers": "",
	"enabled": true,
	"timeoutSeconds": 30,
	"name": "XAiMcpServer",
	"environmentVariables": "",
	"description": "a Simple MCP Server ...",
	"endpoint": "https://localhost:7001/mcp"
}

Response:

{
	"ownerId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
	"owner": {
		"avatar": null,
		"userId": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
		"username": "admin",
		"lastname": "Khazaee Asl",
		"firstname": "Hadi"
	},
	"scope": 1,
	"name": "XAiMcpServer",
	"description": "a Simple MCP Server ...",
	"enabled": true,
	"environmentVariables": "",
	"endpoint": "https://localhost:7001/mcp",
	"headers": "",
	"timeoutSeconds": 30,
	"createdOn": "2026-11-05T09:30:12.3783202Z",
	"updatedAt": "0001-01-01T00:00:00",
	"id": "fc583f76-ae11-4f63-8d4c-72927345e4e4",
	"deleted": false
}

MCP Tool

Tools List

Request:

{
	"jsonrpc": "2.0",
	"id": 2,
	"method": "tools/list",
	"params": {}
}

Response:

{
	"jsonrpc": "2.0",
	"id": 2,
	"result": {
		"tools": [
			{
				"name": "GetCurrentDateTime",
				"description": "Get the CURRENT date and time right now. Use this tool whenever the user asks about 'today', 'now', 'current date', 'current time', or when you need the current date/time for any relative calculation (like 'three days ago', 'next week', 'how many days until...'). Returns Gregorian, Persian (Jalali), day-of-week, and Unix timestamp.",
				"inputSchema": {
					"type": "object",
					"required": [],
					"properties": {
						"timezone": {
							"type": "string",
							"description": "Optional IANA timezone (e.g. 'Asia/Tehran', 'UTC', 'Europe/London'). Defaults to 'Asia/Tehran'."
						}
					}
				}
			},
			{
				"name": "DetectDates",
				"description": "Detect and extract all date-like patterns from a free text. Supports Gregorian (2024-11-05), Persian (1403/08/15), Hijri (1446/05/03), ISO 8601, and month-name forms.",
				"inputSchema": {
					"type": "object",
					"required": ["text"],
					"properties": {
						"text": {
							"type": "string",
							"description": "Free text that may contain dates."
						},
						"calendarHint": {
							"type": "string",
							"description": "Optional: hint for the primary calendar (Gregorian, Persian, Hijri). Leave empty for auto-detection."
						}
					}
				}
			},
			{
				"name": "ParseDate",
				"description": "Parse a single date string. Returns the detected calendar, plus normalized Gregorian (ISO 8601), Persian, Hijri representations, and Unix timestamp.",
				"inputSchema": {
					"type": "object",
					"required": ["date"],
					"properties": {
						"date": {
							"type": "string",
							"description": "Date string like '1403/08/15' or '2024-11-05'."
						},
						"calendarHint": {
							"type": "string",
							"description": "Optional: calendar hint (Gregorian, Persian, Hijri). Leave empty for auto-detect."
						}
					}
				}
			},
			{
				"name": "ConvertDate",
				"description": "Convert a date from one calendar to another. Supported calendars: Gregorian, Persian (Jalali/Shamsi), Hijri (Islamic).",
				"inputSchema": {
					"type": "object",
					"required": ["date", "fromCalendar", "toCalendar"],
					"properties": {
						"date": {
							"type": "string",
							"description": "Date string in the source calendar."
						},
						"fromCalendar": {
							"type": "string",
							"description": "Source calendar: Gregorian, Persian, or Hijri."
						},
						"toCalendar": {
							"type": "string",
							"description": "Target calendar: Gregorian, Persian, or Hijri."
						}
					}
				}
			},
			{
				"name": "DateDifference",
				"description": "Calculate the difference between two dates. Returns total days, and a breakdown into years/months/days.",
				"inputSchema": {
					"type": "object",
					"required": ["date1", "date2"],
					"properties": {
						"date1": {
							"type": "string",
							"description": "First date string."
						},
						"date2": {
							"type": "string",
							"description": "Second date string."
						},
						"calendarHint": {
							"type": "string",
							"description": "Optional: calendar hint for both dates."
						}
					}
				}
			},
			{
				"name": "ToUnixTimestamp",
				"description": "Convert a date string to Unix timestamp (seconds since 1970-01-01 UTC).",
				"inputSchema": {
					"type": "object",
					"required": ["date"],
					"properties": {
						"date": {
							"type": "string",
							"description": "Date string."
						},
						"calendarHint": {
							"type": "string",
							"description": "Optional: calendar hint (Gregorian, Persian, Hijri)."
						}
					}
				}
			},
			{
				"name": "FromUnixTimestamp",
				"description": "Convert a Unix timestamp (seconds since 1970-01-01 UTC) back to a date string in the specified calendar.",
				"inputSchema": {
					"type": "object",
					"required": ["timestamp"],
					"properties": {
						"timestamp": {
							"type": "integer",
							"description": "Unix timestamp in seconds."
						},
						"targetCalendar": {
							"type": "string",
							"description": "Optional: target calendar (Gregorian, Persian, Hijri). Defaults to Gregorian."
						}
					}
				}
			},
			{
				"name": "Echo",
				"description": "Echoes the string back to the client give message in string",
				"inputSchema": {
					"type": "object",
					"required": ["message"],
					"properties": {
						"message": {
							"type": "string",
							"description": "string value which specified message"
						}
					}
				}
			}
		]
	}
}