Get material by ID
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://studyfetchapi.com/api/v1/materials/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://studyfetchapi.com/api/v1/materials/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://studyfetchapi.com/api/v1/materials/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"_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"
}
]
}Materials
Get material by ID
GET
/
api
/
v1
/
materials
/
{id}
Get material by ID
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://studyfetchapi.com/api/v1/materials/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://studyfetchapi.com/api/v1/materials/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://studyfetchapi.com/api/v1/materials/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"_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"
}
]
}Authorizations
API Key for server-to-server authentication. Resolves to the owning organization.
Path Parameters
Material ID
Response
Material retrieved successfully
Material ID
Material name
Organization ID
Folder ID
Content type
Available options:
text, pdf, video, audio, image, epub Material content
Show child attributes
Show child attributes
Material status
Available options:
active, processing, pending_upload, error, deleted Creation timestamp
Last update timestamp
Material metadata
Usage information
References that this material cites
Show child attributes
Show child attributes
Was this page helpful?