const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://studyfetchapi.com/api/v1/folders/{id}/materials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"materials": [
{
"_id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"folderId": "<string>",
"contentType": "text",
"content": {
"text": "<string>",
"url": "<string>",
"s3Key": "<string>",
"s3Url": "<string>",
"filename": "<string>",
"fileSize": 123,
"mimeType": "<string>"
},
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"usage": {},
"references": [
{
"title": "Understanding Photosynthesis",
"url": "https://example.com/article"
}
]
}
],
"totalCount": 123,
"page": 123,
"totalPages": 123
}const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://studyfetchapi.com/api/v1/folders/{id}/materials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"materials": [
{
"_id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"folderId": "<string>",
"contentType": "text",
"content": {
"text": "<string>",
"url": "<string>",
"s3Key": "<string>",
"s3Url": "<string>",
"filename": "<string>",
"fileSize": 123,
"mimeType": "<string>"
},
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"usage": {},
"references": [
{
"title": "Understanding Photosynthesis",
"url": "https://example.com/article"
}
]
}
],
"totalCount": 123,
"page": 123,
"totalPages": 123
}API Key for authentication
Folder ID
Page number (default: 1)
Number of items per page (default: 20, max: 200)
Search materials by name
Materials retrieved successfully
Show child attributes
Material ID
Material name
Organization ID
Folder ID
Content type
text, pdf, video, audio, image, epub Material status
active, processing, pending_upload, error, deleted Creation timestamp
Last update timestamp
Material metadata
Usage information
Was this page helpful?