GET
/
api
/
v1
/
materials
Get all materials for organization
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"
  }
]

Authorizations

x-api-key
string
header
required

API Key for authentication

Query Parameters

folderId
string

Filter by folder ID

Response

200 - application/json

Materials retrieved successfully

The response is of type object[].