POST
/
api
/
v1
/
datasources

This endpoint creates a new datasource.

HTTP Request

POST https://api.gptlab.cloud/api/v1/datasources

Request Body

The request body should contain an object with the following fields:

  • name: String (required) - The name of the datasource.
  • description: String (required) - A brief description of the datasource.
  • type: String (required) - The type of the datasource.
  • content: Optional string - The content of the datasource, if applicable.
  • url: Optional string - The URL of the datasource, if applicable.
  • metadata: Optional map from strings to any - Additional metadata for the datasource.

Response The response returns a JSON object indicating the success of the operation and details of the newly created datasource.