Import Testset
POSThttps://cloud.agenta.ai/api/testsets/endpoint
Import JSON testset data from an endpoint and save it to MongoDB.
Args: endpoint (str): An endpoint URL to import data from. testset_name (str): the name of the testset if provided.
Returns: dict: The result of the import process.
Request
- application/x-www-form-urlencoded
Body
endpoint Endpoint (string)
testset_name Testset Name (string)
app_id App Id (string)
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
id Id (string)required
name Name (string)required
created_at Created At (string)required
{
"id": "string",
"name": "string",
"created_at": "string"
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
detail
object[]
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://cloud.agenta.ai/api/testsets/endpoint' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
ResponseClear