JavaScript
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}}; fetch('https://studyfetchapi.com/api/v1/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
Filter by 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
Was this page helpful?