MedDict-VinUni Backend API
1.1
Base URL
Local development API
http://localhost:5000
API for MedDict-VinUni Backend.
This is version 1.1
of this API documentation. Last update on Jan 14, 2024.
This API is provided under license MIT License.
Servers
Base URL | Description |
---|---|
http://localhost:5000 | Local development API |
https://api.meddict-vinuni.com | Production API |
Authentication
Retrieve words from MedDict Database from pattern
Get results of word from input, which included the definitions, illustration, etc. The pattern follows the following Regular Expression
import re
pattern = f"^.*{pattern}.*$"
Which means it will match any word that INCLUDES the pattern.
GET
/words
curl \
-X GET http://localhost:5000/words?lang=en&word=abdominal
Response examples (200)
[
{
"en": "abdominal pressure",
"en_type": "n",
"id": 8,
"vn": "áp lực khoang bụng",
"vn_type": "danh từ"
},
{
"en": "abdominal aorta",
"en_type": "n",
"id": 1,
"vn": "động mạch chủ bụng",
"vn_type": "danh từ"
},
{
"en": "abdominal aortic aneurysm",
"en_type": "n",
"id": 2,
"vn": "phình động mạch chủ bụng",
"vn_type": "danh từ"
},
{
"en": "abdominal cavity",
"en_type": "n",
"id": 3,
"vn": "khoang ổ bụng",
"vn_type": "danh từ"
},
{
"en": "abdominal decompression",
"en_type": "n",
"id": 4,
"vn": "giải áp khoang bụng",
"vn_type": "danh từ"
},
{
"en": "abdominal esophagus",
"en_type": "n",
"id": 5,
"vn": "thực quản vùng bụng",
"vn_type": "danh từ"
},
{
"en": "abdominal peritoneum",
"en_type": "n",
"id": 7,
"vn": "phúc mạc bụng",
"vn_type": "danh từ"
},
{
"en": "abdominal paracentesis",
"en_type": "n",
"id": 6,
"vn": "chọc dò ổ bụng",
"vn_type": "danh từ"
},
{
"en": "extra-abdominal",
"en_type": "a",
"id": 2452,
"vn": "ngoài bụng",
"vn_type": "tính từ"
},
{
"en": "intra-abdominal abscess",
"en_type": "n",
"id": 5515,
"vn": "áp-xe bụng trong bụng",
"vn_type": "danh từ"
},
{
"en": "tuboabdominal pregnancy",
"en_type": "n",
"id": 8727,
"vn": "mang thai lạc vị vòi tử cung-ổ bụng",
"vn_type": "danh từ"
}
]
PUT
/words
curl \
-X PUT http://localhost:5000/words \
--cookie "fastapiusersauth=$API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":1337,"en":"Software Construction","en_type":"n","vn":"Xây dựng phần mềm","vn_type":"danh từ"}'
Request example
{
"id": 1337,
"en": "Software Construction",
"en_type": "n",
"vn": "Xây dựng phần mềm",
"vn_type": "danh từ"
}
POST
/words
curl \
-X POST http://localhost:5000/words \
--cookie "fastapiusersauth=$API_KEY" \
-H "Content-Type: application/json" \
-d '{"en":"Software Construction","en_type":"n","vn":"Xây dựng phần mềm","vn_type":"danh từ"}'
Request example
{
"en": "Software Construction",
"en_type": "n",
"vn": "Xây dựng phần mềm",
"vn_type": "danh từ"
}
Response examples (201)
{
"id": 1337
}
DELETE
/words
curl \
-X DELETE http://localhost:5000/words \
--cookie "fastapiusersauth=$API_KEY" \
-H "Content-Type: application/json" \
-d '[1337,1338,1339]'
Request example
[
1337,
1338,
1339
]