curl --request GET \
--url https://api.example.com/api/content/admin/all{
"content": [
{
"_id": "<string>",
"title": "<string>",
"description": "<string>",
"type": "<string>",
"category": "<string>",
"price": 123,
"fileUrl": "<string>",
"filePublicId": "<string>",
"thumbnailUrl": "<string>",
"thumbnailPublicId": "<string>",
"duration": 123,
"fileSize": 123,
"status": "<string>",
"tags": [
{}
],
"createdBy": {
"_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"totalPages": 123,
"currentPage": 123,
"totalContent": 123
}Retrieve all content including drafts (admin only)
curl --request GET \
--url https://api.example.com/api/content/admin/all{
"content": [
{
"_id": "<string>",
"title": "<string>",
"description": "<string>",
"type": "<string>",
"category": "<string>",
"price": 123,
"fileUrl": "<string>",
"filePublicId": "<string>",
"thumbnailUrl": "<string>",
"thumbnailPublicId": "<string>",
"duration": 123,
"fileSize": 123,
"status": "<string>",
"tags": [
{}
],
"createdBy": {
"_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"totalPages": 123,
"currentPage": 123,
"totalContent": 123
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/PhemiT/vaniykeempire-api/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer <admin_access_token>
"draft" or "published""pdf", "video", or "audio"curl -X GET "https://api.vaniykempire.com/api/content/admin/all?page=1&limit=10" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
curl -X GET "https://api.vaniykempire.com/api/content/admin/all?status=draft&page=1&limit=20" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
const response = await fetch(
'https://api.vaniykempire.com/api/content/admin/all?page=1&limit=10',
{
headers: {
'Authorization': `Bearer ${adminAccessToken}`
}
}
);
const data = await response.json();
console.log(`Total content: ${data.totalContent}`);
console.log(`Content items:`, data.content);
import requests
response = requests.get(
'https://api.vaniykempire.com/api/content/admin/all',
headers={'Authorization': f'Bearer {admin_access_token}'},
params={
'page': 1,
'limit': 10,
'status': 'draft'
}
)
data = response.json()
print(f"Total content: {data['totalContent']}")
Show content item properties
"pdf", "video", or "audio""draft" or "published"{
"content": [
{
"_id": "65f7b3c8e1234567890abcde",
"title": "Advanced JavaScript Course",
"description": "Learn modern JavaScript",
"type": "video",
"category": "programming",
"price": 49.99,
"fileUrl": "https://res.cloudinary.com/demo/video/upload/v1234567890/content/video.mp4",
"filePublicId": "content/video",
"thumbnailUrl": "https://res.cloudinary.com/demo/image/upload/v1234567890/thumbnails/thumb.jpg",
"thumbnailPublicId": "thumbnails/thumb",
"duration": 3600,
"fileSize": 524288000,
"status": "published",
"tags": ["javascript", "programming", "web-development"],
"createdBy": {
"_id": "65f7b3c8e1234567890abc00",
"name": "Admin User",
"email": "admin@example.com"
},
"createdAt": "2024-03-15T10:30:00.000Z",
"updatedAt": "2024-03-15T10:30:00.000Z"
}
],
"totalPages": 5,
"currentPage": 1,
"totalContent": 47
}
{
"error": "Invalid token"
}
{
"error": "Admin access required"
}
{
"error": "Internal server error message"
}
fileUrl and filePublicId fields which are hidden from public endpoints. Only use this endpoint for admin dashboards./api/content endpoint, this returns both draft and published content. Use the status query parameter to filter.