const url = 'https://studyfetchapi.com/api/v1/materials';
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}, body: undefined};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
[
{
"_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>"
},
"metadata": {},
"status": "active",
"usage": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
const url = 'https://studyfetchapi.com/api/v1/materials';
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}, body: undefined};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
[
{
"_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>"
},
"metadata": {},
"status": "active",
"usage": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
API Key for authentication
Filter by folder ID
Materials retrieved successfully
The response is of type object[]
.
Was this page helpful?