23 lines
554 B
Python
23 lines
554 B
Python
import requests
|
|
import json
|
|
|
|
url = "http://localhost:3015/documents/paginated"
|
|
headers = {
|
|
"X-API-Key": "jleu1212",
|
|
"Content-Type": "application/json",
|
|
# No X-Workspace header
|
|
}
|
|
payload = {
|
|
"page": 1,
|
|
"page_size": 10,
|
|
"status_filter": None,
|
|
"sort_field": "updated_at",
|
|
"sort_direction": "desc"
|
|
}
|
|
|
|
response = requests.post(url, headers=headers, json=payload)
|
|
print(f"Status: {response.status_code}")
|
|
if response.status_code != 200:
|
|
print(f"Error: {response.text}")
|
|
else:
|
|
print(json.dumps(response.json(), indent=2)) |