NL Generation API
The NL Generation API allows you to manage the generation of natural language responses based on SQL queries. This API provides endpoints for creating, retrieving, and updating natural language generations.
Endpoints
1. Create Natural Language Generation
Endpoint: /api/v1/nl-generations
Method: POST
Request Body:
Description: Creates a new natural language generation configuration with optional LLM settings, maximum rows for response, and metadata.
Response:
2. Retrieve All Natural Language Generations
Endpoint: /api/v1/nl-generations
Method: GET
Description: Retrieves a list of all natural language generations.
Response:
3. Retrieve a Specific Natural Language Generation
Endpoint: /api/v1/nl-generations/{nl_generation_id}
Method: GET
Description: Retrieves the details of a specific natural language generation identified by nl_generation_id
.
Response:
4. Update a Natural Language Generation
Endpoint: /api/v1/nl-generations/{nl_generation_id}
Method: PUT
Request Body:
Description: Updates the details of an existing natural language generation identified by nl_generation_id
.
Response:
Example Usage
Creating a Natural Language Generation
To create a new natural language generation configuration, send a POST
request to /api/v1/nl-generations
:
Request:
Response:
Retrieving All Natural Language Generations
To retrieve a list of all natural language generations, send a GET
request to /api/v1/nl-generations
:
Request:
Response:
Retrieving a Specific Natural Language Generation
To retrieve a specific natural language generation, send a GET
request to /api/v1/nl-generations/{nl_generation_id}
:
Request:
Response:
Updating a Natural Language Generation
To update a natural language generation, send a PUT
request to /api/v1/nl-generations/{nl_generation_id}
:
Request:
Response:
Last updated