Generate request with AI
POST
/v1/requests/ai/generate
const url = 'https://localhost:8080/v1/requests/ai/generate';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"restrictiveness":"flexible","user_input":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://localhost:8080/v1/requests/ai/generate \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "restrictiveness": "flexible", "user_input": "example" }'Generates a request draft from free-form user input using the configured AI pipeline
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”AI request generation input
Media typeapplication/json
object
restrictiveness
required
string
user_input
required
string
Responses
Section titled “Responses”OK
Media typeapplication/json
object
data
object
business_justification
string
description
string
name
string
selected_datasources
Array<object>
object
datasets
Array<object>
object
columns
required
Array<string>
filters
object
conditions
required
Array<object>
object
column
string
op
string
raw
string
value
logic
string
joins
Array<object>
object
on
string
source
object
kind
string
name
string
type
string
rationale
string
relevance
string
source
object
kind
string
name
string
datasource
string
validity_period
string
success
boolean
Example generated
{ "data": { "business_justification": "example", "description": "example", "name": "example", "selected_datasources": [ { "datasets": [ { "columns": [ "example" ], "filters": { "conditions": [ { "column": "example", "op": "example", "raw": "example", "value": "example" } ], "logic": "example" }, "joins": [ { "on": "example", "source": { "kind": "example", "name": "example" }, "type": "example" } ], "rationale": "example", "relevance": "example", "source": { "kind": "example", "name": "example" } } ], "datasource": "example" } ], "validity_period": "example" }, "success": true}Bad Request
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Unauthorized
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Unprocessable Entity
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Gateway Timeout
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}