Skip to content
StudyFetch API

Components

Get all components

OpenAPI specification
GET/api/v1/components

Authentication

x-api-key

Request

curl --globoff --request GET \
  --url 'https://api.example.com/api/v1/components' \
  --header 'x-api-key: <API_KEY>'

Replace credential and <field> placeholders with your own values. URL placeholders appear as %3Cfield%3E. Review the example values before sending your request.

Replace https://api.example.com with the API server URL.

Parameters

typequery · string

Filter by component type

Responses

200Components retrieved successfully
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "_id": {
        "type": "string",
        "description": "Component ID (MongoDB ObjectId)"
      },
      "componentId": {
        "type": "string",
        "description": "Unique component identifier"
      },
      "type": {
        "type": "string",
        "description": "Component type",
        "enum": [
          "chat",
          "data_analyst",
          "flashcards",
          "scenarios",
          "practice_test",
          "audio_recap",
          "tutor_me",
          "explainers",
          "uploads",
          "chat_analytics",
          "video_generation",
          "performance_insights"
        ]
      },
      "name": {
        "type": "string",
        "description": "Component name"
      },
      "description": {
        "type": "string",
        "description": "Component description"
      },
      "organization": {
        "type": "string",
        "description": "Organization ID"
      },
      "config": {
        "type": "object",
        "description": "Component configuration"
      },
      "status": {
        "type": "string",
        "description": "Component status",
        "enum": [
          "active",
          "inactive",
          "draft"
        ]
      },
      "usage": {
        "type": "object",
        "description": "Usage statistics"
      },
      "createdAt": {
        "format": "date-time",
        "type": "string",
        "description": "Creation timestamp"
      },
      "updatedAt": {
        "format": "date-time",
        "type": "string",
        "description": "Last update timestamp"
      }
    },
    "required": [
      "_id",
      "componentId",
      "type",
      "name",
      "organization",
      "config",
      "status",
      "usage",
      "createdAt",
      "updatedAt"
    ]
  }
}