Skip to main content

Upload File

POST 

https://cloud.agenta.ai/api/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

Body

required

    upload_type Upload Type (string)
    file binaryrequired
    testset_name Testset Name (string)
    app_id App Id (string)

Responses

Successful Response

Schema

    id Id (string)required
    name Name (string)required
    created_at Created At (string)required
curl -L -X POST 'https://cloud.agenta.ai/api/testsets/upload' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
Request Collapse all
Base URL
https://cloud.agenta.ai/api
Auth
Body required
required
file
ResponseClear

Click the Send API Request button above and see the response here!