Create a query
post/query
Creates a query.
1{2 "content": "What is a business result?",3 "errorCode": 0,4 "id": "6fd000e3-5945-40cf-83ef-0c7fc19fcde1",5 "origin": "agent",6 "parentQueryId": "4fd000e3-5945-40cf-83ef-0c7fc19fcde1",7 "querySessionId": "21647604-55c0-4283-b5df-7e1c273d86aa",8 "response": {9 "answer": "A business result is a measurable outcome that indicates the success or progress of a company in achieving its strategic goals and objectives.",10 "context": [],11 "toolCalls": [],12 "usageMetadata": {13 "llmCompletionCost": 0.00056,14 "llmCompletionTokens": 28,15 "llmPromptCost": 0.00016,16 "llmPromptTokens": 8,17 "llmTotalCost": 0.00072,18 "llmTotalTokens": 3619 }20 },21 "target": "collection",22 "targetId": {23 "configurationIds": [24 "86cc0aae-04ed-4e0f-97d2-53e8b7dc9881",25 "079b46b9-fbc4-44ce-8cb1-163330e4d812"26 ]27 },28 "userEmail": "appadmin@example.com"29}
| Name | Type | Required | Description |
|---|---|---|---|
persistent | boolean | false | This is an indicator for whether to persist the query in the SAS Retrieval Agent Manager database. If 'true', the query persists. If 'false', the query is not retained in the database. Default: true |
synchronous | boolean | true | This is an indicator for whether the query response is returned. If 'true', this call returns the query response. If 'false', the query is executed asynchronously and the response must be fetched separately. This parameter is required. |
| Status | Meaning | Description | ||
|---|---|---|---|---|
| 200 | OK | The request succeeded. | Headers | Schema |
| 201 | Created | A resource was created. | Headers | Schema |
| 400 | Bad Request | The request was invalid. | Schema | |
| 401 | Unauthorized | The user was not authenticated. | Schema | |
| 422 | Unprocessable Entity | The server understands the request but was unable to process the contained instructions. | Schema |