Memento
Mementos cho phép người dùng định nghĩa các bộ sưu tập tài liệu có thể được truy cập bởi các ứng dụng. Tài liệu này phác thảo các API Memento có sẵn.
Danh sách Memento
Ví dụ Yêu cầu
curl -X GET \
https://api.rememberizer.ai/api/v1/mementos/ \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Tạo Memento
Ví dụ Yêu Cầu
curl -X POST \
https://api.rememberizer.ai/api/v1/mementos/ \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Tài liệu Công việc"}'
Lấy Chi Tiết Memento
Ví dụ Yêu cầu
curl -X GET \
https://api.rememberizer.ai/api/v1/mementos/123/ \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Quản lý Tài liệu Memento
Ví dụ Yêu cầu
curl -X POST \
https://api.rememberizer.ai/api/v1/mementos/memento_document/123/ \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"memento": "123",
"add": ["document_id_1", "document_id_2"],
"folder_add": ["folder_id_1"],
"remove": ["document_id_3"]
}'
Xóa Memento
Ví dụ Yêu cầu
curl -X DELETE \
https://api.rememberizer.ai/api/v1/mementos/123/ \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
const deleteMemento = async (mementoId) => {
const response = await fetch(`https://api.rememberizer.ai/api/v1/mementos/${mementoId}/`, {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_JWT_TOKEN'
}
});
if (response.status === 204) {
console.log("Memento đã được xóa thành công");
} else {
console.error("Xóa memento không thành công");
}
};
deleteMemento(123);
import requests
def delete_memento(memento_id):
headers = {
"Authorization": "Bearer YOUR_JWT_TOKEN"
}
response = requests.delete(
f"https://api.rememberizer.ai/api/v1/mementos/{memento_id}/",
headers=headers
)
if response.status_code == 204:
print("Memento đã được xóa thành công")
else:
print("Xóa memento không thành công")
delete_memento(123)
{% endtabs %
Last updated