Skip to main content
GET
/
api
/
v1
/
components
Get all components
const url = 'https://studyfetchapi.com/api/v1/components';
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>",
    "componentId": "<string>",
    "type": "chat",
    "name": "<string>",
    "description": "<string>",
    "organization": "<string>",
    "config": {},
    "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

type
enum<string>

Filter by component type

Available options:
chat,
data_analyst,
flashcards,
scenarios,
practice_test,
audio_recap,
tutor_me,
explainers,
uploads,
chat_analytics

Response

200 - application/json

Components retrieved successfully

_id
string
required

Component ID (MongoDB ObjectId)

componentId
string
required

Unique component identifier

type
enum<string>
required

Component type

Available options:
chat,
data_analyst,
flashcards,
scenarios,
practice_test,
audio_recap,
tutor_me,
explainers,
uploads,
chat_analytics
name
string
required

Component name

organization
string
required

Organization ID

config
object
required

Component configuration

status
enum<string>
required

Component status

Available options:
active,
inactive,
draft
usage
object
required

Usage statistics

createdAt
string<date-time>
required

Creation timestamp

updatedAt
string<date-time>
required

Last update timestamp

description
string

Component description

I