Proxy a POST request to the AI service
POST
/api/ai/{endpoint}/{configId}
const url = 'https://example.com/api/ai/example/example';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
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://example.com/api/ai/example/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'Forwards a POST request (with JSON body) to the configured AI server for the given endpoint and repository.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”endpoint
required
AI endpoint name
string
configId
required
Repository configuration ID
string
Request Body
Section titled “Request Body”Media typeapplication/json
Endpoint-specific AI request payload
object
Examplegenerated
{}Responses
Section titled “Responses”Proxied AI service response
Media typeapplication/json
object
Examplegenerated
{}Missing endpoint or config id