opea-project / GenAIExamples

Generative AI Examples is a collection of GenAI examples such as ChatQnA, Copilot, which illustrate the pipeline capabilities of the Open Platform for Enterprise AI (OPEA) project.
https://opea.dev
Apache License 2.0
221 stars 138 forks source link

[Feature] API definition standardization for Dataprep Microservice #772

Open shaohef opened 1 week ago

shaohef commented 1 week ago

Priority

P2-High

OS type

Ubuntu

Hardware type

Xeon-GNR

Running nodes

Single Node

Description

As a cloud AI user, I want to call the conventional API define for Dataprep Microservice, then customer can easily to call the API.

Now, All the create, get, and delete API are POST method, they are not restful.
The list API should be curl -X GET "http://${host_ip}:6007/v1/dataprep/files" -H "Content-Type: application/json" The response should be: [ { "name": "nke-10k-2023.pdf", "id": "d2cbc287-927d-4bbc-99eb-8462c0016d73", "type": "File", "parent": "" }, { "name": "https://opea.dev.txt", "id": "ff52a547-b346-42d7-93b7-c07cd3231aca", "type": "File", "parent": "" } ] The get API should be curl -X GET "http://${host_ip}:6007/v1/dataprep/files/d2cbc287-927d-4bbc-99eb-8462c0016d73" -H "Content-Type: application/json" The response should be: { "name": "nke-10k-2023.pdf", "id": "d2cbc287-927d-4bbc-99eb-8462c0016d73", "type": "File", "parent": "" } The files is a collection, and d2cbc287-927d-4bbc-99eb-8462c0016d73 is a resource in the collection.

The delete API should be curl -X DELETE "http://${host_ip}:6007/v1/dataprep/files/d2cbc287-927d-4bbc-99eb-8462c0016d73" -H "Content-Type: application/json"

Please follow OpenAPI Specification - Version 3.1.0

kevinintel commented 1 week ago

Thanks, we will fix it