Create batch upload URLs for multiple materials
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
materials: [
{
name: 'Chapter 1',
filename: 'document.pdf',
contentType: 'application/pdf',
folderId: '<string>'
}
]
})
};
fetch('https://studyfetchapi.com/api/v1/materials/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://studyfetchapi.com/api/v1/materials/batch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"materials": [
{
"name": "Chapter 1",
"filename": "document.pdf",
"contentType": "application/pdf",
"folderId": "<string>"
}
]
}
'import requests
url = "https://studyfetchapi.com/api/v1/materials/batch"
payload = { "materials": [
{
"name": "Chapter 1",
"filename": "document.pdf",
"contentType": "application/pdf",
"folderId": "<string>"
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"name": "<string>",
"uploadUrl": "<string>",
"s3Key": "<string>",
"materialId": "<string>"
}
]Materials
Create batch upload URLs for multiple materials
POST
/
api
/
v1
/
materials
/
batch
Create batch upload URLs for multiple materials
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
materials: [
{
name: 'Chapter 1',
filename: 'document.pdf',
contentType: 'application/pdf',
folderId: '<string>'
}
]
})
};
fetch('https://studyfetchapi.com/api/v1/materials/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://studyfetchapi.com/api/v1/materials/batch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"materials": [
{
"name": "Chapter 1",
"filename": "document.pdf",
"contentType": "application/pdf",
"folderId": "<string>"
}
]
}
'import requests
url = "https://studyfetchapi.com/api/v1/materials/batch"
payload = { "materials": [
{
"name": "Chapter 1",
"filename": "document.pdf",
"contentType": "application/pdf",
"folderId": "<string>"
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"name": "<string>",
"uploadUrl": "<string>",
"s3Key": "<string>",
"materialId": "<string>"
}
]Authorizations
API Key for server-to-server authentication. Resolves to the owning organization.
Body
application/json
Array of materials to create
Show child attributes
Show child attributes
Was this page helpful?