Upload File
POST/testsets/upload
Uploads a CSV or JSON file and saves its data to MongoDB.
Args: upload_type : Either a json or csv file. file (UploadFile): The CSV or JSON file to upload. testset_name (Optional): the name of the testset if provided.
Returns: dict: The result of the upload process.
Request
- multipart/form-data
Body
required
- MOD1
upload_type Upload Type (string)
file binaryrequired
testset_name
object
anyOf
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
- Array [ 
- Array [ 
- MOD1
- MOD2
- ] 
- ] 
detail
object[]
loc
object[]
required
anyOf
string
integer
msg Message (string)required
type Error Type (string)required
{
  "detail": [
    {
      "loc": [
        "string",
        0
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
Loading...