Get AI Space Queries
This documentation is for Kyvos 2026.6.x. To view documentation for other Kyvos versions, click here. |
|---|
Overview
This API retrieves verified queries associated with a specific AI Space.
Method: GET
Request URL: {kyvos-url}/rest/v2/ai-spaces/{name-or-id}/verified-queries
Authorization
API Key: sessionid
This method authenticates requests using a session ID which acts like an API key.
BasicAuth: HTTP Authorization Scheme
This method authenticates requests using a username and password sent in the HTTP Authorization header.
Headers
Header Name | Type | Description | Possible Values |
|---|---|---|---|
sessionid | String | The session ID is the token received from the login API. Note: Session ID is required for token-based authentication. | – |
Path Parameters
Parameter Name | Type | Description | Possible Values |
|---|---|---|---|
name-or-id (Required) | String | Name or ID of the AI Space from which verified queries are to be retrieved. Note: If the AI Space name is provided, then either folderName or folderId must also be provided. | – |
Query Parameters
Parameter Name | Type | Description | Possible Values |
|---|---|---|---|
by | String | Specifies whether the name-or-id parameter should be interpreted as an AI Space name or an AI Space ID. If by=name, provide the AI Space name in the name-or-id parameter. If by=id, provide the AI Space ID in the name-or-id parameter. The default value is name. | – |
folderName | String | Name of the folder containing the AI Space. If the AI Space is present in the root directory, specify [Root]. Note: If neither folderName nor folderId is provided, the AI Space is treated as a root-level entity by default. | – |
folderId | String | ID of the folder containing the AI Space. | – |
Responses
200 Success
[
{
"question": "Give me npa rate, aum for branches opening in Financial year 2022-2023.",
"visibility": {
"groups": [],
"users": [
"Admin"
]
},
"isSampleQuestion": 1,
"origin": 0,
"context": " npa rate, aum for branches opening in Financial year ",
"id": "922A2FBE-9417-9518-1F98-3B0D427CF4E8",
"sql": "WITH BRANCH_FY2223 AS (SELECT DISTINCT branch FROM 2 Portfolio and Bounce - PROD.Portfolio and Bounce - PROD WHERE LOWER(bo fy) = LOWER('2022-2023'))\n SELECT B.branch, ROUND(SUM(CASE WHEN P.control_flag = 1 THEN P.dpd_90_plus_aum rate ELSE NULL END) * 100, 2) AS NPA_Rate,\n ROUND(SUM(CASE WHEN P.control_flag = 1 THEN P.1_plus_dpd_aum_rate ELSE NULL END) * 100, 2) AS 1+_Rate,\n ROUND(SUM(CASE WHEN P.control_flag = 1 THEN P.aum_cr ELSE NULL END), 2) AS AUM_CR\n FROM 2 Portfolio and Bounce - PROD.Portfolio and Bounce - PROD AS P\n INNER JOIN BRANCH_FY2223 AS B\n ON B.branch = P.branch WHERE P.portfolio date = (SELECT MAX(portfolio date) FROM 2 Portfolio and Bounce - PROD.Portfolio and Bounce - PROD)\n GROUP BY B.branch\n ORDER BY AUM_CR DESC, B.branch\n\n---Always keep the main table on left side as measure aggregation from the right table is not allowed."
}
]Status Code | Description |
|---|---|
401 | Authorization information is missing or invalid. |
404 | No matching record found. |
500 | Internal Server Error |