Skip to content

[Feature] API definition standardization for Dataprep Microservice #772

@shaohef

Description

@shaohef

Priority

P3

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions