36648 lines
1001 KiB
JSON
36648 lines
1001 KiB
JSON
{
|
|
"components": {
|
|
"schemas": {
|
|
"AICreditsSummary": {
|
|
"description": "AI credits summary response.",
|
|
"properties": {
|
|
"base_credits": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"title": "Base Credits"
|
|
},
|
|
"mode": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Mode"
|
|
},
|
|
"plan": {
|
|
"title": "Plan",
|
|
"type": "string"
|
|
},
|
|
"purchased_credits": {
|
|
"title": "Purchased Credits",
|
|
"type": "integer"
|
|
},
|
|
"remaining_credits": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"title": "Remaining Credits"
|
|
},
|
|
"total_credits": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"title": "Total Credits"
|
|
},
|
|
"used_credits": {
|
|
"title": "Used Credits",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"plan",
|
|
"base_credits",
|
|
"purchased_credits",
|
|
"total_credits",
|
|
"used_credits",
|
|
"remaining_credits"
|
|
],
|
|
"title": "AICreditsSummary",
|
|
"type": "object"
|
|
},
|
|
"AIOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
},
|
|
"model": {
|
|
"default": "",
|
|
"title": "Model",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "AIOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"APIOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "APIOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"APITokenCreate": {
|
|
"description": "Model for creating a new API token",
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"expires_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Expires At"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"rights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Rights"
|
|
},
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Rights"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "APITokenCreate",
|
|
"type": "object"
|
|
},
|
|
"APITokenCreatedResponse": {
|
|
"description": "Response model when a new API token is created.\nThis is the ONLY time the full token is shown.",
|
|
"properties": {
|
|
"created_by_user_id": {
|
|
"title": "Created By User Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"expires_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Expires At"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"rights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Rights"
|
|
},
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Rights"
|
|
},
|
|
"token": {
|
|
"title": "Token",
|
|
"type": "string"
|
|
},
|
|
"token_prefix": {
|
|
"title": "Token Prefix",
|
|
"type": "string"
|
|
},
|
|
"token_uuid": {
|
|
"title": "Token Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"token",
|
|
"token_uuid",
|
|
"name",
|
|
"token_prefix",
|
|
"org_id",
|
|
"created_by_user_id",
|
|
"creation_date"
|
|
],
|
|
"title": "APITokenCreatedResponse",
|
|
"type": "object"
|
|
},
|
|
"APITokenRead": {
|
|
"description": "Model for reading an API token (without sensitive data)",
|
|
"properties": {
|
|
"created_by_user_id": {
|
|
"title": "Created By User Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"expires_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Expires At"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"is_active": {
|
|
"title": "Is Active",
|
|
"type": "boolean"
|
|
},
|
|
"last_used_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Used At"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"rights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Rights"
|
|
},
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Rights"
|
|
},
|
|
"token_prefix": {
|
|
"title": "Token Prefix",
|
|
"type": "string"
|
|
},
|
|
"token_uuid": {
|
|
"title": "Token Uuid",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"token_uuid",
|
|
"name",
|
|
"token_prefix",
|
|
"org_id",
|
|
"created_by_user_id",
|
|
"creation_date",
|
|
"update_date",
|
|
"is_active"
|
|
],
|
|
"title": "APITokenRead",
|
|
"type": "object"
|
|
},
|
|
"APITokenUpdate": {
|
|
"description": "Model for updating an API token",
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"expires_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Expires At"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"rights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Rights"
|
|
},
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Rights"
|
|
}
|
|
},
|
|
"title": "APITokenUpdate",
|
|
"type": "object"
|
|
},
|
|
"ActivatePackRequest": {
|
|
"properties": {
|
|
"pack_id": {
|
|
"title": "Pack Id",
|
|
"type": "string"
|
|
},
|
|
"platform_subscription_id": {
|
|
"title": "Platform Subscription Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"pack_id",
|
|
"platform_subscription_id"
|
|
],
|
|
"title": "ActivatePackRequest",
|
|
"type": "object"
|
|
},
|
|
"ActivityAIChatSessionResponse": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"aichat_uuid": {
|
|
"title": "Aichat Uuid",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"aichat_uuid",
|
|
"activity_uuid",
|
|
"message"
|
|
],
|
|
"title": "ActivityAIChatSessionResponse",
|
|
"type": "object"
|
|
},
|
|
"ActivityCompletionResponse": {
|
|
"description": "Result of marking an activity as completed.",
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"completed": {
|
|
"title": "Completed",
|
|
"type": "boolean"
|
|
},
|
|
"course_completed": {
|
|
"description": "True if this completion finished the entire course",
|
|
"title": "Course Completed",
|
|
"type": "boolean"
|
|
},
|
|
"is_new_completion": {
|
|
"description": "True if this was a new completion (not already completed)",
|
|
"title": "Is New Completion",
|
|
"type": "boolean"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity_uuid",
|
|
"user_id",
|
|
"completed",
|
|
"is_new_completion",
|
|
"course_completed"
|
|
],
|
|
"title": "ActivityCompletionResponse",
|
|
"type": "object"
|
|
},
|
|
"ActivityCreate": {
|
|
"properties": {
|
|
"activity_sub_type": {
|
|
"$ref": "#/components/schemas/ActivitySubTypeEnum",
|
|
"default": "SUBTYPE_CUSTOM"
|
|
},
|
|
"activity_type": {
|
|
"$ref": "#/components/schemas/ActivityTypeEnum",
|
|
"default": "TYPE_CUSTOM"
|
|
},
|
|
"chapter_id": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
},
|
|
"content": {
|
|
"additionalProperties": true,
|
|
"title": "Content",
|
|
"type": "object"
|
|
},
|
|
"details": {
|
|
"additionalProperties": true,
|
|
"title": "Details",
|
|
"type": "object"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"lock_type": {
|
|
"$ref": "#/components/schemas/ActivityLockType",
|
|
"default": "public"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"published": {
|
|
"default": false,
|
|
"title": "Published",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"chapter_id"
|
|
],
|
|
"title": "ActivityCreate",
|
|
"type": "object"
|
|
},
|
|
"ActivityLockType": {
|
|
"enum": [
|
|
"public",
|
|
"authenticated",
|
|
"restricted"
|
|
],
|
|
"title": "ActivityLockType",
|
|
"type": "string"
|
|
},
|
|
"ActivityOrder": {
|
|
"properties": {
|
|
"activity_id": {
|
|
"title": "Activity Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity_id"
|
|
],
|
|
"title": "ActivityOrder",
|
|
"type": "object"
|
|
},
|
|
"ActivityPlan": {
|
|
"description": "Plan for a single activity within a chapter",
|
|
"properties": {
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"suggested_blocks": {
|
|
"default": [],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Suggested Blocks",
|
|
"type": "array"
|
|
},
|
|
"type": {
|
|
"default": "TYPE_DYNAMIC",
|
|
"title": "Type",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"description"
|
|
],
|
|
"title": "ActivityPlan",
|
|
"type": "object"
|
|
},
|
|
"ActivityRead": {
|
|
"properties": {
|
|
"activity_sub_type": {
|
|
"$ref": "#/components/schemas/ActivitySubTypeEnum"
|
|
},
|
|
"activity_type": {
|
|
"$ref": "#/components/schemas/ActivityTypeEnum"
|
|
},
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"additionalProperties": true,
|
|
"title": "Content",
|
|
"type": "object"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"current_version": {
|
|
"default": 1,
|
|
"title": "Current Version",
|
|
"type": "integer"
|
|
},
|
|
"details": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Details"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"is_locked": {
|
|
"default": false,
|
|
"title": "Is Locked",
|
|
"type": "boolean"
|
|
},
|
|
"last_modified_by_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Modified By Id"
|
|
},
|
|
"last_modified_by_username": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Modified By Username"
|
|
},
|
|
"lock_type": {
|
|
"$ref": "#/components/schemas/ActivityLockType",
|
|
"default": "public"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"published": {
|
|
"default": false,
|
|
"title": "Published",
|
|
"type": "boolean"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"activity_type",
|
|
"activity_sub_type",
|
|
"id",
|
|
"org_id",
|
|
"course_id",
|
|
"activity_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "ActivityRead",
|
|
"type": "object"
|
|
},
|
|
"ActivityStateRead": {
|
|
"description": "Lightweight model for checking activity state for conflict detection.\nUsed to check if remote state has changed since user started editing.",
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"current_version": {
|
|
"title": "Current Version",
|
|
"type": "integer"
|
|
},
|
|
"last_modified_by_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Modified By Id"
|
|
},
|
|
"last_modified_by_username": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Modified By Username"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity_uuid",
|
|
"update_date",
|
|
"current_version"
|
|
],
|
|
"title": "ActivityStateRead",
|
|
"type": "object"
|
|
},
|
|
"ActivitySubTypeEnum": {
|
|
"enum": [
|
|
"SUBTYPE_DYNAMIC_PAGE",
|
|
"SUBTYPE_DYNAMIC_MARKDOWN",
|
|
"SUBTYPE_DYNAMIC_EMBED",
|
|
"SUBTYPE_VIDEO_YOUTUBE",
|
|
"SUBTYPE_VIDEO_HOSTED",
|
|
"SUBTYPE_DOCUMENT_PDF",
|
|
"SUBTYPE_DOCUMENT_DOC",
|
|
"SUBTYPE_ASSIGNMENT_ANY",
|
|
"SUBTYPE_CUSTOM",
|
|
"SUBTYPE_SCORM_12",
|
|
"SUBTYPE_SCORM_2004"
|
|
],
|
|
"title": "ActivitySubTypeEnum",
|
|
"type": "string"
|
|
},
|
|
"ActivityTypeEnum": {
|
|
"enum": [
|
|
"TYPE_VIDEO",
|
|
"TYPE_DOCUMENT",
|
|
"TYPE_DYNAMIC",
|
|
"TYPE_ASSIGNMENT",
|
|
"TYPE_CUSTOM",
|
|
"TYPE_SCORM"
|
|
],
|
|
"title": "ActivityTypeEnum",
|
|
"type": "string"
|
|
},
|
|
"ActivityUncompletionResponse": {
|
|
"description": "Result of removing an activity completion.",
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"completed": {
|
|
"default": false,
|
|
"title": "Completed",
|
|
"type": "boolean"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity_uuid",
|
|
"user_id"
|
|
],
|
|
"title": "ActivityUncompletionResponse",
|
|
"type": "object"
|
|
},
|
|
"ActivityUpdate": {
|
|
"properties": {
|
|
"activity_sub_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ActivitySubTypeEnum"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"activity_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ActivityTypeEnum"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"content": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Content"
|
|
},
|
|
"details": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Details"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"lock_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ActivityLockType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"published": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Published"
|
|
},
|
|
"published_version": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Published Version"
|
|
},
|
|
"version": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Version"
|
|
}
|
|
},
|
|
"title": "ActivityUpdate",
|
|
"type": "object"
|
|
},
|
|
"ActivityVersionRead": {
|
|
"description": "Read model for activity versions",
|
|
"properties": {
|
|
"activity_id": {
|
|
"title": "Activity Id",
|
|
"type": "integer"
|
|
},
|
|
"content": {
|
|
"additionalProperties": true,
|
|
"title": "Content",
|
|
"type": "object"
|
|
},
|
|
"created_at": {
|
|
"format": "date-time",
|
|
"title": "Created At",
|
|
"type": "string"
|
|
},
|
|
"created_by_avatar": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Created By Avatar"
|
|
},
|
|
"created_by_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Created By Id"
|
|
},
|
|
"created_by_username": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Created By Username"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"version_number": {
|
|
"title": "Version Number",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"version_number",
|
|
"id",
|
|
"activity_id",
|
|
"org_id",
|
|
"created_at"
|
|
],
|
|
"title": "ActivityVersionRead",
|
|
"type": "object"
|
|
},
|
|
"AddCreditsRequest": {
|
|
"description": "Request body for adding AI credits.",
|
|
"properties": {
|
|
"amount": {
|
|
"title": "Amount",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"amount"
|
|
],
|
|
"title": "AddCreditsRequest",
|
|
"type": "object"
|
|
},
|
|
"AddCreditsResponse": {
|
|
"description": "Response for adding AI credits.",
|
|
"properties": {
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"new_purchased_total": {
|
|
"title": "New Purchased Total",
|
|
"type": "integer"
|
|
},
|
|
"success": {
|
|
"title": "Success",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"success",
|
|
"new_purchased_total",
|
|
"message"
|
|
],
|
|
"title": "AddCreditsResponse",
|
|
"type": "object"
|
|
},
|
|
"AdditionalFile": {
|
|
"properties": {
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"content"
|
|
],
|
|
"title": "AdditionalFile",
|
|
"type": "object"
|
|
},
|
|
"AnalyticsOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "AnalyticsOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"AnonymizeUserResponse": {
|
|
"properties": {
|
|
"anonymized_email": {
|
|
"title": "Anonymized Email",
|
|
"type": "string"
|
|
},
|
|
"api_tokens_revoked": {
|
|
"title": "Api Tokens Revoked",
|
|
"type": "integer"
|
|
},
|
|
"detail": {
|
|
"title": "Detail",
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"detail",
|
|
"user_id",
|
|
"anonymized_email",
|
|
"api_tokens_revoked"
|
|
],
|
|
"title": "AnonymizeUserResponse",
|
|
"type": "object"
|
|
},
|
|
"AssignmentCreate": {
|
|
"description": "Model for creating a new assignment.",
|
|
"properties": {
|
|
"activity_id": {
|
|
"title": "Activity Id",
|
|
"type": "integer"
|
|
},
|
|
"allow_retries": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Allow Retries"
|
|
},
|
|
"anti_copy_paste": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Anti Copy Paste"
|
|
},
|
|
"auto_grading": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Auto Grading"
|
|
},
|
|
"chapter_id": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"due_date": {
|
|
"title": "Due Date",
|
|
"type": "string"
|
|
},
|
|
"grading_type": {
|
|
"$ref": "#/components/schemas/GradingTypeEnum"
|
|
},
|
|
"max_retries": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": 0,
|
|
"title": "Max Retries"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"published": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Published"
|
|
},
|
|
"show_correct_answers": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Show Correct Answers"
|
|
},
|
|
"title": {
|
|
"title": "Title",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"title",
|
|
"description",
|
|
"due_date",
|
|
"grading_type",
|
|
"org_id",
|
|
"course_id",
|
|
"chapter_id",
|
|
"activity_id"
|
|
],
|
|
"title": "AssignmentCreate",
|
|
"type": "object"
|
|
},
|
|
"AssignmentOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": false,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "AssignmentOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"AssignmentRead": {
|
|
"description": "Model for reading an assignment.",
|
|
"properties": {
|
|
"activity_id": {
|
|
"title": "Activity Id",
|
|
"type": "integer"
|
|
},
|
|
"activity_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Activity Uuid"
|
|
},
|
|
"allow_retries": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Allow Retries"
|
|
},
|
|
"anti_copy_paste": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Anti Copy Paste"
|
|
},
|
|
"assignment_uuid": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
},
|
|
"auto_grading": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Auto Grading"
|
|
},
|
|
"chapter_id": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"course_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Uuid"
|
|
},
|
|
"creation_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Creation Date"
|
|
},
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"due_date": {
|
|
"title": "Due Date",
|
|
"type": "string"
|
|
},
|
|
"grading_type": {
|
|
"$ref": "#/components/schemas/GradingTypeEnum"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"max_retries": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": 0,
|
|
"title": "Max Retries"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"published": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Published"
|
|
},
|
|
"show_correct_answers": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Show Correct Answers"
|
|
},
|
|
"title": {
|
|
"title": "Title",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Update Date"
|
|
}
|
|
},
|
|
"required": [
|
|
"title",
|
|
"description",
|
|
"due_date",
|
|
"grading_type",
|
|
"org_id",
|
|
"course_id",
|
|
"chapter_id",
|
|
"activity_id",
|
|
"id",
|
|
"assignment_uuid"
|
|
],
|
|
"title": "AssignmentRead",
|
|
"type": "object"
|
|
},
|
|
"AssignmentTaskCreate": {
|
|
"description": "Model for creating a new assignment task.",
|
|
"properties": {
|
|
"assignment_type": {
|
|
"$ref": "#/components/schemas/AssignmentTaskTypeEnum"
|
|
},
|
|
"contents": {
|
|
"additionalProperties": true,
|
|
"title": "Contents",
|
|
"type": "object"
|
|
},
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"hint": {
|
|
"title": "Hint",
|
|
"type": "string"
|
|
},
|
|
"max_grade_value": {
|
|
"default": 100,
|
|
"title": "Max Grade Value",
|
|
"type": "integer"
|
|
},
|
|
"reference_file": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Reference File"
|
|
},
|
|
"title": {
|
|
"title": "Title",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"title",
|
|
"description",
|
|
"hint",
|
|
"assignment_type"
|
|
],
|
|
"title": "AssignmentTaskCreate",
|
|
"type": "object"
|
|
},
|
|
"AssignmentTaskSubmissionUpdate": {
|
|
"description": "Model for updating an assignment task submission.",
|
|
"properties": {
|
|
"assignment_task_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Assignment Task Id"
|
|
},
|
|
"assignment_task_submission_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Assignment Task Submission Uuid"
|
|
},
|
|
"assignment_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AssignmentTaskTypeEnum"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"grade": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Grade"
|
|
},
|
|
"task_submission": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Task Submission"
|
|
},
|
|
"task_submission_grade_feedback": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Task Submission Grade Feedback"
|
|
}
|
|
},
|
|
"title": "AssignmentTaskSubmissionUpdate",
|
|
"type": "object"
|
|
},
|
|
"AssignmentTaskTypeEnum": {
|
|
"enum": [
|
|
"FILE_SUBMISSION",
|
|
"QUIZ",
|
|
"FORM",
|
|
"CODE",
|
|
"SHORT_ANSWER",
|
|
"NUMBER_ANSWER",
|
|
"OTHER"
|
|
],
|
|
"title": "AssignmentTaskTypeEnum",
|
|
"type": "string"
|
|
},
|
|
"AssignmentTaskUpdate": {
|
|
"description": "Model for updating an assignment task.",
|
|
"properties": {
|
|
"assignment_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AssignmentTaskTypeEnum"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"contents": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Contents"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"hint": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Hint"
|
|
},
|
|
"max_grade_value": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Max Grade Value"
|
|
},
|
|
"title": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Title"
|
|
}
|
|
},
|
|
"title": "AssignmentTaskUpdate",
|
|
"type": "object"
|
|
},
|
|
"AssignmentUpdate": {
|
|
"description": "Model for updating an assignment.",
|
|
"properties": {
|
|
"activity_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Activity Id"
|
|
},
|
|
"allow_retries": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Allow Retries"
|
|
},
|
|
"anti_copy_paste": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Anti Copy Paste"
|
|
},
|
|
"auto_grading": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Auto Grading"
|
|
},
|
|
"chapter_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Chapter Id"
|
|
},
|
|
"course_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Id"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"due_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Due Date"
|
|
},
|
|
"grading_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GradingTypeEnum"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"max_retries": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Max Retries"
|
|
},
|
|
"org_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Id"
|
|
},
|
|
"published": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Published"
|
|
},
|
|
"show_correct_answers": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Show Correct Answers"
|
|
},
|
|
"title": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Title"
|
|
},
|
|
"update_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Update Date"
|
|
}
|
|
},
|
|
"title": "AssignmentUpdate",
|
|
"type": "object"
|
|
},
|
|
"AssignmentUserSubmissionCreate": {
|
|
"description": "Model for creating a new assignment user submission.",
|
|
"properties": {
|
|
"assignment_id": {
|
|
"title": "Assignment Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"assignment_id"
|
|
],
|
|
"title": "AssignmentUserSubmissionCreate",
|
|
"type": "object"
|
|
},
|
|
"AttachmentData": {
|
|
"description": "Attachment data sent with a message",
|
|
"properties": {
|
|
"content_base64": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Content Base64"
|
|
},
|
|
"mime_type": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Mime Type"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"image",
|
|
"video",
|
|
"file",
|
|
"youtube"
|
|
],
|
|
"title": "Type",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Url"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"name"
|
|
],
|
|
"title": "AttachmentData",
|
|
"type": "object"
|
|
},
|
|
"AuthBrandingConfig": {
|
|
"properties": {
|
|
"background_image": {
|
|
"default": "",
|
|
"title": "Background Image",
|
|
"type": "string"
|
|
},
|
|
"background_type": {
|
|
"default": "gradient",
|
|
"enum": [
|
|
"gradient",
|
|
"custom",
|
|
"unsplash"
|
|
],
|
|
"title": "Background Type",
|
|
"type": "string"
|
|
},
|
|
"text_color": {
|
|
"default": "light",
|
|
"enum": [
|
|
"light",
|
|
"dark"
|
|
],
|
|
"title": "Text Color",
|
|
"type": "string"
|
|
},
|
|
"unsplash_photo_url": {
|
|
"default": "",
|
|
"title": "Unsplash Photo Url",
|
|
"type": "string"
|
|
},
|
|
"unsplash_photographer_name": {
|
|
"default": "",
|
|
"title": "Unsplash Photographer Name",
|
|
"type": "string"
|
|
},
|
|
"unsplash_photographer_url": {
|
|
"default": "",
|
|
"title": "Unsplash Photographer Url",
|
|
"type": "string"
|
|
},
|
|
"welcome_message": {
|
|
"default": "",
|
|
"title": "Welcome Message",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "AuthBrandingConfig",
|
|
"type": "object"
|
|
},
|
|
"AuthorWithRole": {
|
|
"properties": {
|
|
"authorship": {
|
|
"$ref": "#/components/schemas/ResourceAuthorshipEnum"
|
|
},
|
|
"authorship_status": {
|
|
"$ref": "#/components/schemas/ResourceAuthorshipStatusEnum"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
},
|
|
"required": [
|
|
"user",
|
|
"authorship",
|
|
"authorship_status",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "AuthorWithRole",
|
|
"type": "object"
|
|
},
|
|
"AwardCertificateResponse": {
|
|
"properties": {
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"user_certification_uuid": {
|
|
"title": "User Certification Uuid",
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"user_certification_uuid",
|
|
"user_id",
|
|
"course_uuid"
|
|
],
|
|
"title": "AwardCertificateResponse",
|
|
"type": "object"
|
|
},
|
|
"BatchExportRequest": {
|
|
"description": "Request model for batch course export.\n\nSECURITY: Limited to 20 courses per request to prevent resource exhaustion.",
|
|
"properties": {
|
|
"course_uuids": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Course Uuids",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuids"
|
|
],
|
|
"title": "BatchExportRequest",
|
|
"type": "object"
|
|
},
|
|
"BlockRead": {
|
|
"properties": {
|
|
"activity_id": {
|
|
"title": "Activity Id",
|
|
"type": "integer"
|
|
},
|
|
"block_type": {
|
|
"$ref": "#/components/schemas/BlockTypeEnum",
|
|
"default": "BLOCK_CUSTOM"
|
|
},
|
|
"block_uuid": {
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
},
|
|
"chapter_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Chapter Id"
|
|
},
|
|
"content": {
|
|
"additionalProperties": true,
|
|
"title": "Content",
|
|
"type": "object"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"block_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "BlockRead",
|
|
"type": "object"
|
|
},
|
|
"BlockTypeEnum": {
|
|
"enum": [
|
|
"BLOCK_QUIZ",
|
|
"BLOCK_VIDEO",
|
|
"BLOCK_DOCUMENT_PDF",
|
|
"BLOCK_IMAGE",
|
|
"BLOCK_AUDIO",
|
|
"BLOCK_CUSTOM"
|
|
],
|
|
"title": "BlockTypeEnum",
|
|
"type": "string"
|
|
},
|
|
"BoardCreate": {
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "BoardCreate",
|
|
"type": "object"
|
|
},
|
|
"BoardMemberBatchCreate": {
|
|
"properties": {
|
|
"members": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/BoardMemberCreate"
|
|
},
|
|
"title": "Members",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"members"
|
|
],
|
|
"title": "BoardMemberBatchCreate",
|
|
"type": "object"
|
|
},
|
|
"BoardMemberCreate": {
|
|
"properties": {
|
|
"role": {
|
|
"default": "editor",
|
|
"title": "Role",
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"user_id"
|
|
],
|
|
"title": "BoardMemberCreate",
|
|
"type": "object"
|
|
},
|
|
"BoardMemberRead": {
|
|
"properties": {
|
|
"avatar_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Avatar Image"
|
|
},
|
|
"board_id": {
|
|
"title": "Board Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Email"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"role": {
|
|
"title": "Role",
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
},
|
|
"user_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "User Uuid"
|
|
},
|
|
"username": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Username"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"board_id",
|
|
"user_id",
|
|
"role",
|
|
"creation_date"
|
|
],
|
|
"title": "BoardMemberRead",
|
|
"type": "object"
|
|
},
|
|
"BoardRead": {
|
|
"properties": {
|
|
"board_uuid": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
},
|
|
"created_by": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Created By"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"member_count": {
|
|
"default": 0,
|
|
"title": "Member Count",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"public": {
|
|
"default": true,
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"id",
|
|
"org_id",
|
|
"board_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "BoardRead",
|
|
"type": "object"
|
|
},
|
|
"BoardUpdate": {
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"public": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Public"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"title": "BoardUpdate",
|
|
"type": "object"
|
|
},
|
|
"BoardsOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": false,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "BoardsOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"BoardsPlaygroundContext": {
|
|
"properties": {
|
|
"board_description": {
|
|
"title": "Board Description",
|
|
"type": "string"
|
|
},
|
|
"board_name": {
|
|
"title": "Board Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"board_name",
|
|
"board_description"
|
|
],
|
|
"title": "BoardsPlaygroundContext",
|
|
"type": "object"
|
|
},
|
|
"BoardsPlaygroundMessage": {
|
|
"properties": {
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"title": "Role",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"role",
|
|
"content"
|
|
],
|
|
"title": "BoardsPlaygroundMessage",
|
|
"type": "object"
|
|
},
|
|
"BoardsPlaygroundSessionResponse": {
|
|
"properties": {
|
|
"html_content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Html Content"
|
|
},
|
|
"iteration_count": {
|
|
"title": "Iteration Count",
|
|
"type": "integer"
|
|
},
|
|
"max_iterations": {
|
|
"title": "Max Iterations",
|
|
"type": "integer"
|
|
},
|
|
"message_history": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/BoardsPlaygroundMessage"
|
|
},
|
|
"title": "Message History",
|
|
"type": "array"
|
|
},
|
|
"session_uuid": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"session_uuid",
|
|
"iteration_count",
|
|
"max_iterations",
|
|
"html_content",
|
|
"message_history"
|
|
],
|
|
"title": "BoardsPlaygroundSessionResponse",
|
|
"type": "object"
|
|
},
|
|
"Body_api_analyze_import_package_api_v1_courses_import_analyze_post": {
|
|
"properties": {
|
|
"zip_file": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Zip File",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"zip_file"
|
|
],
|
|
"title": "Body_api_analyze_import_package_api_v1_courses_import_analyze_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_audio_file_block_api_v1_blocks_audio_post": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"file_object": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "File Object",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"file_object",
|
|
"activity_uuid"
|
|
],
|
|
"title": "Body_api_create_audio_file_block_api_v1_blocks_audio_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_course_api_v1_courses__post": {
|
|
"properties": {
|
|
"about": {
|
|
"title": "About",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"learnings": {
|
|
"title": "Learnings",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"public": {
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
},
|
|
"tags": {
|
|
"title": "Tags",
|
|
"type": "string"
|
|
},
|
|
"thumbnail": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail"
|
|
},
|
|
"thumbnail_type": {
|
|
"$ref": "#/components/schemas/ThumbnailType",
|
|
"default": "image"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"description",
|
|
"public",
|
|
"about"
|
|
],
|
|
"title": "Body_api_create_course_api_v1_courses__post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_course_thumbnail_api_v1_courses__course_uuid__thumbnail_put": {
|
|
"properties": {
|
|
"thumbnail": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail"
|
|
},
|
|
"thumbnail_type": {
|
|
"$ref": "#/components/schemas/ThumbnailType",
|
|
"default": "image"
|
|
}
|
|
},
|
|
"title": "Body_api_create_course_thumbnail_api_v1_courses__course_uuid__thumbnail_put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_documentpdf_activity_api_v1_activities_documentpdf_post": {
|
|
"properties": {
|
|
"chapter_id": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"pdf_file": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Pdf File"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"chapter_id"
|
|
],
|
|
"title": "Body_api_create_documentpdf_activity_api_v1_activities_documentpdf_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_episode_api_v1_podcasts__podcast_uuid__episodes_post": {
|
|
"properties": {
|
|
"audio": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Audio"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"duration_seconds": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": 0,
|
|
"title": "Duration Seconds"
|
|
},
|
|
"published": {
|
|
"default": false,
|
|
"title": "Published",
|
|
"type": "boolean"
|
|
},
|
|
"thumbnail": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail"
|
|
},
|
|
"title": {
|
|
"title": "Title",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"title"
|
|
],
|
|
"title": "Body_api_create_episode_api_v1_podcasts__podcast_uuid__episodes_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_image_file_block_api_v1_blocks_image_post": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"file_object": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "File Object",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"file_object",
|
|
"activity_uuid"
|
|
],
|
|
"title": "Body_api_create_image_file_block_api_v1_blocks_image_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_org_withconfig_api_v1_orgs_withconfig__post": {
|
|
"properties": {
|
|
"config_object": {
|
|
"$ref": "#/components/schemas/OrganizationConfigBase"
|
|
},
|
|
"org_object": {
|
|
"$ref": "#/components/schemas/OrganizationCreate"
|
|
}
|
|
},
|
|
"required": [
|
|
"org_object",
|
|
"config_object"
|
|
],
|
|
"title": "Body_api_create_org_withconfig_api_v1_orgs_withconfig__post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_pdf_file_block_api_v1_blocks_pdf_post": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"file_object": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "File Object",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"file_object",
|
|
"activity_uuid"
|
|
],
|
|
"title": "Body_api_create_pdf_file_block_api_v1_blocks_pdf_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_podcast_api_v1_podcasts__post": {
|
|
"properties": {
|
|
"about": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "About"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"public": {
|
|
"default": false,
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
},
|
|
"tags": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Tags"
|
|
},
|
|
"thumbnail": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "Body_api_create_podcast_api_v1_podcasts__post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_video_activity_api_v1_activities_video_post": {
|
|
"properties": {
|
|
"chapter_id": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
},
|
|
"details": {
|
|
"default": "{}",
|
|
"title": "Details",
|
|
"type": "string"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"video_file": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Video File"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"chapter_id"
|
|
],
|
|
"title": "Body_api_create_video_activity_api_v1_activities_video_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_create_video_file_block_api_v1_blocks_video_post": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"file_object": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "File Object",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"file_object",
|
|
"activity_uuid"
|
|
],
|
|
"title": "Body_api_create_video_file_block_api_v1_blocks_video_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_put_assignment_task_ref_file_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__ref_file_post": {
|
|
"properties": {
|
|
"reference_file": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Reference File"
|
|
}
|
|
},
|
|
"title": "Body_api_put_assignment_task_ref_file_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__ref_file_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_put_assignment_task_sub_file_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__sub_file_post": {
|
|
"properties": {
|
|
"sub_file": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Sub File"
|
|
}
|
|
},
|
|
"title": "Body_api_put_assignment_task_sub_file_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__sub_file_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_avatar_user_api_v1_users_update_avatar__user_id__put": {
|
|
"properties": {
|
|
"avatar_file": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Avatar File"
|
|
}
|
|
},
|
|
"title": "Body_api_update_avatar_user_api_v1_users_update_avatar__user_id__put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_board_thumbnail_api_v1_boards__board_uuid__thumbnail_post": {
|
|
"properties": {
|
|
"thumbnail": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Thumbnail",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"thumbnail"
|
|
],
|
|
"title": "Body_api_update_board_thumbnail_api_v1_boards__board_uuid__thumbnail_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_community_thumbnail_api_v1_communities__community_uuid__thumbnail_put": {
|
|
"properties": {
|
|
"thumbnail": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail"
|
|
}
|
|
},
|
|
"title": "Body_api_update_community_thumbnail_api_v1_communities__community_uuid__thumbnail_put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_documentpdf_activity_api_v1_activities_documentpdf__activity_uuid__put": {
|
|
"properties": {
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"pdf_file": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Pdf File"
|
|
}
|
|
},
|
|
"title": "Body_api_update_documentpdf_activity_api_v1_activities_documentpdf__activity_uuid__put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_org_favicon_api_v1_orgs__org_id__favicon_put": {
|
|
"properties": {
|
|
"favicon_file": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Favicon File",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"favicon_file"
|
|
],
|
|
"title": "Body_api_update_org_favicon_api_v1_orgs__org_id__favicon_put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_org_logo_api_v1_orgs__org_id__logo_put": {
|
|
"properties": {
|
|
"logo_file": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Logo File",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"logo_file"
|
|
],
|
|
"title": "Body_api_update_org_logo_api_v1_orgs__org_id__logo_put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_org_preview_api_v1_orgs__org_id__preview_put": {
|
|
"properties": {
|
|
"preview_file": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Preview File",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"preview_file"
|
|
],
|
|
"title": "Body_api_update_org_preview_api_v1_orgs__org_id__preview_put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_org_thumbnail_api_v1_orgs__org_id__thumbnail_put": {
|
|
"properties": {
|
|
"thumbnail_file": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Thumbnail File",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"thumbnail_file"
|
|
],
|
|
"title": "Body_api_update_org_thumbnail_api_v1_orgs__org_id__thumbnail_put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_playground_thumbnail_api_v1_playgrounds__playground_uuid__thumbnail_post": {
|
|
"properties": {
|
|
"thumbnail": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Thumbnail",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"thumbnail"
|
|
],
|
|
"title": "Body_api_update_playground_thumbnail_api_v1_playgrounds__playground_uuid__thumbnail_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_podcast_thumbnail_api_v1_podcasts__podcast_uuid__thumbnail_put": {
|
|
"properties": {
|
|
"thumbnail": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Thumbnail",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"thumbnail"
|
|
],
|
|
"title": "Body_api_update_podcast_thumbnail_api_v1_podcasts__podcast_uuid__thumbnail_put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_update_video_activity_api_v1_activities_video__activity_uuid__put": {
|
|
"properties": {
|
|
"autoplay": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Autoplay"
|
|
},
|
|
"end_time": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "End Time"
|
|
},
|
|
"muted": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Muted"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"start_time": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Start Time"
|
|
},
|
|
"video_file": {
|
|
"anyOf": [
|
|
{
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Video File"
|
|
}
|
|
},
|
|
"title": "Body_api_update_video_activity_api_v1_activities_video__activity_uuid__put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_upload_episode_audio_api_v1_podcasts_episodes__episode_uuid__audio_put": {
|
|
"properties": {
|
|
"audio": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Audio",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"audio"
|
|
],
|
|
"title": "Body_api_upload_episode_audio_api_v1_podcasts_episodes__episode_uuid__audio_put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_upload_episode_thumbnail_api_v1_podcasts_episodes__episode_uuid__thumbnail_put": {
|
|
"properties": {
|
|
"thumbnail": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Thumbnail",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"thumbnail"
|
|
],
|
|
"title": "Body_api_upload_episode_thumbnail_api_v1_podcasts_episodes__episode_uuid__thumbnail_put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_upload_migration_files_api_v1_courses_migrate_upload_post": {
|
|
"properties": {
|
|
"files": {
|
|
"items": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
"title": "Files",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"files"
|
|
],
|
|
"title": "Body_api_upload_migration_files_api_v1_courses_migrate_upload_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_upload_org_auth_background_api_v1_orgs__org_id__auth_background_put": {
|
|
"properties": {
|
|
"background_file": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Background File",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"background_file"
|
|
],
|
|
"title": "Body_api_upload_org_auth_background_api_v1_orgs__org_id__auth_background_put",
|
|
"type": "object"
|
|
},
|
|
"Body_api_upload_org_landing_content_api_v1_orgs__org_id__landing_content_post": {
|
|
"properties": {
|
|
"content_file": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Content File",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"content_file"
|
|
],
|
|
"title": "Body_api_upload_org_landing_content_api_v1_orgs__org_id__landing_content_post",
|
|
"type": "object"
|
|
},
|
|
"Body_api_upload_org_og_image_api_v1_orgs__org_id__og_image_put": {
|
|
"properties": {
|
|
"og_image_file": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "Og Image File",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"og_image_file"
|
|
],
|
|
"title": "Body_api_upload_org_og_image_api_v1_orgs__org_id__og_image_put",
|
|
"type": "object"
|
|
},
|
|
"Body_login_api_v1_auth_login_post": {
|
|
"properties": {
|
|
"password": {
|
|
"title": "Password",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"password"
|
|
],
|
|
"title": "Body_login_api_v1_auth_login_post",
|
|
"type": "object"
|
|
},
|
|
"Body_submit_feedback_api_v1_monitoring_feedback_post": {
|
|
"properties": {
|
|
"associated_event_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Associated Event Id"
|
|
},
|
|
"attachments": {
|
|
"default": [],
|
|
"items": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"type": "string"
|
|
},
|
|
"title": "Attachments",
|
|
"type": "array"
|
|
},
|
|
"email": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Email"
|
|
},
|
|
"message": {
|
|
"default": "",
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
}
|
|
},
|
|
"title": "Body_submit_feedback_api_v1_monitoring_feedback_post",
|
|
"type": "object"
|
|
},
|
|
"Body_upload_sqlite_db_api_v1_code_upload_sqlite_post": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"block_id": {
|
|
"title": "Block Id",
|
|
"type": "string"
|
|
},
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"file_object": {
|
|
"contentMediaType": "application/octet-stream",
|
|
"title": "File Object",
|
|
"type": "string"
|
|
},
|
|
"org_uuid": {
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"file_object",
|
|
"activity_uuid",
|
|
"block_id",
|
|
"org_uuid",
|
|
"course_uuid"
|
|
],
|
|
"title": "Body_upload_sqlite_db_api_v1_code_upload_sqlite_post",
|
|
"type": "object"
|
|
},
|
|
"BulkEnrollRequest": {
|
|
"description": "Request body for bulk enrolling users into a course.",
|
|
"properties": {
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"user_ids": {
|
|
"description": "List of user ids to enroll (max 500)",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"maxItems": 500,
|
|
"title": "User Ids",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"user_ids"
|
|
],
|
|
"title": "BulkEnrollRequest",
|
|
"type": "object"
|
|
},
|
|
"BulkEnrollResponse": {
|
|
"properties": {
|
|
"already_enrolled": {
|
|
"description": "User ids that already had an enrollment",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"title": "Already Enrolled",
|
|
"type": "array"
|
|
},
|
|
"enrolled": {
|
|
"description": "User ids that were newly enrolled",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"title": "Enrolled",
|
|
"type": "array"
|
|
},
|
|
"skipped": {
|
|
"description": "User ids that were not members of the org",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"title": "Skipped",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"enrolled",
|
|
"already_enrolled",
|
|
"skipped"
|
|
],
|
|
"title": "BulkEnrollResponse",
|
|
"type": "object"
|
|
},
|
|
"BulkUnenrollRequest": {
|
|
"properties": {
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"user_ids": {
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"maxItems": 500,
|
|
"title": "User Ids",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"user_ids"
|
|
],
|
|
"title": "BulkUnenrollRequest",
|
|
"type": "object"
|
|
},
|
|
"BulkUnenrollResponse": {
|
|
"properties": {
|
|
"not_enrolled": {
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"title": "Not Enrolled",
|
|
"type": "array"
|
|
},
|
|
"unenrolled": {
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"title": "Unenrolled",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"unenrolled",
|
|
"not_enrolled"
|
|
],
|
|
"title": "BulkUnenrollResponse",
|
|
"type": "object"
|
|
},
|
|
"CertificateCourseInfo": {
|
|
"properties": {
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Id"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"name"
|
|
],
|
|
"title": "CertificateCourseInfo",
|
|
"type": "object"
|
|
},
|
|
"CertificateItem": {
|
|
"description": "A user's certificate with certification and course info.",
|
|
"properties": {
|
|
"certificate_user": {
|
|
"additionalProperties": true,
|
|
"title": "Certificate User",
|
|
"type": "object"
|
|
},
|
|
"certification": {
|
|
"additionalProperties": true,
|
|
"title": "Certification",
|
|
"type": "object"
|
|
},
|
|
"course": {
|
|
"$ref": "#/components/schemas/CertificateCourseInfo"
|
|
}
|
|
},
|
|
"required": [
|
|
"certificate_user",
|
|
"certification",
|
|
"course"
|
|
],
|
|
"title": "CertificateItem",
|
|
"type": "object"
|
|
},
|
|
"CertificationCreate": {
|
|
"properties": {
|
|
"config": {
|
|
"additionalProperties": true,
|
|
"title": "Config",
|
|
"type": "object"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_id"
|
|
],
|
|
"title": "CertificationCreate",
|
|
"type": "object"
|
|
},
|
|
"CertificationRead": {
|
|
"properties": {
|
|
"certification_uuid": {
|
|
"title": "Certification Uuid",
|
|
"type": "string"
|
|
},
|
|
"config": {
|
|
"additionalProperties": true,
|
|
"title": "Config",
|
|
"type": "object"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"certification_uuid",
|
|
"course_id",
|
|
"config",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "CertificationRead",
|
|
"type": "object"
|
|
},
|
|
"CertificationUpdate": {
|
|
"properties": {
|
|
"config": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Config"
|
|
}
|
|
},
|
|
"title": "CertificationUpdate",
|
|
"type": "object"
|
|
},
|
|
"ChangeRoleRequest": {
|
|
"properties": {
|
|
"role_id": {
|
|
"description": "Target role id",
|
|
"title": "Role Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"role_id"
|
|
],
|
|
"title": "ChangeRoleRequest",
|
|
"type": "object"
|
|
},
|
|
"ChangeRoleResponse": {
|
|
"properties": {
|
|
"role_id": {
|
|
"title": "Role Id",
|
|
"type": "integer"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"user_id",
|
|
"role_id"
|
|
],
|
|
"title": "ChangeRoleResponse",
|
|
"type": "object"
|
|
},
|
|
"ChapterCreate": {
|
|
"properties": {
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Description"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"lock_type": {
|
|
"$ref": "#/components/schemas/LockType",
|
|
"default": "public"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"org_id",
|
|
"course_id"
|
|
],
|
|
"title": "ChapterCreate",
|
|
"type": "object"
|
|
},
|
|
"ChapterOrder": {
|
|
"properties": {
|
|
"activities_order_by_ids": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ActivityOrder"
|
|
},
|
|
"title": "Activities Order By Ids",
|
|
"type": "array"
|
|
},
|
|
"chapter_id": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"chapter_id",
|
|
"activities_order_by_ids"
|
|
],
|
|
"title": "ChapterOrder",
|
|
"type": "object"
|
|
},
|
|
"ChapterPlan": {
|
|
"description": "Plan for a single chapter within a course",
|
|
"properties": {
|
|
"activities": {
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/components/schemas/ActivityPlan"
|
|
},
|
|
"title": "Activities",
|
|
"type": "array"
|
|
},
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"description"
|
|
],
|
|
"title": "ChapterPlan",
|
|
"type": "object"
|
|
},
|
|
"ChapterRead": {
|
|
"properties": {
|
|
"activities": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
},
|
|
"title": "Activities",
|
|
"type": "array"
|
|
},
|
|
"chapter_uuid": {
|
|
"title": "Chapter Uuid",
|
|
"type": "string"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Description"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"is_locked": {
|
|
"default": false,
|
|
"title": "Is Locked",
|
|
"type": "boolean"
|
|
},
|
|
"lock_type": {
|
|
"$ref": "#/components/schemas/LockType",
|
|
"default": "public"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"org_id",
|
|
"course_id",
|
|
"id",
|
|
"activities",
|
|
"chapter_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "ChapterRead",
|
|
"type": "object"
|
|
},
|
|
"ChapterUpdate": {
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"lock_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/LockType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"title": "ChapterUpdate",
|
|
"type": "object"
|
|
},
|
|
"ChapterUpdateOrder": {
|
|
"properties": {
|
|
"chapter_order_by_ids": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChapterOrder"
|
|
},
|
|
"title": "Chapter Order By Ids",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"chapter_order_by_ids"
|
|
],
|
|
"title": "ChapterUpdateOrder",
|
|
"type": "object"
|
|
},
|
|
"CodeSubmissionRead": {
|
|
"properties": {
|
|
"created_at": {
|
|
"title": "Created At",
|
|
"type": "string"
|
|
},
|
|
"execution_time_ms": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Execution Time Ms"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"language_id": {
|
|
"title": "Language Id",
|
|
"type": "integer"
|
|
},
|
|
"passed": {
|
|
"title": "Passed",
|
|
"type": "boolean"
|
|
},
|
|
"passed_tests": {
|
|
"title": "Passed Tests",
|
|
"type": "integer"
|
|
},
|
|
"results": {
|
|
"additionalProperties": true,
|
|
"title": "Results",
|
|
"type": "object"
|
|
},
|
|
"source_code": {
|
|
"title": "Source Code",
|
|
"type": "string"
|
|
},
|
|
"submission_uuid": {
|
|
"title": "Submission Uuid",
|
|
"type": "string"
|
|
},
|
|
"total_tests": {
|
|
"title": "Total Tests",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"submission_uuid",
|
|
"language_id",
|
|
"source_code",
|
|
"results",
|
|
"passed",
|
|
"total_tests",
|
|
"passed_tests",
|
|
"execution_time_ms",
|
|
"created_at"
|
|
],
|
|
"title": "CodeSubmissionRead",
|
|
"type": "object"
|
|
},
|
|
"CollaborationOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "CollaborationOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"CollectionCreate": {
|
|
"properties": {
|
|
"courses": {
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"title": "Courses",
|
|
"type": "array"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"public": {
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"public",
|
|
"courses"
|
|
],
|
|
"title": "CollectionCreate",
|
|
"type": "object"
|
|
},
|
|
"CollectionRead": {
|
|
"properties": {
|
|
"collection_uuid": {
|
|
"title": "Collection Uuid",
|
|
"type": "string"
|
|
},
|
|
"courses": {
|
|
"items": {},
|
|
"title": "Courses",
|
|
"type": "array"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Description"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"public": {
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"public",
|
|
"id",
|
|
"courses",
|
|
"collection_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "CollectionRead",
|
|
"type": "object"
|
|
},
|
|
"CollectionUpdate": {
|
|
"properties": {
|
|
"courses": {
|
|
"anyOf": [
|
|
{
|
|
"items": {},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Courses"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"public": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Public"
|
|
}
|
|
},
|
|
"title": "CollectionUpdate",
|
|
"type": "object"
|
|
},
|
|
"CollectionsOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"title": "CollectionsOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"CommentCreateRequest": {
|
|
"properties": {
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"content"
|
|
],
|
|
"title": "CommentCreateRequest",
|
|
"type": "object"
|
|
},
|
|
"CommunitiesOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"title": "CommunitiesOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"CommunityCreateRequest": {
|
|
"properties": {
|
|
"course_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Id"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"public": {
|
|
"default": true,
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "CommunityCreateRequest",
|
|
"type": "object"
|
|
},
|
|
"CommunityRead": {
|
|
"properties": {
|
|
"community_uuid": {
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
},
|
|
"course_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Id"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"moderation_settings": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Moderation Settings"
|
|
},
|
|
"moderation_words": {
|
|
"default": [],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Moderation Words",
|
|
"type": "array"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"public": {
|
|
"default": true,
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"id",
|
|
"community_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "CommunityRead",
|
|
"type": "object"
|
|
},
|
|
"CommunityUpdate": {
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"moderation_settings": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Moderation Settings"
|
|
},
|
|
"moderation_words": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Moderation Words"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"public": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Public"
|
|
}
|
|
},
|
|
"title": "CommunityUpdate",
|
|
"type": "object"
|
|
},
|
|
"CourseAccessResponse": {
|
|
"description": "Whether a user can access a course.",
|
|
"properties": {
|
|
"has_access": {
|
|
"description": "True if the user can access the course (public or enrolled)",
|
|
"title": "Has Access",
|
|
"type": "boolean"
|
|
},
|
|
"is_enrolled": {
|
|
"description": "True if the user is enrolled in the course",
|
|
"title": "Is Enrolled",
|
|
"type": "boolean"
|
|
},
|
|
"is_public": {
|
|
"description": "True if the course is public",
|
|
"title": "Is Public",
|
|
"type": "boolean"
|
|
},
|
|
"is_published": {
|
|
"description": "True if the course is published",
|
|
"title": "Is Published",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"has_access",
|
|
"is_enrolled",
|
|
"is_public",
|
|
"is_published"
|
|
],
|
|
"title": "CourseAccessResponse",
|
|
"type": "object"
|
|
},
|
|
"CourseAnalyticsResponse": {
|
|
"properties": {
|
|
"average_completion_percentage": {
|
|
"title": "Average Completion Percentage",
|
|
"type": "number"
|
|
},
|
|
"certificate_count": {
|
|
"title": "Certificate Count",
|
|
"type": "integer"
|
|
},
|
|
"completed_count": {
|
|
"title": "Completed Count",
|
|
"type": "integer"
|
|
},
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"enrollment_count": {
|
|
"title": "Enrollment Count",
|
|
"type": "integer"
|
|
},
|
|
"in_progress_count": {
|
|
"title": "In Progress Count",
|
|
"type": "integer"
|
|
},
|
|
"total_activities": {
|
|
"title": "Total Activities",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"enrollment_count",
|
|
"completed_count",
|
|
"in_progress_count",
|
|
"total_activities",
|
|
"average_completion_percentage",
|
|
"certificate_count"
|
|
],
|
|
"title": "CourseAnalyticsResponse",
|
|
"type": "object"
|
|
},
|
|
"CourseCompletionResponse": {
|
|
"description": "Result of marking an entire course as completed.",
|
|
"properties": {
|
|
"already_completed_count": {
|
|
"description": "Number of activities that were already completed",
|
|
"title": "Already Completed Count",
|
|
"type": "integer"
|
|
},
|
|
"certificate_awarded": {
|
|
"description": "True if a certificate was awarded as a result",
|
|
"title": "Certificate Awarded",
|
|
"type": "boolean"
|
|
},
|
|
"completed_count": {
|
|
"description": "Number of newly completed activities",
|
|
"title": "Completed Count",
|
|
"type": "integer"
|
|
},
|
|
"course_completed": {
|
|
"title": "Course Completed",
|
|
"type": "boolean"
|
|
},
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"total_activities": {
|
|
"title": "Total Activities",
|
|
"type": "integer"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"user_id",
|
|
"completed_count",
|
|
"already_completed_count",
|
|
"total_activities",
|
|
"course_completed",
|
|
"certificate_awarded"
|
|
],
|
|
"title": "CourseCompletionResponse",
|
|
"type": "object"
|
|
},
|
|
"CourseEnrollmentItem": {
|
|
"description": "A single row in a course enrollment listing.",
|
|
"properties": {
|
|
"enrolled_at": {
|
|
"title": "Enrolled At",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"title": "Status",
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"additionalProperties": true,
|
|
"title": "User",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"user",
|
|
"enrolled_at",
|
|
"status"
|
|
],
|
|
"title": "CourseEnrollmentItem",
|
|
"type": "object"
|
|
},
|
|
"CourseOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "CourseOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"CoursePlan": {
|
|
"description": "Complete course plan generated by AI",
|
|
"properties": {
|
|
"chapters": {
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChapterPlan"
|
|
},
|
|
"title": "Chapters",
|
|
"type": "array"
|
|
},
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"learnings": {
|
|
"default": "",
|
|
"title": "Learnings",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"tags": {
|
|
"default": "",
|
|
"title": "Tags",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"description"
|
|
],
|
|
"title": "CoursePlan",
|
|
"type": "object"
|
|
},
|
|
"CoursePlanningMessage": {
|
|
"description": "Single message in the conversation history",
|
|
"properties": {
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"title": "Role",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"role",
|
|
"content"
|
|
],
|
|
"title": "CoursePlanningMessage",
|
|
"type": "object"
|
|
},
|
|
"CoursePlanningSessionResponse": {
|
|
"description": "Response when getting session state",
|
|
"properties": {
|
|
"course_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Id"
|
|
},
|
|
"current_plan": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CoursePlan"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"max_planning_iterations": {
|
|
"title": "Max Planning Iterations",
|
|
"type": "integer"
|
|
},
|
|
"message_history": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CoursePlanningMessage"
|
|
},
|
|
"title": "Message History",
|
|
"type": "array"
|
|
},
|
|
"planning_iteration_count": {
|
|
"title": "Planning Iteration Count",
|
|
"type": "integer"
|
|
},
|
|
"session_uuid": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"session_uuid",
|
|
"planning_iteration_count",
|
|
"max_planning_iterations",
|
|
"current_plan",
|
|
"message_history"
|
|
],
|
|
"title": "CoursePlanningSessionResponse",
|
|
"type": "object"
|
|
},
|
|
"CourseRead": {
|
|
"properties": {
|
|
"about": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "About"
|
|
},
|
|
"authors": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/AuthorWithRole"
|
|
},
|
|
"title": "Authors",
|
|
"type": "array"
|
|
},
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"learnings": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Learnings"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"open_to_contributors": {
|
|
"title": "Open To Contributors",
|
|
"type": "boolean"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"public": {
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
},
|
|
"published": {
|
|
"default": false,
|
|
"title": "Published",
|
|
"type": "boolean"
|
|
},
|
|
"seo": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Seo"
|
|
},
|
|
"tags": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Tags"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"thumbnail_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ThumbnailType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "image"
|
|
},
|
|
"thumbnail_video": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Video"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"public",
|
|
"open_to_contributors",
|
|
"id",
|
|
"authors",
|
|
"course_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "CourseRead",
|
|
"type": "object"
|
|
},
|
|
"CourseUpdate": {
|
|
"properties": {
|
|
"about": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "About"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"learnings": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Learnings"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"open_to_contributors": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Open To Contributors"
|
|
},
|
|
"public": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Public"
|
|
},
|
|
"published": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Published"
|
|
},
|
|
"seo": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Seo"
|
|
},
|
|
"tags": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Tags"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"thumbnail_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ThumbnailType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"thumbnail_video": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Video"
|
|
}
|
|
},
|
|
"title": "CourseUpdate",
|
|
"type": "object"
|
|
},
|
|
"CourseUpdateCreate": {
|
|
"properties": {
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
},
|
|
"linked_activity_uuids": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Linked Activity Uuids"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"title": "Title",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"title",
|
|
"content",
|
|
"org_id"
|
|
],
|
|
"title": "CourseUpdateCreate",
|
|
"type": "object"
|
|
},
|
|
"CourseUpdateRead": {
|
|
"properties": {
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"courseupdate_uuid": {
|
|
"title": "Courseupdate Uuid",
|
|
"type": "string"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"linked_activity_uuids": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Linked Activity Uuids"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"title": "Title",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"title",
|
|
"content",
|
|
"course_id",
|
|
"courseupdate_uuid",
|
|
"org_id",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "CourseUpdateRead",
|
|
"type": "object"
|
|
},
|
|
"CourseUpdateUpdate": {
|
|
"properties": {
|
|
"content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Content"
|
|
},
|
|
"linked_activity_uuids": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Linked Activity Uuids"
|
|
},
|
|
"title": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Title"
|
|
}
|
|
},
|
|
"title": "CourseUpdateUpdate",
|
|
"type": "object"
|
|
},
|
|
"CreateFromMigrationRequest": {
|
|
"description": "Request to create a course from the migration tree.",
|
|
"properties": {
|
|
"structure": {
|
|
"$ref": "#/components/schemas/MigrationTreeStructure"
|
|
},
|
|
"temp_id": {
|
|
"title": "Temp Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"temp_id",
|
|
"structure"
|
|
],
|
|
"title": "CreateFromMigrationRequest",
|
|
"type": "object"
|
|
},
|
|
"CreateUserGroupRequest": {
|
|
"properties": {
|
|
"description": {
|
|
"default": "",
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"minLength": 1,
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "CreateUserGroupRequest",
|
|
"type": "object"
|
|
},
|
|
"CustomDomainCreate": {
|
|
"description": "Model for creating a new Custom Domain",
|
|
"properties": {
|
|
"domain": {
|
|
"title": "Domain",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"domain"
|
|
],
|
|
"title": "CustomDomainCreate",
|
|
"type": "object"
|
|
},
|
|
"CustomDomainRead": {
|
|
"description": "Model for reading a Custom Domain",
|
|
"properties": {
|
|
"check_error": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Check Error"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"title": "Domain",
|
|
"type": "string"
|
|
},
|
|
"domain_uuid": {
|
|
"title": "Domain Uuid",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"last_check_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Check At"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"primary": {
|
|
"title": "Primary",
|
|
"type": "boolean"
|
|
},
|
|
"status": {
|
|
"title": "Status",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
},
|
|
"verification_token": {
|
|
"title": "Verification Token",
|
|
"type": "string"
|
|
},
|
|
"verified_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Verified At"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"domain_uuid",
|
|
"domain",
|
|
"org_id",
|
|
"status",
|
|
"primary",
|
|
"verification_token",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "CustomDomainRead",
|
|
"type": "object"
|
|
},
|
|
"CustomDomainResolveResponse": {
|
|
"description": "Response model for domain resolution",
|
|
"properties": {
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"org_slug": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
},
|
|
"org_uuid": {
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"org_id",
|
|
"org_slug",
|
|
"org_uuid"
|
|
],
|
|
"title": "CustomDomainResolveResponse",
|
|
"type": "object"
|
|
},
|
|
"CustomDomainVerificationInfo": {
|
|
"description": "Model containing DNS verification instructions",
|
|
"properties": {
|
|
"cname_record_host": {
|
|
"title": "Cname Record Host",
|
|
"type": "string"
|
|
},
|
|
"cname_record_value": {
|
|
"title": "Cname Record Value",
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"title": "Domain",
|
|
"type": "string"
|
|
},
|
|
"instructions": {
|
|
"title": "Instructions",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"title": "Status",
|
|
"type": "string"
|
|
},
|
|
"txt_record_host": {
|
|
"title": "Txt Record Host",
|
|
"type": "string"
|
|
},
|
|
"txt_record_value": {
|
|
"title": "Txt Record Value",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"domain",
|
|
"status",
|
|
"txt_record_host",
|
|
"txt_record_value",
|
|
"cname_record_host",
|
|
"cname_record_value",
|
|
"instructions"
|
|
],
|
|
"title": "CustomDomainVerificationInfo",
|
|
"type": "object"
|
|
},
|
|
"DashboardPermission": {
|
|
"properties": {
|
|
"action_access": {
|
|
"title": "Action Access",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"action_access"
|
|
],
|
|
"title": "DashboardPermission",
|
|
"type": "object"
|
|
},
|
|
"DeactivatePackRequest": {
|
|
"properties": {
|
|
"platform_subscription_id": {
|
|
"title": "Platform Subscription Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"platform_subscription_id"
|
|
],
|
|
"title": "DeactivatePackRequest",
|
|
"type": "object"
|
|
},
|
|
"DeleteUserGroupResponse": {
|
|
"properties": {
|
|
"detail": {
|
|
"title": "Detail",
|
|
"type": "string"
|
|
},
|
|
"usergroup_uuid": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"detail",
|
|
"usergroup_uuid"
|
|
],
|
|
"title": "DeleteUserGroupResponse",
|
|
"type": "object"
|
|
},
|
|
"DiscussionCommentReadWithVoteStatus": {
|
|
"properties": {
|
|
"author": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/UserRead"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"author_id": {
|
|
"title": "Author Id",
|
|
"type": "integer"
|
|
},
|
|
"comment_uuid": {
|
|
"title": "Comment Uuid",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"discussion_id": {
|
|
"title": "Discussion Id",
|
|
"type": "integer"
|
|
},
|
|
"has_voted": {
|
|
"default": false,
|
|
"title": "Has Voted",
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
},
|
|
"upvote_count": {
|
|
"default": 0,
|
|
"title": "Upvote Count",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"content",
|
|
"id",
|
|
"comment_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "DiscussionCommentReadWithVoteStatus",
|
|
"type": "object"
|
|
},
|
|
"DiscussionCommentUpdate": {
|
|
"properties": {
|
|
"content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Content"
|
|
}
|
|
},
|
|
"title": "DiscussionCommentUpdate",
|
|
"type": "object"
|
|
},
|
|
"DiscussionCommentVoteRead": {
|
|
"properties": {
|
|
"comment_id": {
|
|
"title": "Comment Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
},
|
|
"vote_uuid": {
|
|
"title": "Vote Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"vote_uuid",
|
|
"creation_date"
|
|
],
|
|
"title": "DiscussionCommentVoteRead",
|
|
"type": "object"
|
|
},
|
|
"DiscussionCreateRequest": {
|
|
"properties": {
|
|
"content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Content"
|
|
},
|
|
"emoji": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Emoji"
|
|
},
|
|
"label": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "general",
|
|
"title": "Label"
|
|
},
|
|
"title": {
|
|
"title": "Title",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"title"
|
|
],
|
|
"title": "DiscussionCreateRequest",
|
|
"type": "object"
|
|
},
|
|
"DiscussionLabelInfo": {
|
|
"properties": {
|
|
"color": {
|
|
"title": "Color",
|
|
"type": "string"
|
|
},
|
|
"icon": {
|
|
"title": "Icon",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"color",
|
|
"icon"
|
|
],
|
|
"title": "DiscussionLabelInfo",
|
|
"type": "object"
|
|
},
|
|
"DiscussionLockUpdate": {
|
|
"properties": {
|
|
"is_locked": {
|
|
"title": "Is Locked",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"is_locked"
|
|
],
|
|
"title": "DiscussionLockUpdate",
|
|
"type": "object"
|
|
},
|
|
"DiscussionOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "DiscussionOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"DiscussionPinUpdate": {
|
|
"properties": {
|
|
"is_pinned": {
|
|
"title": "Is Pinned",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"is_pinned"
|
|
],
|
|
"title": "DiscussionPinUpdate",
|
|
"type": "object"
|
|
},
|
|
"DiscussionReactionSummary": {
|
|
"description": "Summary of reactions for a single emoji.",
|
|
"properties": {
|
|
"count": {
|
|
"title": "Count",
|
|
"type": "integer"
|
|
},
|
|
"emoji": {
|
|
"title": "Emoji",
|
|
"type": "string"
|
|
},
|
|
"has_reacted": {
|
|
"title": "Has Reacted",
|
|
"type": "boolean"
|
|
},
|
|
"users": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/src__db__communities__discussion_reactions__ReactionUser"
|
|
},
|
|
"title": "Users",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"emoji",
|
|
"count",
|
|
"users",
|
|
"has_reacted"
|
|
],
|
|
"title": "DiscussionReactionSummary",
|
|
"type": "object"
|
|
},
|
|
"DiscussionReadWithVoteStatus": {
|
|
"properties": {
|
|
"author": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/UserRead"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"author_id": {
|
|
"title": "Author Id",
|
|
"type": "integer"
|
|
},
|
|
"community_id": {
|
|
"title": "Community Id",
|
|
"type": "integer"
|
|
},
|
|
"content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Content"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"discussion_uuid": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
},
|
|
"edit_count": {
|
|
"default": 0,
|
|
"title": "Edit Count",
|
|
"type": "integer"
|
|
},
|
|
"emoji": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Emoji"
|
|
},
|
|
"has_voted": {
|
|
"default": false,
|
|
"title": "Has Voted",
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"is_locked": {
|
|
"default": false,
|
|
"title": "Is Locked",
|
|
"type": "boolean"
|
|
},
|
|
"is_pinned": {
|
|
"default": false,
|
|
"title": "Is Pinned",
|
|
"type": "boolean"
|
|
},
|
|
"label": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "general",
|
|
"title": "Label"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"title": "Title",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
},
|
|
"upvote_count": {
|
|
"title": "Upvote Count",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"title",
|
|
"discussion_uuid",
|
|
"upvote_count",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "DiscussionReadWithVoteStatus",
|
|
"type": "object"
|
|
},
|
|
"DiscussionSortBy": {
|
|
"enum": [
|
|
"recent",
|
|
"upvotes",
|
|
"hot"
|
|
],
|
|
"title": "DiscussionSortBy",
|
|
"type": "string"
|
|
},
|
|
"DiscussionUpdate": {
|
|
"properties": {
|
|
"content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Content"
|
|
},
|
|
"emoji": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Emoji"
|
|
},
|
|
"label": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Label"
|
|
},
|
|
"title": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Title"
|
|
}
|
|
},
|
|
"title": "DiscussionUpdate",
|
|
"type": "object"
|
|
},
|
|
"DiscussionVoteRead": {
|
|
"properties": {
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"discussion_id": {
|
|
"title": "Discussion Id",
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
},
|
|
"vote_uuid": {
|
|
"title": "Vote Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"vote_uuid",
|
|
"creation_date"
|
|
],
|
|
"title": "DiscussionVoteRead",
|
|
"type": "object"
|
|
},
|
|
"EditorBootstrapCourse": {
|
|
"properties": {
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"org_uuid": {
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"name",
|
|
"org_uuid",
|
|
"org_id"
|
|
],
|
|
"title": "EditorBootstrapCourse",
|
|
"type": "object"
|
|
},
|
|
"EditorBootstrapResponse": {
|
|
"properties": {
|
|
"activity": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
},
|
|
"course": {
|
|
"$ref": "#/components/schemas/EditorBootstrapCourse"
|
|
},
|
|
"org": {
|
|
"$ref": "#/components/schemas/OrganizationRead"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity",
|
|
"course",
|
|
"org"
|
|
],
|
|
"title": "EditorBootstrapResponse",
|
|
"type": "object"
|
|
},
|
|
"ExecuteBatchRequest": {
|
|
"properties": {
|
|
"additional_files": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"$ref": "#/components/schemas/AdditionalFile"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Additional Files"
|
|
},
|
|
"language_id": {
|
|
"title": "Language Id",
|
|
"type": "integer"
|
|
},
|
|
"source_code": {
|
|
"title": "Source Code",
|
|
"type": "string"
|
|
},
|
|
"sqlite_db_path": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Sqlite Db Path"
|
|
},
|
|
"test_cases": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TestCase"
|
|
},
|
|
"title": "Test Cases",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"language_id",
|
|
"source_code",
|
|
"test_cases"
|
|
],
|
|
"title": "ExecuteBatchRequest",
|
|
"type": "object"
|
|
},
|
|
"ExecuteRequest": {
|
|
"properties": {
|
|
"additional_files": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"$ref": "#/components/schemas/AdditionalFile"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Additional Files"
|
|
},
|
|
"language_id": {
|
|
"title": "Language Id",
|
|
"type": "integer"
|
|
},
|
|
"source_code": {
|
|
"title": "Source Code",
|
|
"type": "string"
|
|
},
|
|
"sqlite_db_path": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Sqlite Db Path"
|
|
},
|
|
"stdin": {
|
|
"default": "",
|
|
"title": "Stdin",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"language_id",
|
|
"source_code"
|
|
],
|
|
"title": "ExecuteRequest",
|
|
"type": "object"
|
|
},
|
|
"ExternalVideo": {
|
|
"properties": {
|
|
"chapter_id": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
},
|
|
"details": {
|
|
"default": "{}",
|
|
"title": "Details",
|
|
"type": "string"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"youtube",
|
|
"vimeo"
|
|
],
|
|
"title": "Type",
|
|
"type": "string"
|
|
},
|
|
"uri": {
|
|
"title": "Uri",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"uri",
|
|
"type",
|
|
"chapter_id"
|
|
],
|
|
"title": "ExternalVideo",
|
|
"type": "object"
|
|
},
|
|
"ExternalVideoUpdateBody": {
|
|
"properties": {
|
|
"autoplay": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Autoplay"
|
|
},
|
|
"endTime": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Endtime"
|
|
},
|
|
"muted": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Muted"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"startTime": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Starttime"
|
|
},
|
|
"uri": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Uri"
|
|
}
|
|
},
|
|
"title": "ExternalVideoUpdateBody",
|
|
"type": "object"
|
|
},
|
|
"FinalizeCoursePlanRequest": {
|
|
"description": "Request to finalize the plan and create course structure",
|
|
"properties": {
|
|
"plan": {
|
|
"$ref": "#/components/schemas/CoursePlan"
|
|
},
|
|
"session_uuid": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"session_uuid",
|
|
"plan"
|
|
],
|
|
"title": "FinalizeCoursePlanRequest",
|
|
"type": "object"
|
|
},
|
|
"FinalizeCoursePlanResponse": {
|
|
"description": "Response after finalizing the course plan",
|
|
"properties": {
|
|
"chapters": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Chapters",
|
|
"type": "array"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"course_id",
|
|
"chapters"
|
|
],
|
|
"title": "FinalizeCoursePlanResponse",
|
|
"type": "object"
|
|
},
|
|
"FrontendEvent": {
|
|
"properties": {
|
|
"event_name": {
|
|
"title": "Event Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"properties": {
|
|
"additionalProperties": true,
|
|
"default": {},
|
|
"title": "Properties",
|
|
"type": "object"
|
|
},
|
|
"session_id": {
|
|
"default": "",
|
|
"title": "Session Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"event_name",
|
|
"org_id"
|
|
],
|
|
"title": "FrontendEvent",
|
|
"type": "object"
|
|
},
|
|
"FullCourseRead": {
|
|
"properties": {
|
|
"about": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "About"
|
|
},
|
|
"authors": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/AuthorWithRole"
|
|
},
|
|
"title": "Authors",
|
|
"type": "array"
|
|
},
|
|
"chapters": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChapterRead"
|
|
},
|
|
"title": "Chapters",
|
|
"type": "array"
|
|
},
|
|
"course_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Uuid"
|
|
},
|
|
"creation_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Creation Date"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"learnings": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Learnings"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"open_to_contributors": {
|
|
"title": "Open To Contributors",
|
|
"type": "boolean"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"org_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Uuid"
|
|
},
|
|
"public": {
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
},
|
|
"published": {
|
|
"default": false,
|
|
"title": "Published",
|
|
"type": "boolean"
|
|
},
|
|
"seo": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Seo"
|
|
},
|
|
"tags": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Tags"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"thumbnail_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ThumbnailType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "image"
|
|
},
|
|
"thumbnail_video": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Video"
|
|
},
|
|
"update_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Update Date"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"public",
|
|
"open_to_contributors",
|
|
"id",
|
|
"org_id",
|
|
"chapters",
|
|
"authors"
|
|
],
|
|
"title": "FullCourseRead",
|
|
"type": "object"
|
|
},
|
|
"GenerateActivityContentRequest": {
|
|
"description": "Request to generate content for a specific activity",
|
|
"properties": {
|
|
"activity_description": {
|
|
"title": "Activity Description",
|
|
"type": "string"
|
|
},
|
|
"activity_name": {
|
|
"title": "Activity Name",
|
|
"type": "string"
|
|
},
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"chapter_name": {
|
|
"title": "Chapter Name",
|
|
"type": "string"
|
|
},
|
|
"course_description": {
|
|
"title": "Course Description",
|
|
"type": "string"
|
|
},
|
|
"course_name": {
|
|
"title": "Course Name",
|
|
"type": "string"
|
|
},
|
|
"prompt": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Prompt"
|
|
},
|
|
"session_uuid": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"session_uuid",
|
|
"activity_uuid",
|
|
"activity_name",
|
|
"activity_description",
|
|
"chapter_name",
|
|
"course_name",
|
|
"course_description"
|
|
],
|
|
"title": "GenerateActivityContentRequest",
|
|
"type": "object"
|
|
},
|
|
"GradeSubmissionBody": {
|
|
"description": "Optional body for the final-grade endpoint. Lets the instructor leave\nan overall feedback note at the same time they finalize the grade.",
|
|
"properties": {
|
|
"overall_feedback": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Overall Feedback"
|
|
}
|
|
},
|
|
"title": "GradeSubmissionBody",
|
|
"type": "object"
|
|
},
|
|
"GradingTypeEnum": {
|
|
"enum": [
|
|
"ALPHABET",
|
|
"NUMERIC",
|
|
"PERCENTAGE",
|
|
"PASS_FAIL",
|
|
"GPA_SCALE"
|
|
],
|
|
"title": "GradingTypeEnum",
|
|
"type": "string"
|
|
},
|
|
"HTTPValidationError": {
|
|
"properties": {
|
|
"detail": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ValidationError"
|
|
},
|
|
"title": "Detail",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"title": "HTTPValidationError",
|
|
"type": "object"
|
|
},
|
|
"ImportAnalysisResponse": {
|
|
"description": "Response from analyzing an import package",
|
|
"properties": {
|
|
"courses": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ImportCourseInfo"
|
|
},
|
|
"title": "Courses",
|
|
"type": "array"
|
|
},
|
|
"temp_id": {
|
|
"title": "Temp Id",
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"title": "Version",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"temp_id",
|
|
"version",
|
|
"courses"
|
|
],
|
|
"title": "ImportAnalysisResponse",
|
|
"type": "object"
|
|
},
|
|
"ImportCourseInfo": {
|
|
"description": "Information about a course found in an import package",
|
|
"properties": {
|
|
"activities_count": {
|
|
"default": 0,
|
|
"title": "Activities Count",
|
|
"type": "integer"
|
|
},
|
|
"chapters_count": {
|
|
"default": 0,
|
|
"title": "Chapters Count",
|
|
"type": "integer"
|
|
},
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"has_thumbnail": {
|
|
"default": false,
|
|
"title": "Has Thumbnail",
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"name"
|
|
],
|
|
"title": "ImportCourseInfo",
|
|
"type": "object"
|
|
},
|
|
"ImportCourseResult": {
|
|
"description": "Result for a single course import",
|
|
"properties": {
|
|
"error": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Error"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"new_uuid": {
|
|
"title": "New Uuid",
|
|
"type": "string"
|
|
},
|
|
"original_uuid": {
|
|
"title": "Original Uuid",
|
|
"type": "string"
|
|
},
|
|
"success": {
|
|
"title": "Success",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"original_uuid",
|
|
"new_uuid",
|
|
"name",
|
|
"success"
|
|
],
|
|
"title": "ImportCourseResult",
|
|
"type": "object"
|
|
},
|
|
"ImportRequest": {
|
|
"description": "Request model for course import.\n\nSECURITY: Limited to 20 courses per import request.",
|
|
"properties": {
|
|
"course_uuids": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Course Uuids",
|
|
"type": "array"
|
|
},
|
|
"name_prefix": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name Prefix"
|
|
},
|
|
"set_private": {
|
|
"default": true,
|
|
"title": "Set Private",
|
|
"type": "boolean"
|
|
},
|
|
"set_unpublished": {
|
|
"default": true,
|
|
"title": "Set Unpublished",
|
|
"type": "boolean"
|
|
},
|
|
"temp_id": {
|
|
"title": "Temp Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"temp_id",
|
|
"course_uuids"
|
|
],
|
|
"title": "ImportRequest",
|
|
"type": "object"
|
|
},
|
|
"ImportResult": {
|
|
"description": "Result of importing courses",
|
|
"properties": {
|
|
"courses": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ImportCourseResult"
|
|
},
|
|
"title": "Courses",
|
|
"type": "array"
|
|
},
|
|
"failed": {
|
|
"title": "Failed",
|
|
"type": "integer"
|
|
},
|
|
"successful": {
|
|
"title": "Successful",
|
|
"type": "integer"
|
|
},
|
|
"total_courses": {
|
|
"title": "Total Courses",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"total_courses",
|
|
"successful",
|
|
"failed",
|
|
"courses"
|
|
],
|
|
"title": "ImportResult",
|
|
"type": "object"
|
|
},
|
|
"IssueTokenRequest": {
|
|
"description": "Request body for issuing a user token.",
|
|
"properties": {
|
|
"user_id": {
|
|
"description": "ID of the user to issue a token for",
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"user_id"
|
|
],
|
|
"title": "IssueTokenRequest",
|
|
"type": "object"
|
|
},
|
|
"JoinOrg": {
|
|
"properties": {
|
|
"invite_code": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Invite Code"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"user_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"title": "User Id"
|
|
}
|
|
},
|
|
"required": [
|
|
"org_id",
|
|
"user_id"
|
|
],
|
|
"title": "JoinOrg",
|
|
"type": "object"
|
|
},
|
|
"LockType": {
|
|
"enum": [
|
|
"public",
|
|
"authenticated",
|
|
"restricted"
|
|
],
|
|
"title": "LockType",
|
|
"type": "string"
|
|
},
|
|
"MagicBlockContext": {
|
|
"properties": {
|
|
"activity_content_summary": {
|
|
"title": "Activity Content Summary",
|
|
"type": "string"
|
|
},
|
|
"activity_name": {
|
|
"title": "Activity Name",
|
|
"type": "string"
|
|
},
|
|
"course_description": {
|
|
"title": "Course Description",
|
|
"type": "string"
|
|
},
|
|
"course_title": {
|
|
"title": "Course Title",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_title",
|
|
"course_description",
|
|
"activity_name",
|
|
"activity_content_summary"
|
|
],
|
|
"title": "MagicBlockContext",
|
|
"type": "object"
|
|
},
|
|
"MagicBlockMessage": {
|
|
"properties": {
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"title": "Role",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"role",
|
|
"content"
|
|
],
|
|
"title": "MagicBlockMessage",
|
|
"type": "object"
|
|
},
|
|
"MagicBlockSessionResponse": {
|
|
"properties": {
|
|
"html_content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Html Content"
|
|
},
|
|
"iteration_count": {
|
|
"title": "Iteration Count",
|
|
"type": "integer"
|
|
},
|
|
"max_iterations": {
|
|
"title": "Max Iterations",
|
|
"type": "integer"
|
|
},
|
|
"message_history": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/MagicBlockMessage"
|
|
},
|
|
"title": "Message History",
|
|
"type": "array"
|
|
},
|
|
"session_uuid": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"session_uuid",
|
|
"iteration_count",
|
|
"max_iterations",
|
|
"html_content",
|
|
"message_history"
|
|
],
|
|
"title": "MagicBlockSessionResponse",
|
|
"type": "object"
|
|
},
|
|
"MagicLinkRequest": {
|
|
"description": "Request body for issuing a magic sign-in link.",
|
|
"properties": {
|
|
"redirect_to": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Path to redirect to after the user lands on the consume endpoint",
|
|
"title": "Redirect To"
|
|
},
|
|
"ttl_seconds": {
|
|
"default": 300,
|
|
"description": "Token lifetime in seconds (60\u2013900)",
|
|
"maximum": 900.0,
|
|
"minimum": 60.0,
|
|
"title": "Ttl Seconds",
|
|
"type": "integer"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"user_id"
|
|
],
|
|
"title": "MagicLinkRequest",
|
|
"type": "object"
|
|
},
|
|
"MagicLinkResponse": {
|
|
"properties": {
|
|
"expires_at": {
|
|
"description": "ISO8601 timestamp when the token expires",
|
|
"title": "Expires At",
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"description": "Raw JWT (for integrations that prefer to build their own URL)",
|
|
"title": "Token",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"description": "Clickable URL to deliver to the user",
|
|
"title": "Url",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"url",
|
|
"token",
|
|
"expires_at"
|
|
],
|
|
"title": "MagicLinkResponse",
|
|
"type": "object"
|
|
},
|
|
"MarkCancelingRequest": {
|
|
"properties": {
|
|
"platform_subscription_id": {
|
|
"title": "Platform Subscription Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"platform_subscription_id"
|
|
],
|
|
"title": "MarkCancelingRequest",
|
|
"type": "object"
|
|
},
|
|
"MemberOrgConfig": {
|
|
"properties": {
|
|
"admin_limit": {
|
|
"default": 1,
|
|
"title": "Admin Limit",
|
|
"type": "integer"
|
|
},
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
},
|
|
"signup_mode": {
|
|
"default": "open",
|
|
"enum": [
|
|
"open",
|
|
"inviteOnly"
|
|
],
|
|
"title": "Signup Mode",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "MemberOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"MigrationActivityNode": {
|
|
"description": "An activity in the proposed tree structure.",
|
|
"properties": {
|
|
"activity_sub_type": {
|
|
"title": "Activity Sub Type",
|
|
"type": "string"
|
|
},
|
|
"activity_type": {
|
|
"title": "Activity Type",
|
|
"type": "string"
|
|
},
|
|
"file_ids": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "File Ids",
|
|
"type": "array"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"activity_type",
|
|
"activity_sub_type",
|
|
"file_ids"
|
|
],
|
|
"title": "MigrationActivityNode",
|
|
"type": "object"
|
|
},
|
|
"MigrationChapterNode": {
|
|
"description": "A chapter in the proposed tree structure.",
|
|
"properties": {
|
|
"activities": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/MigrationActivityNode"
|
|
},
|
|
"title": "Activities",
|
|
"type": "array"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"activities"
|
|
],
|
|
"title": "MigrationChapterNode",
|
|
"type": "object"
|
|
},
|
|
"MigrationCreateResult": {
|
|
"description": "Result of creating a course from migration.",
|
|
"properties": {
|
|
"activities_created": {
|
|
"title": "Activities Created",
|
|
"type": "integer"
|
|
},
|
|
"chapters_created": {
|
|
"title": "Chapters Created",
|
|
"type": "integer"
|
|
},
|
|
"course_name": {
|
|
"title": "Course Name",
|
|
"type": "string"
|
|
},
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"error": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Error"
|
|
},
|
|
"success": {
|
|
"title": "Success",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"course_name",
|
|
"chapters_created",
|
|
"activities_created",
|
|
"success"
|
|
],
|
|
"title": "MigrationCreateResult",
|
|
"type": "object"
|
|
},
|
|
"MigrationTreeStructure": {
|
|
"description": "The full course tree structure (proposed by AI or built manually).",
|
|
"properties": {
|
|
"chapters": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/MigrationChapterNode"
|
|
},
|
|
"title": "Chapters",
|
|
"type": "array"
|
|
},
|
|
"course_description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Description"
|
|
},
|
|
"course_name": {
|
|
"title": "Course Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_name",
|
|
"chapters"
|
|
],
|
|
"title": "MigrationTreeStructure",
|
|
"type": "object"
|
|
},
|
|
"MigrationUploadResponse": {
|
|
"description": "Response from bulk file upload.",
|
|
"properties": {
|
|
"files": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/UploadedFileInfo"
|
|
},
|
|
"title": "Files",
|
|
"type": "array"
|
|
},
|
|
"skipped": {
|
|
"default": [],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Skipped",
|
|
"type": "array"
|
|
},
|
|
"temp_id": {
|
|
"title": "Temp Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"temp_id",
|
|
"files"
|
|
],
|
|
"title": "MigrationUploadResponse",
|
|
"type": "object"
|
|
},
|
|
"OrgCloudConfig": {
|
|
"properties": {
|
|
"custom_domain": {
|
|
"default": false,
|
|
"title": "Custom Domain",
|
|
"type": "boolean"
|
|
},
|
|
"plan": {
|
|
"default": "free",
|
|
"enum": [
|
|
"free",
|
|
"personal",
|
|
"personal-family",
|
|
"standard",
|
|
"pro",
|
|
"enterprise",
|
|
"oss"
|
|
],
|
|
"title": "Plan",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "OrgCloudConfig",
|
|
"type": "object"
|
|
},
|
|
"OrgFeatureConfig": {
|
|
"properties": {
|
|
"ai": {
|
|
"$ref": "#/components/schemas/AIOrgConfig",
|
|
"default": {
|
|
"enabled": true,
|
|
"limit": 10,
|
|
"model": ""
|
|
}
|
|
},
|
|
"analytics": {
|
|
"$ref": "#/components/schemas/AnalyticsOrgConfig",
|
|
"default": {
|
|
"enabled": true,
|
|
"limit": 10
|
|
}
|
|
},
|
|
"api": {
|
|
"$ref": "#/components/schemas/APIOrgConfig",
|
|
"default": {
|
|
"enabled": true,
|
|
"limit": 10
|
|
}
|
|
},
|
|
"assignments": {
|
|
"$ref": "#/components/schemas/AssignmentOrgConfig",
|
|
"default": {
|
|
"enabled": false,
|
|
"limit": 10
|
|
}
|
|
},
|
|
"boards": {
|
|
"$ref": "#/components/schemas/BoardsOrgConfig",
|
|
"default": {
|
|
"enabled": false,
|
|
"limit": 10
|
|
}
|
|
},
|
|
"collaboration": {
|
|
"$ref": "#/components/schemas/CollaborationOrgConfig",
|
|
"default": {
|
|
"enabled": true,
|
|
"limit": 10
|
|
}
|
|
},
|
|
"collections": {
|
|
"$ref": "#/components/schemas/CollectionsOrgConfig",
|
|
"default": {
|
|
"enabled": true
|
|
}
|
|
},
|
|
"communities": {
|
|
"$ref": "#/components/schemas/CommunitiesOrgConfig",
|
|
"default": {
|
|
"enabled": true
|
|
}
|
|
},
|
|
"courses": {
|
|
"$ref": "#/components/schemas/CourseOrgConfig",
|
|
"default": {
|
|
"enabled": true,
|
|
"limit": 10
|
|
}
|
|
},
|
|
"discussions": {
|
|
"$ref": "#/components/schemas/DiscussionOrgConfig",
|
|
"default": {
|
|
"enabled": true,
|
|
"limit": 10
|
|
}
|
|
},
|
|
"members": {
|
|
"$ref": "#/components/schemas/MemberOrgConfig",
|
|
"default": {
|
|
"admin_limit": 1,
|
|
"enabled": true,
|
|
"limit": 10,
|
|
"signup_mode": "open"
|
|
}
|
|
},
|
|
"payments": {
|
|
"$ref": "#/components/schemas/PaymentOrgConfig",
|
|
"default": {
|
|
"enabled": false
|
|
}
|
|
},
|
|
"playgrounds": {
|
|
"$ref": "#/components/schemas/PlaygroundsOrgConfig",
|
|
"default": {
|
|
"enabled": false,
|
|
"limit": 10
|
|
}
|
|
},
|
|
"podcasts": {
|
|
"$ref": "#/components/schemas/PodcastsOrgConfig",
|
|
"default": {
|
|
"enabled": false,
|
|
"limit": 10
|
|
}
|
|
},
|
|
"storage": {
|
|
"$ref": "#/components/schemas/StorageOrgConfig",
|
|
"default": {
|
|
"enabled": true,
|
|
"limit": 10
|
|
}
|
|
},
|
|
"usergroups": {
|
|
"$ref": "#/components/schemas/UserGroupOrgConfig",
|
|
"default": {
|
|
"enabled": true,
|
|
"limit": 10
|
|
}
|
|
}
|
|
},
|
|
"title": "OrgFeatureConfig",
|
|
"type": "object"
|
|
},
|
|
"OrgGeneralConfig": {
|
|
"properties": {
|
|
"auth_branding": {
|
|
"$ref": "#/components/schemas/AuthBrandingConfig",
|
|
"default": {
|
|
"background_image": "",
|
|
"background_type": "gradient",
|
|
"text_color": "light",
|
|
"unsplash_photo_url": "",
|
|
"unsplash_photographer_name": "",
|
|
"unsplash_photographer_url": "",
|
|
"welcome_message": ""
|
|
}
|
|
},
|
|
"color": {
|
|
"default": "",
|
|
"title": "Color",
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"favicon_image": {
|
|
"default": "",
|
|
"title": "Favicon Image",
|
|
"type": "string"
|
|
},
|
|
"footer_text": {
|
|
"default": "",
|
|
"title": "Footer Text",
|
|
"type": "string"
|
|
},
|
|
"watermark": {
|
|
"default": true,
|
|
"title": "Watermark",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"title": "OrgGeneralConfig",
|
|
"type": "object"
|
|
},
|
|
"OrgPackRead": {
|
|
"properties": {
|
|
"activated_at": {
|
|
"format": "date-time",
|
|
"title": "Activated At",
|
|
"type": "string"
|
|
},
|
|
"cancel_at_period_end": {
|
|
"title": "Cancel At Period End",
|
|
"type": "boolean"
|
|
},
|
|
"cancelled_at": {
|
|
"anyOf": [
|
|
{
|
|
"format": "date-time",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Cancelled At"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"pack_id": {
|
|
"title": "Pack Id",
|
|
"type": "string"
|
|
},
|
|
"pack_type": {
|
|
"title": "Pack Type",
|
|
"type": "string"
|
|
},
|
|
"platform_subscription_id": {
|
|
"title": "Platform Subscription Id",
|
|
"type": "string"
|
|
},
|
|
"quantity": {
|
|
"title": "Quantity",
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"title": "Status",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"org_id",
|
|
"pack_type",
|
|
"pack_id",
|
|
"quantity",
|
|
"status",
|
|
"activated_at",
|
|
"cancelled_at",
|
|
"cancel_at_period_end",
|
|
"platform_subscription_id"
|
|
],
|
|
"title": "OrgPackRead",
|
|
"type": "object"
|
|
},
|
|
"OrgPacksResponse": {
|
|
"properties": {
|
|
"active_packs": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/OrgPackRead"
|
|
},
|
|
"title": "Active Packs",
|
|
"type": "array"
|
|
},
|
|
"available_packs": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PackCatalogItem"
|
|
},
|
|
"title": "Available Packs",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"active_packs",
|
|
"available_packs"
|
|
],
|
|
"title": "OrgPacksResponse",
|
|
"type": "object"
|
|
},
|
|
"OrganizationConfig": {
|
|
"properties": {
|
|
"config": {
|
|
"additionalProperties": true,
|
|
"title": "Config",
|
|
"type": "object"
|
|
},
|
|
"creation_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Creation Date"
|
|
},
|
|
"id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Id"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"update_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Update Date"
|
|
}
|
|
},
|
|
"required": [
|
|
"org_id"
|
|
],
|
|
"title": "OrganizationConfig",
|
|
"type": "object"
|
|
},
|
|
"OrganizationConfigBase": {
|
|
"properties": {
|
|
"cloud": {
|
|
"$ref": "#/components/schemas/OrgCloudConfig"
|
|
},
|
|
"config_version": {
|
|
"default": "1.4",
|
|
"title": "Config Version",
|
|
"type": "string"
|
|
},
|
|
"features": {
|
|
"$ref": "#/components/schemas/OrgFeatureConfig"
|
|
},
|
|
"general": {
|
|
"$ref": "#/components/schemas/OrgGeneralConfig"
|
|
},
|
|
"landing": {
|
|
"additionalProperties": true,
|
|
"title": "Landing",
|
|
"type": "object"
|
|
},
|
|
"seo": {
|
|
"$ref": "#/components/schemas/SeoOrgConfig",
|
|
"default": {
|
|
"default_meta_description": "",
|
|
"default_meta_title_suffix": "",
|
|
"default_og_image": "",
|
|
"google_site_verification": "",
|
|
"noindex_communities": false,
|
|
"twitter_handle": ""
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"general",
|
|
"features",
|
|
"cloud"
|
|
],
|
|
"title": "OrganizationConfigBase",
|
|
"type": "object"
|
|
},
|
|
"OrganizationCreate": {
|
|
"properties": {
|
|
"about": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "About"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"email": {
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"explore": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Explore"
|
|
},
|
|
"label": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Label"
|
|
},
|
|
"links": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Links"
|
|
},
|
|
"logo_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Logo Image"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"previews": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Previews"
|
|
},
|
|
"scripts": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Scripts"
|
|
},
|
|
"slug": {
|
|
"title": "Slug",
|
|
"type": "string"
|
|
},
|
|
"socials": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Socials"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"slug",
|
|
"email"
|
|
],
|
|
"title": "OrganizationCreate",
|
|
"type": "object"
|
|
},
|
|
"OrganizationRead": {
|
|
"properties": {
|
|
"about": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "About"
|
|
},
|
|
"config": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/OrganizationConfig"
|
|
},
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Config"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"email": {
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"explore": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": false,
|
|
"title": "Explore"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"label": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Label"
|
|
},
|
|
"links": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Links"
|
|
},
|
|
"logo_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Logo Image"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_uuid": {
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
},
|
|
"previews": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Previews"
|
|
},
|
|
"scripts": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Scripts"
|
|
},
|
|
"slug": {
|
|
"title": "Slug",
|
|
"type": "string"
|
|
},
|
|
"socials": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Socials"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"slug",
|
|
"email",
|
|
"id",
|
|
"org_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "OrganizationRead",
|
|
"type": "object"
|
|
},
|
|
"OrganizationUpdate": {
|
|
"properties": {
|
|
"about": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "About"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"email": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Email"
|
|
},
|
|
"label": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Label"
|
|
},
|
|
"links": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Links"
|
|
},
|
|
"logo_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Logo Image"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"previews": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Previews"
|
|
},
|
|
"scripts": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Scripts"
|
|
},
|
|
"slug": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Slug"
|
|
},
|
|
"socials": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Socials"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"title": "OrganizationUpdate",
|
|
"type": "object"
|
|
},
|
|
"PackCatalogItem": {
|
|
"properties": {
|
|
"label": {
|
|
"title": "Label",
|
|
"type": "string"
|
|
},
|
|
"pack_id": {
|
|
"title": "Pack Id",
|
|
"type": "string"
|
|
},
|
|
"quantity": {
|
|
"title": "Quantity",
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"title": "Type",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"pack_id",
|
|
"type",
|
|
"quantity",
|
|
"label"
|
|
],
|
|
"title": "PackCatalogItem",
|
|
"type": "object"
|
|
},
|
|
"PackSummaryResponse": {
|
|
"properties": {
|
|
"active_pack_count": {
|
|
"title": "Active Pack Count",
|
|
"type": "integer"
|
|
},
|
|
"ai_credits": {
|
|
"title": "Ai Credits",
|
|
"type": "integer"
|
|
},
|
|
"member_seats": {
|
|
"title": "Member Seats",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"ai_credits",
|
|
"member_seats",
|
|
"active_pack_count"
|
|
],
|
|
"title": "PackSummaryResponse",
|
|
"type": "object"
|
|
},
|
|
"PaymentOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": false,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"title": "PaymentOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"Permission": {
|
|
"properties": {
|
|
"action_create": {
|
|
"title": "Action Create",
|
|
"type": "boolean"
|
|
},
|
|
"action_delete": {
|
|
"title": "Action Delete",
|
|
"type": "boolean"
|
|
},
|
|
"action_read": {
|
|
"title": "Action Read",
|
|
"type": "boolean"
|
|
},
|
|
"action_update": {
|
|
"title": "Action Update",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"action_create",
|
|
"action_read",
|
|
"action_update",
|
|
"action_delete"
|
|
],
|
|
"title": "Permission",
|
|
"type": "object"
|
|
},
|
|
"PermissionsWithOwn": {
|
|
"properties": {
|
|
"action_create": {
|
|
"title": "Action Create",
|
|
"type": "boolean"
|
|
},
|
|
"action_delete": {
|
|
"title": "Action Delete",
|
|
"type": "boolean"
|
|
},
|
|
"action_delete_own": {
|
|
"title": "Action Delete Own",
|
|
"type": "boolean"
|
|
},
|
|
"action_read": {
|
|
"title": "Action Read",
|
|
"type": "boolean"
|
|
},
|
|
"action_read_own": {
|
|
"title": "Action Read Own",
|
|
"type": "boolean"
|
|
},
|
|
"action_update": {
|
|
"title": "Action Update",
|
|
"type": "boolean"
|
|
},
|
|
"action_update_own": {
|
|
"title": "Action Update Own",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"action_create",
|
|
"action_read",
|
|
"action_read_own",
|
|
"action_update",
|
|
"action_update_own",
|
|
"action_delete",
|
|
"action_delete_own"
|
|
],
|
|
"title": "PermissionsWithOwn",
|
|
"type": "object"
|
|
},
|
|
"PlatformResetPasswordRequest": {
|
|
"properties": {
|
|
"email": {
|
|
"anyOf": [
|
|
{
|
|
"format": "email",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Email"
|
|
},
|
|
"new_password": {
|
|
"title": "New Password",
|
|
"type": "string"
|
|
},
|
|
"reset_code": {
|
|
"title": "Reset Code",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"new_password",
|
|
"reset_code"
|
|
],
|
|
"title": "PlatformResetPasswordRequest",
|
|
"type": "object"
|
|
},
|
|
"PlaygroundAccessType": {
|
|
"enum": [
|
|
"public",
|
|
"authenticated",
|
|
"restricted"
|
|
],
|
|
"title": "PlaygroundAccessType",
|
|
"type": "string"
|
|
},
|
|
"PlaygroundContext": {
|
|
"properties": {
|
|
"course_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Name"
|
|
},
|
|
"course_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Uuid"
|
|
},
|
|
"playground_description": {
|
|
"title": "Playground Description",
|
|
"type": "string"
|
|
},
|
|
"playground_name": {
|
|
"title": "Playground Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"playground_name",
|
|
"playground_description"
|
|
],
|
|
"title": "PlaygroundContext",
|
|
"type": "object"
|
|
},
|
|
"PlaygroundCreate": {
|
|
"properties": {
|
|
"access_type": {
|
|
"$ref": "#/components/schemas/PlaygroundAccessType",
|
|
"default": "authenticated"
|
|
},
|
|
"course_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Uuid"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"html_content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Html Content"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "PlaygroundCreate",
|
|
"type": "object"
|
|
},
|
|
"PlaygroundMessage": {
|
|
"properties": {
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"title": "Role",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"role",
|
|
"content"
|
|
],
|
|
"title": "PlaygroundMessage",
|
|
"type": "object"
|
|
},
|
|
"PlaygroundReactionSummary": {
|
|
"properties": {
|
|
"count": {
|
|
"title": "Count",
|
|
"type": "integer"
|
|
},
|
|
"emoji": {
|
|
"title": "Emoji",
|
|
"type": "string"
|
|
},
|
|
"has_reacted": {
|
|
"title": "Has Reacted",
|
|
"type": "boolean"
|
|
},
|
|
"users": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/src__db__playground_reactions__ReactionUser"
|
|
},
|
|
"title": "Users",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"emoji",
|
|
"count",
|
|
"users",
|
|
"has_reacted"
|
|
],
|
|
"title": "PlaygroundReactionSummary",
|
|
"type": "object"
|
|
},
|
|
"PlaygroundRead": {
|
|
"properties": {
|
|
"access_type": {
|
|
"$ref": "#/components/schemas/PlaygroundAccessType",
|
|
"default": "authenticated"
|
|
},
|
|
"author_avatar_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Author Avatar Image"
|
|
},
|
|
"author_first_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Author First Name"
|
|
},
|
|
"author_last_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Author Last Name"
|
|
},
|
|
"author_user_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Author User Uuid"
|
|
},
|
|
"author_username": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Author Username"
|
|
},
|
|
"course_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Id"
|
|
},
|
|
"course_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Uuid"
|
|
},
|
|
"created_by": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Created By"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"html_content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Html Content"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"org_slug": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Slug"
|
|
},
|
|
"org_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Uuid"
|
|
},
|
|
"playground_uuid": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
},
|
|
"published": {
|
|
"default": false,
|
|
"title": "Published",
|
|
"type": "boolean"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"id",
|
|
"org_id",
|
|
"playground_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "PlaygroundRead",
|
|
"type": "object"
|
|
},
|
|
"PlaygroundSessionResponse": {
|
|
"properties": {
|
|
"html_content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Html Content"
|
|
},
|
|
"iteration_count": {
|
|
"title": "Iteration Count",
|
|
"type": "integer"
|
|
},
|
|
"max_iterations": {
|
|
"title": "Max Iterations",
|
|
"type": "integer"
|
|
},
|
|
"message_history": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PlaygroundMessage"
|
|
},
|
|
"title": "Message History",
|
|
"type": "array"
|
|
},
|
|
"session_uuid": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"session_uuid",
|
|
"iteration_count",
|
|
"max_iterations",
|
|
"html_content",
|
|
"message_history"
|
|
],
|
|
"title": "PlaygroundSessionResponse",
|
|
"type": "object"
|
|
},
|
|
"PlaygroundUpdate": {
|
|
"properties": {
|
|
"access_type": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PlaygroundAccessType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"course_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Uuid"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"html_content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Html Content"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"published": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Published"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"title": "PlaygroundUpdate",
|
|
"type": "object"
|
|
},
|
|
"PlaygroundsOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": false,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "PlaygroundsOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"PodcastEpisodeRead": {
|
|
"properties": {
|
|
"audio_file": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Audio File"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"duration_seconds": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": 0,
|
|
"title": "Duration Seconds"
|
|
},
|
|
"episode_number": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": 1,
|
|
"title": "Episode Number"
|
|
},
|
|
"episode_uuid": {
|
|
"title": "Episode Uuid",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"order": {
|
|
"default": 0,
|
|
"title": "Order",
|
|
"type": "integer"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"podcast_id": {
|
|
"title": "Podcast Id",
|
|
"type": "integer"
|
|
},
|
|
"published": {
|
|
"default": false,
|
|
"title": "Published",
|
|
"type": "boolean"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"title": {
|
|
"title": "Title",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"title",
|
|
"id",
|
|
"episode_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "PodcastEpisodeRead",
|
|
"type": "object"
|
|
},
|
|
"PodcastEpisodeUpdate": {
|
|
"properties": {
|
|
"audio_file": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Audio File"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"duration_seconds": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Duration Seconds"
|
|
},
|
|
"episode_number": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Episode Number"
|
|
},
|
|
"order": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Order"
|
|
},
|
|
"published": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Published"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"title": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Title"
|
|
}
|
|
},
|
|
"title": "PodcastEpisodeUpdate",
|
|
"type": "object"
|
|
},
|
|
"PodcastRead": {
|
|
"properties": {
|
|
"about": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "About"
|
|
},
|
|
"authors": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/AuthorWithRole"
|
|
},
|
|
"title": "Authors",
|
|
"type": "array"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"podcast_uuid": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
},
|
|
"public": {
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
},
|
|
"published": {
|
|
"default": false,
|
|
"title": "Published",
|
|
"type": "boolean"
|
|
},
|
|
"seo": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Seo"
|
|
},
|
|
"tags": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Tags"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"public",
|
|
"id",
|
|
"authors",
|
|
"podcast_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "PodcastRead",
|
|
"type": "object"
|
|
},
|
|
"PodcastReadWithEpisodeCount": {
|
|
"properties": {
|
|
"about": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "About"
|
|
},
|
|
"authors": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/AuthorWithRole"
|
|
},
|
|
"title": "Authors",
|
|
"type": "array"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"episode_count": {
|
|
"default": 0,
|
|
"title": "Episode Count",
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"podcast_uuid": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
},
|
|
"public": {
|
|
"title": "Public",
|
|
"type": "boolean"
|
|
},
|
|
"published": {
|
|
"default": false,
|
|
"title": "Published",
|
|
"type": "boolean"
|
|
},
|
|
"seo": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Seo"
|
|
},
|
|
"tags": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Tags"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"public",
|
|
"id",
|
|
"authors",
|
|
"podcast_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "PodcastReadWithEpisodeCount",
|
|
"type": "object"
|
|
},
|
|
"PodcastUpdate": {
|
|
"properties": {
|
|
"about": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "About"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"public": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Public"
|
|
},
|
|
"published": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Published"
|
|
},
|
|
"seo": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Seo"
|
|
},
|
|
"tags": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Tags"
|
|
},
|
|
"thumbnail_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Thumbnail Image"
|
|
}
|
|
},
|
|
"title": "PodcastUpdate",
|
|
"type": "object"
|
|
},
|
|
"PodcastsOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": false,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "PodcastsOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"ProgressResponse": {
|
|
"description": "User's progress in a specific course.",
|
|
"properties": {
|
|
"completed_activities": {
|
|
"description": "Number of activities the user has completed",
|
|
"title": "Completed Activities",
|
|
"type": "integer"
|
|
},
|
|
"completed_activity_ids": {
|
|
"description": "IDs of completed activities",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"title": "Completed Activity Ids",
|
|
"type": "array"
|
|
},
|
|
"completion_percentage": {
|
|
"description": "Completion percentage (0-100)",
|
|
"title": "Completion Percentage",
|
|
"type": "number"
|
|
},
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"total_activities": {
|
|
"description": "Total number of activities in the course",
|
|
"title": "Total Activities",
|
|
"type": "integer"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"user_id",
|
|
"total_activities",
|
|
"completed_activities",
|
|
"completion_percentage",
|
|
"completed_activity_ids"
|
|
],
|
|
"title": "ProgressResponse",
|
|
"type": "object"
|
|
},
|
|
"ProgressSummaryItem": {
|
|
"description": "Progress summary for a single course enrollment.",
|
|
"properties": {
|
|
"completed_activities": {
|
|
"title": "Completed Activities",
|
|
"type": "integer"
|
|
},
|
|
"completion_percentage": {
|
|
"title": "Completion Percentage",
|
|
"type": "number"
|
|
},
|
|
"course_name": {
|
|
"title": "Course Name",
|
|
"type": "string"
|
|
},
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"enrolled_at": {
|
|
"title": "Enrolled At",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"description": "Enrollment status (STATUS_IN_PROGRESS, STATUS_COMPLETED, etc.)",
|
|
"title": "Status",
|
|
"type": "string"
|
|
},
|
|
"total_activities": {
|
|
"title": "Total Activities",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"course_name",
|
|
"status",
|
|
"total_activities",
|
|
"completed_activities",
|
|
"completion_percentage",
|
|
"enrolled_at"
|
|
],
|
|
"title": "ProgressSummaryItem",
|
|
"type": "object"
|
|
},
|
|
"ProvisionUserRequest": {
|
|
"description": "Request body for provisioning a new user.",
|
|
"properties": {
|
|
"email": {
|
|
"format": "email",
|
|
"maxLength": 320,
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Optional arbitrary JSON metadata attached to the user for headless integrations",
|
|
"title": "Extra Metadata"
|
|
},
|
|
"first_name": {
|
|
"default": "",
|
|
"maxLength": 150,
|
|
"title": "First Name",
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"default": "",
|
|
"maxLength": 150,
|
|
"title": "Last Name",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"anyOf": [
|
|
{
|
|
"maxLength": 256,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Optional \u2014 if omitted, treated as SSO user with empty password",
|
|
"title": "Password"
|
|
},
|
|
"role_id": {
|
|
"default": 4,
|
|
"description": "Role id for the org membership (default 4 = student)",
|
|
"minimum": 1.0,
|
|
"title": "Role Id",
|
|
"type": "integer"
|
|
},
|
|
"username": {
|
|
"maxLength": 150,
|
|
"minLength": 1,
|
|
"title": "Username",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"email",
|
|
"username"
|
|
],
|
|
"title": "ProvisionUserRequest",
|
|
"type": "object"
|
|
},
|
|
"RAGChatRequest": {
|
|
"properties": {
|
|
"aichat_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Aichat Uuid"
|
|
},
|
|
"course_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Uuid"
|
|
},
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"mode": {
|
|
"default": "course_only",
|
|
"enum": [
|
|
"course_only",
|
|
"general"
|
|
],
|
|
"title": "Mode",
|
|
"type": "string"
|
|
},
|
|
"org_slug": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Slug"
|
|
}
|
|
},
|
|
"required": [
|
|
"message"
|
|
],
|
|
"title": "RAGChatRequest",
|
|
"type": "object"
|
|
},
|
|
"RAGIndexRequest": {
|
|
"properties": {
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid"
|
|
],
|
|
"title": "RAGIndexRequest",
|
|
"type": "object"
|
|
},
|
|
"RAGIndexResponse": {
|
|
"properties": {
|
|
"chunks_indexed": {
|
|
"title": "Chunks Indexed",
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"title": "Status",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"status",
|
|
"chunks_indexed"
|
|
],
|
|
"title": "RAGIndexResponse",
|
|
"type": "object"
|
|
},
|
|
"RAGSessionUpdateRequest": {
|
|
"properties": {
|
|
"favorite": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Favorite"
|
|
},
|
|
"title": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Title"
|
|
}
|
|
},
|
|
"title": "RAGSessionUpdateRequest",
|
|
"type": "object"
|
|
},
|
|
"ReactionRequest": {
|
|
"properties": {
|
|
"emoji": {
|
|
"title": "Emoji",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"emoji"
|
|
],
|
|
"title": "ReactionRequest",
|
|
"type": "object"
|
|
},
|
|
"RemoveUserResponse": {
|
|
"properties": {
|
|
"detail": {
|
|
"title": "Detail",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"detail"
|
|
],
|
|
"title": "RemoveUserResponse",
|
|
"type": "object"
|
|
},
|
|
"ResendVerificationRequest": {
|
|
"properties": {
|
|
"email": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Id"
|
|
}
|
|
},
|
|
"required": [
|
|
"email"
|
|
],
|
|
"title": "ResendVerificationRequest",
|
|
"type": "object"
|
|
},
|
|
"ResetCreditsResponse": {
|
|
"description": "Response for resetting AI credits usage.",
|
|
"properties": {
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"success": {
|
|
"title": "Success",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"success",
|
|
"message"
|
|
],
|
|
"title": "ResetCreditsResponse",
|
|
"type": "object"
|
|
},
|
|
"ResetPasswordRequest": {
|
|
"properties": {
|
|
"email": {
|
|
"anyOf": [
|
|
{
|
|
"format": "email",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Email"
|
|
},
|
|
"new_password": {
|
|
"title": "New Password",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"reset_code": {
|
|
"title": "Reset Code",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"new_password",
|
|
"org_id",
|
|
"reset_code"
|
|
],
|
|
"title": "ResetPasswordRequest",
|
|
"type": "object"
|
|
},
|
|
"ResetProgressResponse": {
|
|
"properties": {
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"steps_deleted": {
|
|
"title": "Steps Deleted",
|
|
"type": "integer"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"user_id",
|
|
"steps_deleted"
|
|
],
|
|
"title": "ResetProgressResponse",
|
|
"type": "object"
|
|
},
|
|
"ResourceAuthorshipEnum": {
|
|
"enum": [
|
|
"CREATOR",
|
|
"CONTRIBUTOR",
|
|
"MAINTAINER",
|
|
"REPORTER"
|
|
],
|
|
"title": "ResourceAuthorshipEnum",
|
|
"type": "string"
|
|
},
|
|
"ResourceAuthorshipStatusEnum": {
|
|
"enum": [
|
|
"ACTIVE",
|
|
"PENDING",
|
|
"INACTIVE"
|
|
],
|
|
"title": "ResourceAuthorshipStatusEnum",
|
|
"type": "string"
|
|
},
|
|
"RevokeCertificateResponse": {
|
|
"properties": {
|
|
"detail": {
|
|
"title": "Detail",
|
|
"type": "string"
|
|
},
|
|
"user_certification_uuid": {
|
|
"title": "User Certification Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"detail",
|
|
"user_certification_uuid"
|
|
],
|
|
"title": "RevokeCertificateResponse",
|
|
"type": "object"
|
|
},
|
|
"Rights": {
|
|
"properties": {
|
|
"activities": {
|
|
"$ref": "#/components/schemas/Permission"
|
|
},
|
|
"boards": {
|
|
"$ref": "#/components/schemas/PermissionsWithOwn",
|
|
"default": {
|
|
"action_create": false,
|
|
"action_delete": false,
|
|
"action_delete_own": false,
|
|
"action_read": true,
|
|
"action_read_own": true,
|
|
"action_update": false,
|
|
"action_update_own": false
|
|
}
|
|
},
|
|
"collections": {
|
|
"$ref": "#/components/schemas/Permission"
|
|
},
|
|
"communities": {
|
|
"$ref": "#/components/schemas/Permission"
|
|
},
|
|
"coursechapters": {
|
|
"$ref": "#/components/schemas/Permission"
|
|
},
|
|
"courses": {
|
|
"$ref": "#/components/schemas/PermissionsWithOwn"
|
|
},
|
|
"dashboard": {
|
|
"$ref": "#/components/schemas/DashboardPermission"
|
|
},
|
|
"discussions": {
|
|
"$ref": "#/components/schemas/PermissionsWithOwn"
|
|
},
|
|
"organizations": {
|
|
"$ref": "#/components/schemas/Permission"
|
|
},
|
|
"playgrounds": {
|
|
"$ref": "#/components/schemas/PermissionsWithOwn",
|
|
"default": {
|
|
"action_create": false,
|
|
"action_delete": false,
|
|
"action_delete_own": false,
|
|
"action_read": true,
|
|
"action_read_own": true,
|
|
"action_update": false,
|
|
"action_update_own": false
|
|
}
|
|
},
|
|
"podcasts": {
|
|
"$ref": "#/components/schemas/PermissionsWithOwn"
|
|
},
|
|
"roles": {
|
|
"$ref": "#/components/schemas/Permission"
|
|
},
|
|
"usergroups": {
|
|
"$ref": "#/components/schemas/Permission"
|
|
},
|
|
"users": {
|
|
"$ref": "#/components/schemas/Permission"
|
|
}
|
|
},
|
|
"required": [
|
|
"courses",
|
|
"users",
|
|
"usergroups",
|
|
"collections",
|
|
"organizations",
|
|
"coursechapters",
|
|
"activities",
|
|
"roles",
|
|
"dashboard",
|
|
"communities",
|
|
"discussions",
|
|
"podcasts"
|
|
],
|
|
"title": "Rights",
|
|
"type": "object"
|
|
},
|
|
"RoleCreate": {
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Id"
|
|
},
|
|
"rights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Rights"
|
|
},
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Rights"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "RoleCreate",
|
|
"type": "object"
|
|
},
|
|
"RoleRead": {
|
|
"properties": {
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Id"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Id"
|
|
},
|
|
"rights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Rights"
|
|
},
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Rights"
|
|
},
|
|
"role_type": {
|
|
"$ref": "#/components/schemas/RoleTypeEnum",
|
|
"default": "TYPE_GLOBAL"
|
|
},
|
|
"role_uuid": {
|
|
"title": "Role Uuid",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"role_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "RoleRead",
|
|
"type": "object"
|
|
},
|
|
"RoleTypeEnum": {
|
|
"enum": [
|
|
"TYPE_ORGANIZATION",
|
|
"TYPE_ORGANIZATION_API_TOKEN",
|
|
"TYPE_GLOBAL"
|
|
],
|
|
"title": "RoleTypeEnum",
|
|
"type": "string"
|
|
},
|
|
"RoleUpdate": {
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
},
|
|
"rights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Rights"
|
|
},
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Rights"
|
|
},
|
|
"role_id": {
|
|
"title": "Role Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "RoleUpdate",
|
|
"type": "object"
|
|
},
|
|
"SaveActivityContentRequest": {
|
|
"description": "Request to save AI-generated content to an activity",
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"additionalProperties": true,
|
|
"title": "Content",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity_uuid",
|
|
"content"
|
|
],
|
|
"title": "SaveActivityContentRequest",
|
|
"type": "object"
|
|
},
|
|
"SaveSubmissionRequest": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"block_id": {
|
|
"title": "Block Id",
|
|
"type": "string"
|
|
},
|
|
"execution_time_ms": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Execution Time Ms"
|
|
},
|
|
"language_id": {
|
|
"title": "Language Id",
|
|
"type": "integer"
|
|
},
|
|
"passed": {
|
|
"title": "Passed",
|
|
"type": "boolean"
|
|
},
|
|
"passed_tests": {
|
|
"title": "Passed Tests",
|
|
"type": "integer"
|
|
},
|
|
"results": {
|
|
"additionalProperties": true,
|
|
"title": "Results",
|
|
"type": "object"
|
|
},
|
|
"source_code": {
|
|
"title": "Source Code",
|
|
"type": "string"
|
|
},
|
|
"total_tests": {
|
|
"title": "Total Tests",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity_uuid",
|
|
"block_id",
|
|
"language_id",
|
|
"source_code",
|
|
"results",
|
|
"passed",
|
|
"total_tests",
|
|
"passed_tests"
|
|
],
|
|
"title": "SaveSubmissionRequest",
|
|
"type": "object"
|
|
},
|
|
"SearchDiscussionRead": {
|
|
"description": "DiscussionRead plus the parent community UUID so the UI can deep-link\nto `/community/{uuid}/discussion/{uuid}` without another round trip.",
|
|
"properties": {
|
|
"author_id": {
|
|
"title": "Author Id",
|
|
"type": "integer"
|
|
},
|
|
"community_id": {
|
|
"title": "Community Id",
|
|
"type": "integer"
|
|
},
|
|
"community_uuid": {
|
|
"default": "",
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Content"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"discussion_uuid": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
},
|
|
"edit_count": {
|
|
"default": 0,
|
|
"title": "Edit Count",
|
|
"type": "integer"
|
|
},
|
|
"emoji": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Emoji"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"is_locked": {
|
|
"default": false,
|
|
"title": "Is Locked",
|
|
"type": "boolean"
|
|
},
|
|
"is_pinned": {
|
|
"default": false,
|
|
"title": "Is Pinned",
|
|
"type": "boolean"
|
|
},
|
|
"label": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "general",
|
|
"title": "Label"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"title": "Title",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
},
|
|
"upvote_count": {
|
|
"title": "Upvote Count",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"title",
|
|
"discussion_uuid",
|
|
"upvote_count",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "SearchDiscussionRead",
|
|
"type": "object"
|
|
},
|
|
"SearchResult": {
|
|
"description": "Paginated search result grouped by resource type.\n\nEach resource list is capped at `limit` per page; `total_*` holds the full\ncount for the whole query so the UI can show per-tab totals.",
|
|
"properties": {
|
|
"collections": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CollectionRead"
|
|
},
|
|
"title": "Collections",
|
|
"type": "array"
|
|
},
|
|
"communities": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CommunityRead"
|
|
},
|
|
"title": "Communities",
|
|
"type": "array"
|
|
},
|
|
"courses": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CourseRead"
|
|
},
|
|
"title": "Courses",
|
|
"type": "array"
|
|
},
|
|
"discussions": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/SearchDiscussionRead"
|
|
},
|
|
"title": "Discussions",
|
|
"type": "array"
|
|
},
|
|
"playgrounds": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PlaygroundRead"
|
|
},
|
|
"title": "Playgrounds",
|
|
"type": "array"
|
|
},
|
|
"podcasts": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PodcastRead"
|
|
},
|
|
"title": "Podcasts",
|
|
"type": "array"
|
|
},
|
|
"total_collections": {
|
|
"default": 0,
|
|
"title": "Total Collections",
|
|
"type": "integer"
|
|
},
|
|
"total_communities": {
|
|
"default": 0,
|
|
"title": "Total Communities",
|
|
"type": "integer"
|
|
},
|
|
"total_courses": {
|
|
"default": 0,
|
|
"title": "Total Courses",
|
|
"type": "integer"
|
|
},
|
|
"total_discussions": {
|
|
"default": 0,
|
|
"title": "Total Discussions",
|
|
"type": "integer"
|
|
},
|
|
"total_playgrounds": {
|
|
"default": 0,
|
|
"title": "Total Playgrounds",
|
|
"type": "integer"
|
|
},
|
|
"total_podcasts": {
|
|
"default": 0,
|
|
"title": "Total Podcasts",
|
|
"type": "integer"
|
|
},
|
|
"total_users": {
|
|
"default": 0,
|
|
"title": "Total Users",
|
|
"type": "integer"
|
|
},
|
|
"users": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
},
|
|
"title": "Users",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"courses",
|
|
"collections",
|
|
"users",
|
|
"communities",
|
|
"discussions",
|
|
"playgrounds",
|
|
"podcasts"
|
|
],
|
|
"title": "SearchResult",
|
|
"type": "object"
|
|
},
|
|
"SendActivityAIChatMessage": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"aichat_uuid": {
|
|
"title": "Aichat Uuid",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"aichat_uuid",
|
|
"activity_uuid",
|
|
"message"
|
|
],
|
|
"title": "SendActivityAIChatMessage",
|
|
"type": "object"
|
|
},
|
|
"SendBoardsPlaygroundMessage": {
|
|
"properties": {
|
|
"block_uuid": {
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
},
|
|
"board_uuid": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
},
|
|
"current_html": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Current Html"
|
|
},
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"session_uuid": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"session_uuid",
|
|
"board_uuid",
|
|
"block_uuid",
|
|
"message"
|
|
],
|
|
"title": "SendBoardsPlaygroundMessage",
|
|
"type": "object"
|
|
},
|
|
"SendCoursePlanningMessage": {
|
|
"description": "Request to continue planning with a new message",
|
|
"properties": {
|
|
"attachments": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"$ref": "#/components/schemas/AttachmentData"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Attachments"
|
|
},
|
|
"current_plan": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CoursePlan"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"session_uuid": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"session_uuid",
|
|
"message"
|
|
],
|
|
"title": "SendCoursePlanningMessage",
|
|
"type": "object"
|
|
},
|
|
"SendEditorAIChatMessage": {
|
|
"description": "Request to send a message in an existing editor AI chat session",
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"aichat_uuid": {
|
|
"title": "Aichat Uuid",
|
|
"type": "string"
|
|
},
|
|
"current_content": {
|
|
"title": "Current Content"
|
|
},
|
|
"cursor_position": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Cursor Position"
|
|
},
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"selected_text": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Selected Text"
|
|
}
|
|
},
|
|
"required": [
|
|
"aichat_uuid",
|
|
"activity_uuid",
|
|
"message",
|
|
"current_content"
|
|
],
|
|
"title": "SendEditorAIChatMessage",
|
|
"type": "object"
|
|
},
|
|
"SendMagicBlockMessage": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"block_uuid": {
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
},
|
|
"current_html": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Current Html"
|
|
},
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"session_uuid": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"session_uuid",
|
|
"activity_uuid",
|
|
"block_uuid",
|
|
"message"
|
|
],
|
|
"title": "SendMagicBlockMessage",
|
|
"type": "object"
|
|
},
|
|
"SendPlatformResetCodeRequest": {
|
|
"properties": {
|
|
"email": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"email"
|
|
],
|
|
"title": "SendPlatformResetCodeRequest",
|
|
"type": "object"
|
|
},
|
|
"SendPlaygroundMessage": {
|
|
"properties": {
|
|
"current_html": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Current Html"
|
|
},
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"playground_uuid": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
},
|
|
"session_uuid": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"session_uuid",
|
|
"playground_uuid",
|
|
"message"
|
|
],
|
|
"title": "SendPlaygroundMessage",
|
|
"type": "object"
|
|
},
|
|
"SendResetCodeRequest": {
|
|
"properties": {
|
|
"email": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"email",
|
|
"org_id"
|
|
],
|
|
"title": "SendResetCodeRequest",
|
|
"type": "object"
|
|
},
|
|
"SeoOrgConfig": {
|
|
"properties": {
|
|
"default_meta_description": {
|
|
"default": "",
|
|
"title": "Default Meta Description",
|
|
"type": "string"
|
|
},
|
|
"default_meta_title_suffix": {
|
|
"default": "",
|
|
"title": "Default Meta Title Suffix",
|
|
"type": "string"
|
|
},
|
|
"default_og_image": {
|
|
"default": "",
|
|
"title": "Default Og Image",
|
|
"type": "string"
|
|
},
|
|
"google_site_verification": {
|
|
"default": "",
|
|
"title": "Google Site Verification",
|
|
"type": "string"
|
|
},
|
|
"noindex_communities": {
|
|
"default": false,
|
|
"title": "Noindex Communities",
|
|
"type": "boolean"
|
|
},
|
|
"twitter_handle": {
|
|
"default": "",
|
|
"title": "Twitter Handle",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "SeoOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"SetCreditsRequest": {
|
|
"description": "Request body for setting purchased AI credits to an absolute value.",
|
|
"properties": {
|
|
"amount": {
|
|
"title": "Amount",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"amount"
|
|
],
|
|
"title": "SetCreditsRequest",
|
|
"type": "object"
|
|
},
|
|
"SetCreditsResponse": {
|
|
"description": "Response for setting purchased AI credits.",
|
|
"properties": {
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"purchased_total": {
|
|
"title": "Purchased Total",
|
|
"type": "integer"
|
|
},
|
|
"success": {
|
|
"title": "Success",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"success",
|
|
"purchased_total",
|
|
"message"
|
|
],
|
|
"title": "SetCreditsResponse",
|
|
"type": "object"
|
|
},
|
|
"StartActivityAIChatSession": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity_uuid",
|
|
"message"
|
|
],
|
|
"title": "StartActivityAIChatSession",
|
|
"type": "object"
|
|
},
|
|
"StartBoardsPlaygroundSession": {
|
|
"properties": {
|
|
"block_uuid": {
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
},
|
|
"board_uuid": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
},
|
|
"context": {
|
|
"$ref": "#/components/schemas/BoardsPlaygroundContext"
|
|
},
|
|
"prompt": {
|
|
"title": "Prompt",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"board_uuid",
|
|
"block_uuid",
|
|
"prompt",
|
|
"context"
|
|
],
|
|
"title": "StartBoardsPlaygroundSession",
|
|
"type": "object"
|
|
},
|
|
"StartCoursePlanningSession": {
|
|
"description": "Request to start a new course planning session",
|
|
"properties": {
|
|
"attachments": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"$ref": "#/components/schemas/AttachmentData"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Attachments"
|
|
},
|
|
"language": {
|
|
"default": "en",
|
|
"title": "Language",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"prompt": {
|
|
"title": "Prompt",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"org_id",
|
|
"prompt"
|
|
],
|
|
"title": "StartCoursePlanningSession",
|
|
"type": "object"
|
|
},
|
|
"StartEditorAIChatSession": {
|
|
"description": "Request to start a new AI editor chat session",
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"current_content": {
|
|
"title": "Current Content"
|
|
},
|
|
"cursor_position": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Cursor Position"
|
|
},
|
|
"message": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"selected_text": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Selected Text"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity_uuid",
|
|
"message",
|
|
"current_content"
|
|
],
|
|
"title": "StartEditorAIChatSession",
|
|
"type": "object"
|
|
},
|
|
"StartMagicBlockSession": {
|
|
"properties": {
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"block_uuid": {
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
},
|
|
"context": {
|
|
"$ref": "#/components/schemas/MagicBlockContext"
|
|
},
|
|
"prompt": {
|
|
"title": "Prompt",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity_uuid",
|
|
"block_uuid",
|
|
"prompt",
|
|
"context"
|
|
],
|
|
"title": "StartMagicBlockSession",
|
|
"type": "object"
|
|
},
|
|
"StartPlaygroundSession": {
|
|
"properties": {
|
|
"context": {
|
|
"$ref": "#/components/schemas/PlaygroundContext"
|
|
},
|
|
"playground_uuid": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
},
|
|
"prompt": {
|
|
"title": "Prompt",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"playground_uuid",
|
|
"prompt",
|
|
"context"
|
|
],
|
|
"title": "StartPlaygroundSession",
|
|
"type": "object"
|
|
},
|
|
"StatusEnum": {
|
|
"enum": [
|
|
"STATUS_IN_PROGRESS",
|
|
"STATUS_COMPLETED",
|
|
"STATUS_PAUSED",
|
|
"STATUS_CANCELLED"
|
|
],
|
|
"title": "StatusEnum",
|
|
"type": "string"
|
|
},
|
|
"StorageOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "StorageOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"SuggestStructureRequest": {
|
|
"description": "Request to AI for structure suggestion.",
|
|
"properties": {
|
|
"course_name": {
|
|
"title": "Course Name",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"temp_id": {
|
|
"title": "Temp Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"temp_id",
|
|
"course_name"
|
|
],
|
|
"title": "SuggestStructureRequest",
|
|
"type": "object"
|
|
},
|
|
"TestCase": {
|
|
"properties": {
|
|
"expected_stdout": {
|
|
"title": "Expected Stdout",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "string"
|
|
},
|
|
"label": {
|
|
"title": "Label",
|
|
"type": "string"
|
|
},
|
|
"stdin": {
|
|
"title": "Stdin",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"label",
|
|
"stdin",
|
|
"expected_stdout"
|
|
],
|
|
"title": "TestCase",
|
|
"type": "object"
|
|
},
|
|
"ThirdPartyLogin": {
|
|
"properties": {
|
|
"access_token": {
|
|
"title": "Access Token",
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"provider": {
|
|
"const": "google",
|
|
"title": "Provider",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"email",
|
|
"provider",
|
|
"access_token"
|
|
],
|
|
"title": "ThirdPartyLogin",
|
|
"type": "object"
|
|
},
|
|
"ThumbnailType": {
|
|
"enum": [
|
|
"image",
|
|
"video",
|
|
"both"
|
|
],
|
|
"title": "ThumbnailType",
|
|
"type": "string"
|
|
},
|
|
"TokenResponse": {
|
|
"description": "JWT token issued on behalf of a user.",
|
|
"properties": {
|
|
"access_token": {
|
|
"description": "JWT access token",
|
|
"title": "Access Token",
|
|
"type": "string"
|
|
},
|
|
"token_type": {
|
|
"default": "bearer",
|
|
"description": "Token type (always 'bearer')",
|
|
"title": "Token Type",
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"description": "ID of the user the token was issued for",
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
},
|
|
"user_uuid": {
|
|
"description": "UUID of the user",
|
|
"title": "User Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"access_token",
|
|
"user_id",
|
|
"user_uuid"
|
|
],
|
|
"title": "TokenResponse",
|
|
"type": "object"
|
|
},
|
|
"Trail": {
|
|
"properties": {
|
|
"creation_date": {
|
|
"default": "",
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Id"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"trail_uuid": {
|
|
"default": "",
|
|
"title": "Trail Uuid",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"default": "",
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"org_id",
|
|
"user_id"
|
|
],
|
|
"title": "Trail",
|
|
"type": "object"
|
|
},
|
|
"TrailActivityProgress": {
|
|
"description": "A single activity within a chapter, annotated with the user's completion state.",
|
|
"properties": {
|
|
"activity_id": {
|
|
"title": "Activity Id",
|
|
"type": "integer"
|
|
},
|
|
"activity_sub_type": {
|
|
"title": "Activity Sub Type",
|
|
"type": "string"
|
|
},
|
|
"activity_type": {
|
|
"title": "Activity Type",
|
|
"type": "string"
|
|
},
|
|
"activity_uuid": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
},
|
|
"completed": {
|
|
"title": "Completed",
|
|
"type": "boolean"
|
|
},
|
|
"completed_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "ISO timestamp when the activity was marked complete; null if not completed",
|
|
"title": "Completed At"
|
|
},
|
|
"grade": {
|
|
"default": "",
|
|
"description": "Grade/feedback recorded on the trail step, when set",
|
|
"title": "Grade",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"order": {
|
|
"description": "Order of this activity within its chapter",
|
|
"title": "Order",
|
|
"type": "integer"
|
|
},
|
|
"published": {
|
|
"title": "Published",
|
|
"type": "boolean"
|
|
},
|
|
"teacher_verified": {
|
|
"default": false,
|
|
"description": "Whether a teacher has verified the completion (assignments)",
|
|
"title": "Teacher Verified",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"activity_uuid",
|
|
"activity_id",
|
|
"name",
|
|
"activity_type",
|
|
"activity_sub_type",
|
|
"order",
|
|
"published",
|
|
"completed"
|
|
],
|
|
"title": "TrailActivityProgress",
|
|
"type": "object"
|
|
},
|
|
"TrailChapterProgress": {
|
|
"description": "A chapter inside a course with its activities and per-chapter counts.",
|
|
"properties": {
|
|
"activities": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TrailActivityProgress"
|
|
},
|
|
"title": "Activities",
|
|
"type": "array"
|
|
},
|
|
"chapter_id": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
},
|
|
"chapter_uuid": {
|
|
"title": "Chapter Uuid",
|
|
"type": "string"
|
|
},
|
|
"completed_activities": {
|
|
"title": "Completed Activities",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"order": {
|
|
"title": "Order",
|
|
"type": "integer"
|
|
},
|
|
"total_activities": {
|
|
"title": "Total Activities",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"chapter_uuid",
|
|
"chapter_id",
|
|
"name",
|
|
"order",
|
|
"total_activities",
|
|
"completed_activities",
|
|
"activities"
|
|
],
|
|
"title": "TrailChapterProgress",
|
|
"type": "object"
|
|
},
|
|
"TrailCourseProgress": {
|
|
"description": "A course the user is enrolled in (or has touched), with the full chapter/activity breakdown.",
|
|
"properties": {
|
|
"chapters": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TrailChapterProgress"
|
|
},
|
|
"title": "Chapters",
|
|
"type": "array"
|
|
},
|
|
"completed_activities": {
|
|
"title": "Completed Activities",
|
|
"type": "integer"
|
|
},
|
|
"completion_percentage": {
|
|
"title": "Completion Percentage",
|
|
"type": "number"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"course_name": {
|
|
"title": "Course Name",
|
|
"type": "string"
|
|
},
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"enrolled_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "ISO timestamp the user was enrolled; null when there is no enrollment row",
|
|
"title": "Enrolled At"
|
|
},
|
|
"status": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "TrailRun status (STATUS_IN_PROGRESS, STATUS_COMPLETED, \u2026); null when there is no enrollment row",
|
|
"title": "Status"
|
|
},
|
|
"total_activities": {
|
|
"title": "Total Activities",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"course_uuid",
|
|
"course_id",
|
|
"course_name",
|
|
"total_activities",
|
|
"completed_activities",
|
|
"completion_percentage",
|
|
"chapters"
|
|
],
|
|
"title": "TrailCourseProgress",
|
|
"type": "object"
|
|
},
|
|
"TrailCreate": {
|
|
"properties": {
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"org_id",
|
|
"user_id"
|
|
],
|
|
"title": "TrailCreate",
|
|
"type": "object"
|
|
},
|
|
"TrailRead": {
|
|
"properties": {
|
|
"creation_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Creation Date"
|
|
},
|
|
"id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Id"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"runs": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TrailRunRead"
|
|
},
|
|
"title": "Runs",
|
|
"type": "array"
|
|
},
|
|
"trail_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Trail Uuid"
|
|
},
|
|
"update_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Update Date"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"org_id",
|
|
"user_id",
|
|
"runs"
|
|
],
|
|
"title": "TrailRead",
|
|
"type": "object"
|
|
},
|
|
"TrailRunRead": {
|
|
"properties": {
|
|
"course": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course"
|
|
},
|
|
"course_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Course Id"
|
|
},
|
|
"course_total_steps": {
|
|
"default": 0,
|
|
"title": "Course Total Steps",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Creation Date"
|
|
},
|
|
"data": {
|
|
"additionalProperties": true,
|
|
"title": "Data",
|
|
"type": "object"
|
|
},
|
|
"id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Id"
|
|
},
|
|
"org_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Id"
|
|
},
|
|
"status": {
|
|
"$ref": "#/components/schemas/StatusEnum",
|
|
"default": "STATUS_IN_PROGRESS"
|
|
},
|
|
"steps": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TrailStep"
|
|
},
|
|
"title": "Steps",
|
|
"type": "array"
|
|
},
|
|
"trail_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Trail Id"
|
|
},
|
|
"update_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Update Date"
|
|
},
|
|
"user_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "User Id"
|
|
}
|
|
},
|
|
"title": "TrailRunRead",
|
|
"type": "object"
|
|
},
|
|
"TrailStep": {
|
|
"properties": {
|
|
"activity_id": {
|
|
"title": "Activity Id",
|
|
"type": "integer"
|
|
},
|
|
"complete": {
|
|
"title": "Complete",
|
|
"type": "boolean"
|
|
},
|
|
"course_id": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"additionalProperties": true,
|
|
"title": "Data",
|
|
"type": "object"
|
|
},
|
|
"grade": {
|
|
"title": "Grade",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Id"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"teacher_verified": {
|
|
"title": "Teacher Verified",
|
|
"type": "boolean"
|
|
},
|
|
"trail_id": {
|
|
"title": "Trail Id",
|
|
"type": "integer"
|
|
},
|
|
"trailrun_id": {
|
|
"title": "Trailrun Id",
|
|
"type": "integer"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"complete",
|
|
"teacher_verified",
|
|
"grade",
|
|
"trailrun_id",
|
|
"trail_id",
|
|
"activity_id",
|
|
"course_id",
|
|
"org_id",
|
|
"user_id",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "TrailStep",
|
|
"type": "object"
|
|
},
|
|
"UnenrollResponse": {
|
|
"properties": {
|
|
"detail": {
|
|
"title": "Detail",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"detail"
|
|
],
|
|
"title": "UnenrollResponse",
|
|
"type": "object"
|
|
},
|
|
"UpdateUserRequest": {
|
|
"description": "Fields that can be updated via the admin profile PATCH.",
|
|
"properties": {
|
|
"avatar_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Avatar Image"
|
|
},
|
|
"bio": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Bio"
|
|
},
|
|
"details": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Details"
|
|
},
|
|
"email": {
|
|
"anyOf": [
|
|
{
|
|
"format": "email",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Email"
|
|
},
|
|
"first_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "First Name"
|
|
},
|
|
"last_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Name"
|
|
},
|
|
"profile": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Profile"
|
|
},
|
|
"username": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Username"
|
|
}
|
|
},
|
|
"title": "UpdateUserRequest",
|
|
"type": "object"
|
|
},
|
|
"UploadedFileInfo": {
|
|
"description": "Info about a single uploaded file.",
|
|
"properties": {
|
|
"extension": {
|
|
"title": "Extension",
|
|
"type": "string"
|
|
},
|
|
"file_id": {
|
|
"title": "File Id",
|
|
"type": "string"
|
|
},
|
|
"file_type": {
|
|
"title": "File Type",
|
|
"type": "string"
|
|
},
|
|
"filename": {
|
|
"title": "Filename",
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"title": "Size",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"file_id",
|
|
"filename",
|
|
"file_type",
|
|
"size",
|
|
"extension"
|
|
],
|
|
"title": "UploadedFileInfo",
|
|
"type": "object"
|
|
},
|
|
"UserCreate": {
|
|
"properties": {
|
|
"avatar_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Avatar Image"
|
|
},
|
|
"bio": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Bio"
|
|
},
|
|
"details": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Details"
|
|
},
|
|
"email": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"first_name": {
|
|
"default": "",
|
|
"title": "First Name",
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"default": "",
|
|
"title": "Last Name",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"title": "Password",
|
|
"type": "string"
|
|
},
|
|
"profile": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Profile"
|
|
},
|
|
"username": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"email",
|
|
"password"
|
|
],
|
|
"title": "UserCreate",
|
|
"type": "object"
|
|
},
|
|
"UserDataExportResponse": {
|
|
"description": "Full GDPR data export bundle.",
|
|
"properties": {
|
|
"certificates": {
|
|
"description": "Certificates awarded in the caller's org",
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Certificates",
|
|
"type": "array"
|
|
},
|
|
"exported_at": {
|
|
"description": "ISO8601 timestamp when the export was generated",
|
|
"title": "Exported At",
|
|
"type": "string"
|
|
},
|
|
"memberships": {
|
|
"description": "Org memberships scoped to the caller's org",
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Memberships",
|
|
"type": "array"
|
|
},
|
|
"profile": {
|
|
"additionalProperties": true,
|
|
"description": "The user's profile (scrubbed of sensitive fields)",
|
|
"title": "Profile",
|
|
"type": "object"
|
|
},
|
|
"trail_runs": {
|
|
"description": "Course enrollments / trail runs",
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Trail Runs",
|
|
"type": "array"
|
|
},
|
|
"trail_steps": {
|
|
"description": "Activity completions",
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Trail Steps",
|
|
"type": "array"
|
|
},
|
|
"trails": {
|
|
"description": "Learning trails in the caller's org",
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Trails",
|
|
"type": "array"
|
|
},
|
|
"user_groups": {
|
|
"description": "Cohort memberships in the caller's org",
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "User Groups",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"profile",
|
|
"memberships",
|
|
"trails",
|
|
"trail_runs",
|
|
"trail_steps",
|
|
"certificates",
|
|
"user_groups",
|
|
"exported_at"
|
|
],
|
|
"title": "UserDataExportResponse",
|
|
"type": "object"
|
|
},
|
|
"UserGroupCourseResponse": {
|
|
"properties": {
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"detail": {
|
|
"title": "Detail",
|
|
"type": "string"
|
|
},
|
|
"usergroup_uuid": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"detail",
|
|
"usergroup_uuid",
|
|
"course_uuid"
|
|
],
|
|
"title": "UserGroupCourseResponse",
|
|
"type": "object"
|
|
},
|
|
"UserGroupCreate": {
|
|
"properties": {
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"description"
|
|
],
|
|
"title": "UserGroupCreate",
|
|
"type": "object"
|
|
},
|
|
"UserGroupMemberListItem": {
|
|
"properties": {
|
|
"added_at": {
|
|
"title": "Added At",
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"additionalProperties": true,
|
|
"title": "User",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"user",
|
|
"added_at"
|
|
],
|
|
"title": "UserGroupMemberListItem",
|
|
"type": "object"
|
|
},
|
|
"UserGroupMemberResponse": {
|
|
"properties": {
|
|
"detail": {
|
|
"title": "Detail",
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
},
|
|
"usergroup_uuid": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"detail",
|
|
"usergroup_uuid",
|
|
"user_id"
|
|
],
|
|
"title": "UserGroupMemberResponse",
|
|
"type": "object"
|
|
},
|
|
"UserGroupOrgConfig": {
|
|
"properties": {
|
|
"enabled": {
|
|
"default": true,
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"default": 10,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "UserGroupOrgConfig",
|
|
"type": "object"
|
|
},
|
|
"UserGroupRead": {
|
|
"properties": {
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
},
|
|
"usergroup_uuid": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"description",
|
|
"id",
|
|
"usergroup_uuid",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "UserGroupRead",
|
|
"type": "object"
|
|
},
|
|
"UserGroupResponse": {
|
|
"description": "A user group / cohort.",
|
|
"properties": {
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
},
|
|
"usergroup_uuid": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"org_id",
|
|
"usergroup_uuid",
|
|
"name",
|
|
"description",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "UserGroupResponse",
|
|
"type": "object"
|
|
},
|
|
"UserGroupUpdate": {
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Name"
|
|
}
|
|
},
|
|
"title": "UserGroupUpdate",
|
|
"type": "object"
|
|
},
|
|
"UserRead": {
|
|
"properties": {
|
|
"avatar_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Avatar Image"
|
|
},
|
|
"bio": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Bio"
|
|
},
|
|
"details": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Details"
|
|
},
|
|
"email": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"email_verified": {
|
|
"default": false,
|
|
"title": "Email Verified",
|
|
"type": "boolean"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"first_name": {
|
|
"title": "First Name",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"is_superadmin": {
|
|
"default": false,
|
|
"title": "Is Superadmin",
|
|
"type": "boolean"
|
|
},
|
|
"last_login_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Login At"
|
|
},
|
|
"last_name": {
|
|
"title": "Last Name",
|
|
"type": "string"
|
|
},
|
|
"profile": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Profile"
|
|
},
|
|
"signup_method": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Signup Method"
|
|
},
|
|
"user_uuid": {
|
|
"title": "User Uuid",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"first_name",
|
|
"last_name",
|
|
"email",
|
|
"id",
|
|
"user_uuid"
|
|
],
|
|
"title": "UserRead",
|
|
"type": "object"
|
|
},
|
|
"UserReadPublic": {
|
|
"description": "User model for public-facing endpoints \u2014 excludes sensitive fields.",
|
|
"properties": {
|
|
"avatar_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Avatar Image"
|
|
},
|
|
"bio": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Bio"
|
|
},
|
|
"details": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Details"
|
|
},
|
|
"email": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"email_verified": {
|
|
"default": false,
|
|
"title": "Email Verified",
|
|
"type": "boolean"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"first_name": {
|
|
"title": "First Name",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"last_name": {
|
|
"title": "Last Name",
|
|
"type": "string"
|
|
},
|
|
"profile": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Profile"
|
|
},
|
|
"user_uuid": {
|
|
"title": "User Uuid",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"first_name",
|
|
"last_name",
|
|
"email",
|
|
"id",
|
|
"user_uuid"
|
|
],
|
|
"title": "UserReadPublic",
|
|
"type": "object"
|
|
},
|
|
"UserRoleWithOrg": {
|
|
"properties": {
|
|
"org": {
|
|
"$ref": "#/components/schemas/OrganizationRead"
|
|
},
|
|
"role": {
|
|
"$ref": "#/components/schemas/RoleRead"
|
|
}
|
|
},
|
|
"required": [
|
|
"role",
|
|
"org"
|
|
],
|
|
"title": "UserRoleWithOrg",
|
|
"type": "object"
|
|
},
|
|
"UserSession": {
|
|
"properties": {
|
|
"roles": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/UserRoleWithOrg"
|
|
},
|
|
"title": "Roles",
|
|
"type": "array"
|
|
},
|
|
"user": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
},
|
|
"required": [
|
|
"user",
|
|
"roles"
|
|
],
|
|
"title": "UserSession",
|
|
"type": "object"
|
|
},
|
|
"UserTrailDetail": {
|
|
"description": "Full breakdown of a user's trail across courses in the org.",
|
|
"properties": {
|
|
"courses": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TrailCourseProgress"
|
|
},
|
|
"title": "Courses",
|
|
"type": "array"
|
|
},
|
|
"creation_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Creation Date"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"trail_uuid": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Null if the user has never started a trail in this org",
|
|
"title": "Trail Uuid"
|
|
},
|
|
"update_date": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Update Date"
|
|
},
|
|
"user_id": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"user_id",
|
|
"org_id",
|
|
"courses"
|
|
],
|
|
"title": "UserTrailDetail",
|
|
"type": "object"
|
|
},
|
|
"UserUpdate": {
|
|
"properties": {
|
|
"avatar_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Avatar Image"
|
|
},
|
|
"bio": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "",
|
|
"title": "Bio"
|
|
},
|
|
"details": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Details"
|
|
},
|
|
"email": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"extra_metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Extra Metadata"
|
|
},
|
|
"first_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "First Name"
|
|
},
|
|
"last_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Name"
|
|
},
|
|
"profile": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Profile"
|
|
},
|
|
"username": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"email"
|
|
],
|
|
"title": "UserUpdate",
|
|
"type": "object"
|
|
},
|
|
"UserUpdatePassword": {
|
|
"properties": {
|
|
"new_password": {
|
|
"title": "New Password",
|
|
"type": "string"
|
|
},
|
|
"old_password": {
|
|
"title": "Old Password",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"old_password",
|
|
"new_password"
|
|
],
|
|
"title": "UserUpdatePassword",
|
|
"type": "object"
|
|
},
|
|
"UserUserGroupItem": {
|
|
"properties": {
|
|
"added_at": {
|
|
"title": "Added At",
|
|
"type": "string"
|
|
},
|
|
"usergroup": {
|
|
"additionalProperties": true,
|
|
"title": "Usergroup",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"usergroup",
|
|
"added_at"
|
|
],
|
|
"title": "UserUserGroupItem",
|
|
"type": "object"
|
|
},
|
|
"ValidationError": {
|
|
"properties": {
|
|
"ctx": {
|
|
"title": "Context",
|
|
"type": "object"
|
|
},
|
|
"input": {
|
|
"title": "Input"
|
|
},
|
|
"loc": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
]
|
|
},
|
|
"title": "Location",
|
|
"type": "array"
|
|
},
|
|
"msg": {
|
|
"title": "Message",
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"title": "Error Type",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"loc",
|
|
"msg",
|
|
"type"
|
|
],
|
|
"title": "ValidationError",
|
|
"type": "object"
|
|
},
|
|
"VerifyEmailRequest": {
|
|
"properties": {
|
|
"email": {
|
|
"anyOf": [
|
|
{
|
|
"format": "email",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Email"
|
|
},
|
|
"org_uuid": {
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"title": "Token",
|
|
"type": "string"
|
|
},
|
|
"user_uuid": {
|
|
"title": "User Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"token",
|
|
"user_uuid",
|
|
"org_uuid"
|
|
],
|
|
"title": "VerifyEmailRequest",
|
|
"type": "object"
|
|
},
|
|
"WebhookDeliveryLogRead": {
|
|
"properties": {
|
|
"attempt": {
|
|
"title": "Attempt",
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"title": "Created At",
|
|
"type": "string"
|
|
},
|
|
"delivery_uuid": {
|
|
"title": "Delivery Uuid",
|
|
"type": "string"
|
|
},
|
|
"error_message": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Error Message"
|
|
},
|
|
"event_name": {
|
|
"title": "Event Name",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"request_payload": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Request Payload"
|
|
},
|
|
"response_body": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Response Body"
|
|
},
|
|
"response_status": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Response Status"
|
|
},
|
|
"success": {
|
|
"title": "Success",
|
|
"type": "boolean"
|
|
},
|
|
"webhook_id": {
|
|
"title": "Webhook Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"webhook_id",
|
|
"event_name",
|
|
"delivery_uuid",
|
|
"success",
|
|
"attempt",
|
|
"created_at"
|
|
],
|
|
"title": "WebhookDeliveryLogRead",
|
|
"type": "object"
|
|
},
|
|
"WebhookEndpointCreate": {
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"events": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Events",
|
|
"type": "array"
|
|
},
|
|
"url": {
|
|
"title": "Url",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"url",
|
|
"events"
|
|
],
|
|
"title": "WebhookEndpointCreate",
|
|
"type": "object"
|
|
},
|
|
"WebhookEndpointCreatedResponse": {
|
|
"description": "Returned only on create / regenerate -- the only time the secret is shown.",
|
|
"properties": {
|
|
"created_by_user_id": {
|
|
"title": "Created By User Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"events": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Events",
|
|
"type": "array"
|
|
},
|
|
"is_active": {
|
|
"title": "Is Active",
|
|
"type": "boolean"
|
|
},
|
|
"secret": {
|
|
"title": "Secret",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"title": "Url",
|
|
"type": "string"
|
|
},
|
|
"webhook_uuid": {
|
|
"title": "Webhook Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"webhook_uuid",
|
|
"url",
|
|
"events",
|
|
"is_active",
|
|
"secret",
|
|
"created_by_user_id",
|
|
"creation_date"
|
|
],
|
|
"title": "WebhookEndpointCreatedResponse",
|
|
"type": "object"
|
|
},
|
|
"WebhookEndpointRead": {
|
|
"properties": {
|
|
"created_by_user_id": {
|
|
"title": "Created By User Id",
|
|
"type": "integer"
|
|
},
|
|
"creation_date": {
|
|
"title": "Creation Date",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"events": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Events",
|
|
"type": "array"
|
|
},
|
|
"has_secret": {
|
|
"default": true,
|
|
"title": "Has Secret",
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"is_active": {
|
|
"title": "Is Active",
|
|
"type": "boolean"
|
|
},
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"source": {
|
|
"default": "manual",
|
|
"title": "Source",
|
|
"type": "string"
|
|
},
|
|
"update_date": {
|
|
"title": "Update Date",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"title": "Url",
|
|
"type": "string"
|
|
},
|
|
"webhook_uuid": {
|
|
"title": "Webhook Uuid",
|
|
"type": "string"
|
|
},
|
|
"zap_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Zap Id"
|
|
},
|
|
"zap_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Zap Name"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"webhook_uuid",
|
|
"org_id",
|
|
"url",
|
|
"events",
|
|
"is_active",
|
|
"created_by_user_id",
|
|
"creation_date",
|
|
"update_date"
|
|
],
|
|
"title": "WebhookEndpointRead",
|
|
"type": "object"
|
|
},
|
|
"WebhookEndpointUpdate": {
|
|
"properties": {
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Description"
|
|
},
|
|
"events": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Events"
|
|
},
|
|
"is_active": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Is Active"
|
|
},
|
|
"url": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Url"
|
|
}
|
|
},
|
|
"title": "WebhookEndpointUpdate",
|
|
"type": "object"
|
|
},
|
|
"ZapierCourseItem": {
|
|
"properties": {
|
|
"course_uuid": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"course_uuid",
|
|
"name"
|
|
],
|
|
"title": "ZapierCourseItem",
|
|
"type": "object"
|
|
},
|
|
"ZapierMeResponse": {
|
|
"properties": {
|
|
"org_id": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
},
|
|
"org_name": {
|
|
"title": "Org Name",
|
|
"type": "string"
|
|
},
|
|
"org_slug": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
},
|
|
"token_id": {
|
|
"title": "Token Id",
|
|
"type": "integer"
|
|
},
|
|
"token_name": {
|
|
"title": "Token Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"org_id",
|
|
"org_name",
|
|
"org_slug",
|
|
"token_id",
|
|
"token_name"
|
|
],
|
|
"title": "ZapierMeResponse",
|
|
"type": "object"
|
|
},
|
|
"ZapierSubscriptionCreate": {
|
|
"properties": {
|
|
"event": {
|
|
"description": "A single event name from /events",
|
|
"title": "Event",
|
|
"type": "string"
|
|
},
|
|
"target_url": {
|
|
"description": "Zapier's REST Hook callback URL",
|
|
"title": "Target Url",
|
|
"type": "string"
|
|
},
|
|
"zap_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Zapier's internal Zap identifier",
|
|
"title": "Zap Id"
|
|
},
|
|
"zap_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Human-readable Zap name",
|
|
"title": "Zap Name"
|
|
}
|
|
},
|
|
"required": [
|
|
"target_url",
|
|
"event"
|
|
],
|
|
"title": "ZapierSubscriptionCreate",
|
|
"type": "object"
|
|
},
|
|
"ZapierSubscriptionResponse": {
|
|
"properties": {
|
|
"event": {
|
|
"title": "Event",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"is_active": {
|
|
"title": "Is Active",
|
|
"type": "boolean"
|
|
},
|
|
"target_url": {
|
|
"title": "Target Url",
|
|
"type": "string"
|
|
},
|
|
"webhook_uuid": {
|
|
"title": "Webhook Uuid",
|
|
"type": "string"
|
|
},
|
|
"zap_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Zap Id"
|
|
},
|
|
"zap_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Zap Name"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"webhook_uuid",
|
|
"target_url",
|
|
"event",
|
|
"is_active"
|
|
],
|
|
"title": "ZapierSubscriptionResponse",
|
|
"type": "object"
|
|
},
|
|
"ZapierUserGroupItem": {
|
|
"properties": {
|
|
"description": {
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"usergroup_uuid": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"usergroup_uuid",
|
|
"name",
|
|
"description"
|
|
],
|
|
"title": "ZapierUserGroupItem",
|
|
"type": "object"
|
|
},
|
|
"ZapierUserItem": {
|
|
"properties": {
|
|
"email": {
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
"first_name": {
|
|
"title": "First Name",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"last_name": {
|
|
"title": "Last Name",
|
|
"type": "string"
|
|
},
|
|
"user_uuid": {
|
|
"title": "User Uuid",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"user_uuid",
|
|
"email",
|
|
"username",
|
|
"first_name",
|
|
"last_name"
|
|
],
|
|
"title": "ZapierUserItem",
|
|
"type": "object"
|
|
},
|
|
"src__db__communities__discussion_reactions__ReactionUser": {
|
|
"description": "User info for reaction display.",
|
|
"properties": {
|
|
"avatar_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Avatar Image"
|
|
},
|
|
"first_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "First Name"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"last_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Name"
|
|
},
|
|
"user_uuid": {
|
|
"title": "User Uuid",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"user_uuid",
|
|
"username"
|
|
],
|
|
"title": "ReactionUser",
|
|
"type": "object"
|
|
},
|
|
"src__db__playground_reactions__ReactionUser": {
|
|
"properties": {
|
|
"avatar_image": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Avatar Image"
|
|
},
|
|
"first_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "First Name"
|
|
},
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "integer"
|
|
},
|
|
"last_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Last Name"
|
|
},
|
|
"user_uuid": {
|
|
"title": "User Uuid",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"user_uuid",
|
|
"username"
|
|
],
|
|
"title": "ReactionUser",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"info": {
|
|
"description": "LearnHouse is an open-source platform tailored for learning experiences.",
|
|
"title": "LearnHouse",
|
|
"version": "1.2.7"
|
|
},
|
|
"openapi": "3.1.0",
|
|
"paths": {
|
|
"/": {
|
|
"get": {
|
|
"operationId": "root__get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
}
|
|
},
|
|
"summary": "Root"
|
|
}
|
|
},
|
|
"/api/v1/activities/": {
|
|
"post": {
|
|
"description": "Create a new activity inside a chapter. The authenticated user must have permission to edit the parent course.",
|
|
"operationId": "api_create_activity_api_v1_activities__post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Activity created and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create activities in this chapter"
|
|
},
|
|
"404": {
|
|
"description": "Parent chapter or course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/chapter/{chapter_id}": {
|
|
"get": {
|
|
"description": "Get all activities that belong to the given chapter, in their configured order.",
|
|
"operationId": "api_get_chapter_activities_api_v1_activities_chapter__chapter_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "chapter_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
},
|
|
"title": "Response 200 Api Get Chapter Activities Api V1 Activities Chapter Chapter Id Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of activities for the chapter."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this chapter"
|
|
},
|
|
"404": {
|
|
"description": "Chapter not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List chapter activities",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/documentpdf": {
|
|
"post": {
|
|
"description": "Create a new activity by uploading a PDF document. The file is stored and attached to the given chapter.",
|
|
"operationId": "api_create_documentpdf_activity_api_v1_activities_documentpdf_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_documentpdf_activity_api_v1_activities_documentpdf_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "PDF activity created and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create activities in this chapter"
|
|
},
|
|
"404": {
|
|
"description": "Chapter not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create PDF document activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/documentpdf/{activity_uuid}": {
|
|
"put": {
|
|
"operationId": "api_update_documentpdf_activity_api_v1_activities_documentpdf__activity_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_documentpdf_activity_api_v1_activities_documentpdf__activity_uuid__put"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update PDF document activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/external_video": {
|
|
"post": {
|
|
"description": "Create a new activity that embeds an externally hosted video (e.g. YouTube, Vimeo) instead of uploading a file.",
|
|
"operationId": "api_create_external_video_activity_api_v1_activities_external_video_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ExternalVideo"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "External video activity created and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create activities in this chapter"
|
|
},
|
|
"404": {
|
|
"description": "Chapter not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create external video activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/external_video/{activity_uuid}": {
|
|
"put": {
|
|
"operationId": "api_update_external_video_activity_api_v1_activities_external_video__activity_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ExternalVideoUpdateBody"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update external video activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/id/{activity_id}": {
|
|
"get": {
|
|
"description": "Get a single activity by its numeric database ID.",
|
|
"operationId": "api_get_activityby_id_api_v1_activities_id__activity_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Activity returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this activity"
|
|
},
|
|
"404": {
|
|
"description": "Activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get activity by ID",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/video": {
|
|
"post": {
|
|
"description": "Create a new video activity by uploading a video file. The video is stored and attached to the given chapter.",
|
|
"operationId": "api_create_video_activity_api_v1_activities_video_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_video_activity_api_v1_activities_video_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Video activity created and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create activities in this chapter"
|
|
},
|
|
"404": {
|
|
"description": "Chapter not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create video activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/video/{activity_uuid}": {
|
|
"put": {
|
|
"operationId": "api_update_video_activity_api_v1_activities_video__activity_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_video_activity_api_v1_activities_video__activity_uuid__put"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update hosted video activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/{activity_uuid}": {
|
|
"delete": {
|
|
"description": "Delete an activity by its UUID. The authenticated user must have permission to edit the parent course.",
|
|
"operationId": "api_delete_activity_api_v1_activities__activity_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Activity deleted."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this activity"
|
|
},
|
|
"404": {
|
|
"description": "Activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Get a single activity by its UUID.",
|
|
"operationId": "api_get_activity_api_v1_activities__activity_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Activity returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this activity"
|
|
},
|
|
"404": {
|
|
"description": "Activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get activity by UUID",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update an activity's fields by its UUID. Creates a new version when content changes.",
|
|
"operationId": "api_update_activity_api_v1_activities__activity_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Activity updated and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update this activity"
|
|
},
|
|
"404": {
|
|
"description": "Activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/{activity_uuid}/editor-bootstrap": {
|
|
"get": {
|
|
"description": "Single-roundtrip payload for the activity editor: activity + minimal course + org with resolved features.",
|
|
"operationId": "api_get_editor_bootstrap_api_v1_activities__activity_uuid__editor_bootstrap_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EditorBootstrapResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Editor bootstrap payload",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/{activity_uuid}/state": {
|
|
"get": {
|
|
"description": "Get the current state of an activity for conflict detection. Returns lightweight info (update_date, current_version, last_modified_by) used by the frontend to detect remote changes.",
|
|
"operationId": "api_get_activity_state_api_v1_activities__activity_uuid__state_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityStateRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Current activity state."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this activity"
|
|
},
|
|
"404": {
|
|
"description": "Activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get activity state",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/{activity_uuid}/usergroups": {
|
|
"get": {
|
|
"description": "Return the user groups that can access this activity when lock_type is 'restricted'.",
|
|
"operationId": "api_list_activity_usergroups_api_v1_activities__activity_uuid__usergroups_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List user groups assigned to a locked activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/{activity_uuid}/usergroups/{usergroup_uuid}": {
|
|
"delete": {
|
|
"description": "Remove the association between a user group and this activity.",
|
|
"operationId": "api_remove_activity_usergroup_api_v1_activities__activity_uuid__usergroups__usergroup_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Revoke a user group's access to a locked activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Associate a user group with this activity so its members can access it when lock_type is 'restricted'.",
|
|
"operationId": "api_add_activity_usergroup_api_v1_activities__activity_uuid__usergroups__usergroup_uuid__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Grant a user group access to a locked activity",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/{activity_uuid}/versions": {
|
|
"get": {
|
|
"description": "Get the version history for an activity, ordered newest first. Supports pagination via limit and offset.",
|
|
"operationId": "api_get_activity_versions_api_v1_activities__activity_uuid__versions_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 20,
|
|
"maximum": 100,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "offset",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 0,
|
|
"title": "Offset",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ActivityVersionRead"
|
|
},
|
|
"title": "Response 200 Api Get Activity Versions Api V1 Activities Activity Uuid Versions Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of activity versions."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this activity's versions"
|
|
},
|
|
"404": {
|
|
"description": "Activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List activity versions",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/{activity_uuid}/versions/{version_number}": {
|
|
"get": {
|
|
"description": "Get a specific historical version of an activity by its version number.",
|
|
"operationId": "api_get_activity_version_api_v1_activities__activity_uuid__versions__version_number__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "version_number",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Version Number",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityVersionRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Activity version returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this activity version"
|
|
},
|
|
"404": {
|
|
"description": "Activity or version not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get activity version",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/activities/{activity_uuid}/versions/{version_number}/restore": {
|
|
"post": {
|
|
"description": "Restore an activity to a previous version. Creates a new version with the restored content rather than rewriting history.",
|
|
"operationId": "api_restore_activity_version_api_v1_activities__activity_uuid__versions__version_number__restore_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "version_number",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Version Number",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Activity restored; returns the updated activity."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to restore this activity"
|
|
},
|
|
"404": {
|
|
"description": "Activity or version not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Restore activity version",
|
|
"tags": [
|
|
"activities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/auth/magic-consume": {
|
|
"get": {
|
|
"description": "Public endpoint \u2014 no API token required. Validates the magic-link JWT from the query string, sets authentication cookies, and redirects to the target path. On error, renders a friendly HTML page with a support link instead of a raw JSON error.",
|
|
"operationId": "api_admin_magic_consume_api_v1_admin__org_slug__auth_magic_consume_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Magic-link JWT",
|
|
"in": "query",
|
|
"name": "token",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Magic-link JWT",
|
|
"title": "Token",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"302": {
|
|
"description": "Success \u2014 cookies set and redirect to target"
|
|
},
|
|
"410": {
|
|
"description": "Token invalid, expired, or user no longer a member (HTML page)"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Consume a magic sign-in link (browser-facing)",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/auth/magic-link": {
|
|
"post": {
|
|
"description": "Generate a short-lived URL that, when opened in a browser, will log the target user in and optionally redirect them to a specific path. Token lifetime is clamped to 60\u2013900 seconds.",
|
|
"operationId": "api_admin_issue_magic_link_api_v1_admin__org_slug__auth_magic_link_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MagicLinkRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MagicLinkResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Magic sign-in URL and underlying JWT. Token lifetime is already clamped."
|
|
},
|
|
"400": {
|
|
"description": "redirect_to is not a same-origin path"
|
|
},
|
|
"403": {
|
|
"description": "User not in this org"
|
|
},
|
|
"404": {
|
|
"description": "User not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Issue a magic sign-in link",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/auth/token": {
|
|
"post": {
|
|
"description": "Issue a JWT access token on behalf of a user. The user must belong to the organization matching the org_slug. Requires `users.action_read` permission.",
|
|
"operationId": "api_admin_issue_token_api_v1_admin__org_slug__auth_token_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/IssueTokenRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TokenResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Access token minted on behalf of the target user."
|
|
},
|
|
"403": {
|
|
"description": "API token lacks permission, user not in org, or org_slug mismatch"
|
|
},
|
|
"404": {
|
|
"description": "User or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Issue a user token",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/certifications/{user_id}": {
|
|
"get": {
|
|
"description": "Get all certificates awarded to a user in the organization. Includes certification details and course information. Requires `certifications.action_read` permission.",
|
|
"operationId": "api_admin_get_user_certificates_api_v1_admin__org_slug__certifications__user_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CertificateItem"
|
|
},
|
|
"title": "Response Api Admin Get User Certificates Api V1 Admin Org Slug Certifications User Id Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "All certificates awarded to the user in this org."
|
|
},
|
|
"404": {
|
|
"description": "User not found or not a member of this organization"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get user certificates",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/certifications/{user_id}/{course_uuid}/award": {
|
|
"post": {
|
|
"description": "Award a certificate to a user bypassing the normal completion gate. Useful for migrations and manual overrides. The course must have a certification configured.",
|
|
"operationId": "api_admin_award_certificate_api_v1_admin__org_slug__certifications__user_id___course_uuid__award_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AwardCertificateResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Certificate awarded; returns the new user_certification_uuid."
|
|
},
|
|
"400": {
|
|
"description": "User already has a certificate for this course"
|
|
},
|
|
"404": {
|
|
"description": "Course or certification not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Manually award a certificate",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/certifications/{user_id}/{user_certification_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a certificate row. Does not affect course enrollment or progress.",
|
|
"operationId": "api_admin_revoke_certificate_api_v1_admin__org_slug__certifications__user_id___user_certification_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_certification_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Certification Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RevokeCertificateResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Certificate revoked. The cert row is hard-deleted."
|
|
},
|
|
"404": {
|
|
"description": "Certificate not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Revoke a user's certificate",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/courses/{course_uuid}/access/{user_id}": {
|
|
"get": {
|
|
"description": "Check if a user can access a specific course. Returns enrollment status and whether the course is public. Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_check_course_access_api_v1_admin__org_slug__courses__course_uuid__access__user_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseAccessResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Access check result \u2014 whether the user can view the course."
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Check user course access",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/courses/{course_uuid}/analytics": {
|
|
"get": {
|
|
"description": "Returns enrollment/completion counts, average completion percentage across all enrollees, and total certificates awarded.",
|
|
"operationId": "api_admin_get_course_analytics_api_v1_admin__org_slug__courses__course_uuid__analytics_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseAnalyticsResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Aggregate course stats: enrollment, completion, certificates, etc."
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Aggregate stats for a course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/courses/{course_uuid}/enrollments": {
|
|
"get": {
|
|
"description": "Reverse lookup: get all users currently enrolled in a course, with pagination. Returns enrollment status and enrolled_at per user.",
|
|
"operationId": "api_admin_list_course_enrollments_api_v1_admin__org_slug__courses__course_uuid__enrollments_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 1,
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 25,
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CourseEnrollmentItem"
|
|
},
|
|
"title": "Response Api Admin List Course Enrollments Api V1 Admin Org Slug Courses Course Uuid Enrollments Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "One row per enrolled user in this course, with status and enrolled_at."
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List users enrolled in a course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/enrollments/bulk": {
|
|
"post": {
|
|
"description": "Enroll a batch of users into a single course. Users who are already enrolled are reported in `already_enrolled`. Users who are not members of the org are reported in `skipped`.",
|
|
"operationId": "api_admin_bulk_enroll_api_v1_admin__org_slug__enrollments_bulk_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BulkEnrollRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BulkEnrollResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Per-user enrollment summary: enrolled, already_enrolled, skipped."
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Bulk enroll users in a course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/enrollments/bulk/unenroll": {
|
|
"post": {
|
|
"description": "Mirror of bulk enroll. Users not currently enrolled are reported in `not_enrolled`.",
|
|
"operationId": "api_admin_bulk_unenroll_api_v1_admin__org_slug__enrollments_bulk_unenroll_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BulkUnenrollRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BulkUnenrollResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Per-user unenroll summary: unenrolled, not_enrolled."
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Bulk unenroll users from a course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/enrollments/{user_id}": {
|
|
"get": {
|
|
"description": "Get all course enrollments for a user in the organization, including trail runs and steps. Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_get_user_enrollments_api_v1_admin__org_slug__enrollments__user_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrailRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "The user's trail with every course enrollment and step."
|
|
},
|
|
"404": {
|
|
"description": "User not found or not a member of this organization"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get user enrollments",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/enrollments/{user_id}/{course_uuid}": {
|
|
"delete": {
|
|
"description": "Unenroll a user from a course. Removes the enrollment and all associated progress (trail steps). Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_unenroll_user_api_v1_admin__org_slug__enrollments__user_id___course_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UnenrollResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "User unenrolled \u2014 trail steps for this course are deleted."
|
|
},
|
|
"404": {
|
|
"description": "Enrollment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Unenroll user from course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Enroll a user in a course on their behalf. Creates the learning trail and trail run. The user must belong to the organization. Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_enroll_user_api_v1_admin__org_slug__enrollments__user_id___course_uuid__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrailRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "User enrolled \u2014 returns the user's updated trail with all runs."
|
|
},
|
|
"400": {
|
|
"description": "User is already enrolled"
|
|
},
|
|
"404": {
|
|
"description": "User or course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Enroll user in course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/progress/{user_id}": {
|
|
"get": {
|
|
"description": "Get a progress summary across all courses a user is enrolled in. Returns completion percentage and status for each enrollment. Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_get_all_user_progress_api_v1_admin__org_slug__progress__user_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProgressSummaryItem"
|
|
},
|
|
"title": "Response Api Admin Get All User Progress Api V1 Admin Org Slug Progress User Id Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "One row per course enrollment with completion percentage and status."
|
|
},
|
|
"404": {
|
|
"description": "User not found or not a member of this organization"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get all user progress",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/progress/{user_id}/activities/{activity_uuid}/complete": {
|
|
"delete": {
|
|
"description": "Remove a user's activity completion. Does not revoke certificates. Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_uncomplete_activity_api_v1_admin__org_slug__progress__user_id__activities__activity_uuid__complete_delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityUncompletionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Activity completion removed."
|
|
},
|
|
"404": {
|
|
"description": "Activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Undo activity completion",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Mark an activity as completed on behalf of a user. Automatically creates enrollment if needed. If this completes the entire course, a certificate is awarded (if configured). Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_complete_activity_api_v1_admin__org_slug__progress__user_id__activities__activity_uuid__complete_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityCompletionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Activity marked complete; includes whether this completed the course."
|
|
},
|
|
"404": {
|
|
"description": "Activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Mark activity as completed",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/progress/{user_id}/{course_uuid}": {
|
|
"get": {
|
|
"description": "Get a user's progress in a specific course including completion percentage and list of completed activity IDs. Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_get_user_progress_api_v1_admin__org_slug__progress__user_id___course_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProgressResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Progress summary (completion percentage + completed activity ids)."
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get user progress in course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/progress/{user_id}/{course_uuid}/complete": {
|
|
"post": {
|
|
"description": "Mark all activities in a course as completed for a user. Skips activities that are already completed. Awards a certificate if configured. Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_complete_course_api_v1_admin__org_slug__progress__user_id___course_uuid__complete_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseCompletionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "All activities marked complete; indicates whether a certificate was awarded."
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Mark entire course as completed",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/progress/{user_id}/{course_uuid}/reset": {
|
|
"post": {
|
|
"description": "Delete all of a user's trail steps for a course, keeping the enrollment intact. The user can retake the course from scratch.",
|
|
"operationId": "api_admin_reset_user_progress_api_v1_admin__org_slug__progress__user_id___course_uuid__reset_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResetProgressResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Returns the number of trail steps deleted for this user/course."
|
|
},
|
|
"404": {
|
|
"description": "User or course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Reset a user's progress in a course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/trails/{user_id}": {
|
|
"get": {
|
|
"description": "Return the user's trail in the organization with a full chapter-by-chapter and activity-by-activity progress breakdown for every course they are enrolled in. Each activity carries its completion state, teacher verification flag, grade, and completion timestamp. Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_get_user_trail_detail_api_v1_admin__org_slug__trails__user_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserTrailDetail"
|
|
}
|
|
}
|
|
},
|
|
"description": "Full trail breakdown grouped by course \u2192 chapter \u2192 activity."
|
|
},
|
|
"403": {
|
|
"description": "API token lacks access to this organization"
|
|
},
|
|
"404": {
|
|
"description": "User not found or not a member of this organization"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get user trail with full progress breakdown",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/trails/{user_id}/courses/{course_uuid}": {
|
|
"get": {
|
|
"description": "Return the user's full chapter-by-chapter and activity-by-activity progress breakdown for a single course. Surfaces progress even when the user has no explicit enrollment row (status will be null in that case). Requires `courses.action_read` permission.",
|
|
"operationId": "api_admin_get_user_course_trail_detail_api_v1_admin__org_slug__trails__user_id__courses__course_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserTrailDetail"
|
|
}
|
|
}
|
|
},
|
|
"description": "Full breakdown for the requested course only."
|
|
},
|
|
"403": {
|
|
"description": "API token lacks access to this organization"
|
|
},
|
|
"404": {
|
|
"description": "Course or user not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get user trail breakdown for a single course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/usergroups": {
|
|
"post": {
|
|
"description": "Create a cohort/user group owned by the organization.",
|
|
"operationId": "api_admin_create_usergroup_api_v1_admin__org_slug__usergroups_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreateUserGroupRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserGroupResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "The newly created cohort."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create a user group",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/usergroups/{usergroup_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a user group and all its memberships and course links. The underlying users and courses are untouched.",
|
|
"operationId": "api_admin_delete_usergroup_api_v1_admin__org_slug__usergroups__usergroup_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DeleteUserGroupResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cohort and all its memberships/course links deleted."
|
|
},
|
|
"404": {
|
|
"description": "UserGroup not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a user group",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/usergroups/{usergroup_uuid}/courses/{course_uuid}": {
|
|
"delete": {
|
|
"description": "Unlink a course from a user group. Members of the cohort lose access unless granted through another path.",
|
|
"operationId": "api_admin_remove_course_from_usergroup_api_v1_admin__org_slug__usergroups__usergroup_uuid__courses__course_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserGroupCourseResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course unlinked from the cohort."
|
|
},
|
|
"404": {
|
|
"description": "Group or link not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Revoke a cohort's access to a course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Link a course to a user group \u2014 all members of the group gain the access rights configured for that group.",
|
|
"operationId": "api_admin_add_course_to_usergroup_api_v1_admin__org_slug__usergroups__usergroup_uuid__courses__course_uuid__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserGroupCourseResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course linked to the cohort."
|
|
},
|
|
"400": {
|
|
"description": "Course already linked to this group"
|
|
},
|
|
"404": {
|
|
"description": "Group or course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Grant a cohort access to a course",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/usergroups/{usergroup_uuid}/members": {
|
|
"get": {
|
|
"description": "Reverse lookup: list users belonging to a cohort, with pagination.",
|
|
"operationId": "api_admin_list_usergroup_members_api_v1_admin__org_slug__usergroups__usergroup_uuid__members_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 1,
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 25,
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/UserGroupMemberListItem"
|
|
},
|
|
"title": "Response Api Admin List Usergroup Members Api V1 Admin Org Slug Usergroups Usergroup Uuid Members Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Members of the cohort, paginated."
|
|
},
|
|
"404": {
|
|
"description": "UserGroup not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List members of a user group",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/usergroups/{usergroup_uuid}/members/{user_id}": {
|
|
"delete": {
|
|
"description": "Remove a user's membership from a cohort/group. The user account itself is preserved.",
|
|
"operationId": "api_admin_remove_usergroup_member_api_v1_admin__org_slug__usergroups__usergroup_uuid__members__user_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserGroupMemberResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "User removed from the cohort."
|
|
},
|
|
"404": {
|
|
"description": "User, group, or membership not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove a user from a user group",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Add a user to a cohort/group. Both must belong to the token's org.",
|
|
"operationId": "api_admin_add_usergroup_member_api_v1_admin__org_slug__usergroups__usergroup_uuid__members__user_id__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserGroupMemberResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "User added to the cohort."
|
|
},
|
|
"400": {
|
|
"description": "User is already in this group"
|
|
},
|
|
"404": {
|
|
"description": "User or group not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Add a user to a user group",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/users": {
|
|
"post": {
|
|
"description": "Create a user and attach them to the organization in one call. Designed for SSO/JIT provisioning \u2014 the user's email is auto-verified and the normal email-verification flow is skipped. If a user with the given email already exists in another organization, they are attached to this org (idempotent); the password/username/name fields in the request are ignored in that case.",
|
|
"operationId": "api_admin_provision_user_api_v1_admin__org_slug__users_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProvisionUserRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "User created or attached to the org. Returns the user."
|
|
},
|
|
"400": {
|
|
"description": "Email already in this org, duplicate username, weak password, or invalid role_id"
|
|
},
|
|
"403": {
|
|
"description": "Member limit reached, feature disabled, role belongs to another org, role is elevated (Admin/Maintainer), or token creator lacks privilege"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Too many provisioning requests for this token"
|
|
}
|
|
},
|
|
"summary": "Provision a user",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/users/by-email/{email}": {
|
|
"get": {
|
|
"description": "Find a user by email within the organization. Returns 404 if the user does not exist or is not a member of this org.",
|
|
"operationId": "api_admin_get_user_by_email_api_v1_admin__org_slug__users_by_email__email__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "URL-encoded email address",
|
|
"in": "path",
|
|
"name": "email",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "URL-encoded email address",
|
|
"title": "Email",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "The user matching the given email within this org."
|
|
},
|
|
"404": {
|
|
"description": "User not found in this organization"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Look up a user by email",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/users/{user_id}": {
|
|
"delete": {
|
|
"description": "Remove a user's organization membership. The user account itself is preserved (it may belong to other orgs). Blocks removing the last admin.",
|
|
"operationId": "api_admin_remove_user_api_v1_admin__org_slug__users__user_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RemoveUserResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Membership removed. The user account is preserved."
|
|
},
|
|
"400": {
|
|
"description": "User is the last admin"
|
|
},
|
|
"404": {
|
|
"description": "User not in org"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove a user from the organization",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
},
|
|
"patch": {
|
|
"description": "Update profile fields of an org member. Supports partial updates \u2014 only fields present in the request body are changed. Duplicate email/username is rejected.",
|
|
"operationId": "api_admin_update_user_profile_api_v1_admin__org_slug__users__user_id__patch",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UpdateUserRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Updated user profile."
|
|
},
|
|
"400": {
|
|
"description": "Duplicate email or username"
|
|
},
|
|
"404": {
|
|
"description": "User not in org"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a user's profile",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/users/{user_id}/anonymize": {
|
|
"post": {
|
|
"description": "Scrub a user's PII (email, name, avatar, bio, details, profile, password). Delete API tokens the user created. Keeps trails and certificates so course analytics remain accurate. Invalidates session cache.",
|
|
"operationId": "api_admin_anonymize_user_api_v1_admin__org_slug__users__user_id__anonymize_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AnonymizeUserResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "User PII scrubbed; reports how many API tokens were revoked."
|
|
},
|
|
"404": {
|
|
"description": "User not in org"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "GDPR right-to-be-forgotten",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/users/{user_id}/export": {
|
|
"get": {
|
|
"description": "Return a JSON bundle containing the user's profile, org memberships, trails, runs, steps, certificates, and cohort memberships. Intended for GDPR Article 15 (Right of Access) compliance. All sub-collections are scoped to the caller's org.",
|
|
"operationId": "api_admin_export_user_data_api_v1_admin__org_slug__users__user_id__export_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserDataExportResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Bundle of all user data scoped to this org."
|
|
},
|
|
"404": {
|
|
"description": "User not in org"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Full GDPR data export for a user",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/users/{user_id}/groups": {
|
|
"get": {
|
|
"description": "Reverse lookup: which cohorts is this user a member of?",
|
|
"operationId": "api_admin_get_user_groups_api_v1_admin__org_slug__users__user_id__groups_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/UserUserGroupItem"
|
|
},
|
|
"title": "Response Api Admin Get User Groups Api V1 Admin Org Slug Users User Id Groups Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cohorts the user belongs to within this org."
|
|
},
|
|
"404": {
|
|
"description": "User not in org"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List user groups a user belongs to",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/admin/{org_slug}/users/{user_id}/role": {
|
|
"patch": {
|
|
"description": "Change the user's role within the organization. Blocks demoting the last admin. The target role must belong to this org or be a global role.",
|
|
"operationId": "api_admin_change_user_role_api_v1_admin__org_slug__users__user_id__role_patch",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChangeRoleRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChangeRoleResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "User role updated."
|
|
},
|
|
"400": {
|
|
"description": "Cannot demote the last admin"
|
|
},
|
|
"403": {
|
|
"description": "Role does not belong to this organization"
|
|
},
|
|
"404": {
|
|
"description": "User or role not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Change a user's org role",
|
|
"tags": [
|
|
"admin"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/courseplanning/finalize": {
|
|
"post": {
|
|
"description": "Finalize an AI-generated course plan and persist the course, chapters, and activities in the database. The calling user becomes the creator of the resulting course.",
|
|
"operationId": "finalize_course_plan_api_v1_ai_courseplanning_finalize_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FinalizeCoursePlanRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FinalizeCoursePlanResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course, chapters, and activities created from the plan."
|
|
},
|
|
"400": {
|
|
"description": "Course already created from this session"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not a member of this organization"
|
|
},
|
|
"404": {
|
|
"description": "Session or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Finalize course plan",
|
|
"tags": [
|
|
"ai",
|
|
"courseplanning"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/courseplanning/generate-activity": {
|
|
"post": {
|
|
"description": "Generate AI content for a specific activity within a course planning session and stream it as Server-Sent Events (SSE). Bounded by the session's max activity iterations. Content must subsequently be persisted via the save-activity-content endpoint.",
|
|
"operationId": "generate_activity_content_api_v1_ai_courseplanning_generate_activity_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GenerateActivityContentRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "SSE stream of activity content generation events (chunk, done, error)."
|
|
},
|
|
"400": {
|
|
"description": "Maximum activity iterations reached"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Activity content generation disabled, user not a member of the organization, or insufficient credits"
|
|
},
|
|
"404": {
|
|
"description": "Session, activity, or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Generate activity content (streaming)",
|
|
"tags": [
|
|
"ai",
|
|
"courseplanning"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/courseplanning/iterate": {
|
|
"post": {
|
|
"description": "Continue an existing course planning session with a new user message and stream the updated plan as Server-Sent Events (SSE). Bounded by the session's max planning iterations.",
|
|
"operationId": "iterate_course_planning_session_api_v1_ai_courseplanning_iterate_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendCoursePlanningMessage"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "SSE stream of course planning events (chunk, done, error)."
|
|
},
|
|
"400": {
|
|
"description": "Maximum planning iterations reached"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not a member of this organization or insufficient credits"
|
|
},
|
|
"404": {
|
|
"description": "Session or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Iterate course planning session (streaming)",
|
|
"tags": [
|
|
"ai",
|
|
"courseplanning"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/courseplanning/save-activity-content": {
|
|
"post": {
|
|
"description": "Persist AI-generated ProseMirror content to an activity. The content is validated for correct document structure before being saved.",
|
|
"operationId": "save_activity_content_api_v1_ai_courseplanning_save_activity_content_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SaveActivityContentRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Activity content saved successfully."
|
|
},
|
|
"400": {
|
|
"description": "Invalid content structure"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not a member of this organization"
|
|
},
|
|
"404": {
|
|
"description": "Activity or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"500": {
|
|
"description": "Failed to save content due to an internal error"
|
|
}
|
|
},
|
|
"summary": "Save AI-generated activity content",
|
|
"tags": [
|
|
"ai",
|
|
"courseplanning"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/courseplanning/session/{session_uuid}": {
|
|
"get": {
|
|
"description": "Return the current state of a course planning session, including the current plan, iteration counts, message history, and any linked course.",
|
|
"operationId": "get_session_state_api_v1_ai_courseplanning_session__session_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "session_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CoursePlanningSessionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course planning session state."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Session not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get course planning session state",
|
|
"tags": [
|
|
"ai",
|
|
"courseplanning"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/courseplanning/start": {
|
|
"post": {
|
|
"description": "Start a new AI course planning session for an organization and stream the generated course plan as Server-Sent Events (SSE). Consumes AI credits based on the organization's plan tier.",
|
|
"operationId": "start_course_planning_session_api_v1_ai_courseplanning_start_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StartCoursePlanningSession"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "SSE stream of course planning events (chunk, done, error)."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not a member of this organization or insufficient credits"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Start course planning session (streaming)",
|
|
"tags": [
|
|
"ai",
|
|
"courseplanning"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/magicblocks/iterate": {
|
|
"post": {
|
|
"description": "Continue an existing MagicBlock session with a new user message. Streams the updated HTML as Server-Sent Events (SSE). Consumes AI credits and is bounded by the session's max iterations.",
|
|
"operationId": "iterate_magicblock_session_api_v1_ai_magicblocks_iterate_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendMagicBlockMessage"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "SSE stream of generation events (chunk, done, error)."
|
|
},
|
|
"400": {
|
|
"description": "Maximum iterations reached or activity/block UUID mismatch"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "AI feature disabled or insufficient credits"
|
|
},
|
|
"404": {
|
|
"description": "Session, course, or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Iterate MagicBlock session (streaming)",
|
|
"tags": [
|
|
"ai",
|
|
"magicblocks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/magicblocks/session/{session_uuid}": {
|
|
"get": {
|
|
"description": "Return the current state of a MagicBlock session, including iteration count, generated HTML, and full message history.",
|
|
"operationId": "get_session_state_api_v1_ai_magicblocks_session__session_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "session_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MagicBlockSessionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "MagicBlock session state."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Session not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get MagicBlock session state",
|
|
"tags": [
|
|
"ai",
|
|
"magicblocks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/magicblocks/start": {
|
|
"post": {
|
|
"description": "Start a new MagicBlock AI generation session for an activity block. Streams generated HTML as Server-Sent Events (SSE). Consumes AI credits from the owning organization.",
|
|
"operationId": "start_magicblock_session_api_v1_ai_magicblocks_start_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StartMagicBlockSession"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "SSE stream of generation events (chunk, done, error)."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "AI feature disabled or insufficient credits"
|
|
},
|
|
"404": {
|
|
"description": "Activity, course, or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Start MagicBlock session (streaming)",
|
|
"tags": [
|
|
"ai",
|
|
"magicblocks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/rag/chat": {
|
|
"post": {
|
|
"description": "Streaming RAG chatbot grounded in course content. If `course_uuid` is provided, searches within that course only. Otherwise searches across all courses for the user's organization. Responses are delivered as Server-Sent Events (SSE).",
|
|
"operationId": "api_rag_chat_api_v1_ai_rag_chat_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RAGChatRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "SSE stream of chat events (start, chunk, sources, done, follow_ups, session_title, error)."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "AI features disabled, copilot disabled, or user has no organization"
|
|
},
|
|
"404": {
|
|
"description": "Course or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "RAG chat (streaming)",
|
|
"tags": [
|
|
"ai",
|
|
"rag"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/rag/index": {
|
|
"post": {
|
|
"description": "Manually trigger re-indexing (embedding) of a course's content for the RAG chatbot. Requires admin/maintainer role on the course's organization.",
|
|
"operationId": "api_rag_index_api_v1_ai_rag_index_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RAGIndexRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RAGIndexResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course re-indexed successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks admin/maintainer role on the organization"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Reindex course content for RAG",
|
|
"tags": [
|
|
"ai",
|
|
"rag"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/rag/sessions": {
|
|
"get": {
|
|
"description": "List all RAG chat sessions owned by the current user, optionally filtered by organization via `org_slug`.",
|
|
"operationId": "api_rag_sessions_api_v1_ai_rag_sessions_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_slug",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Slug"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Object containing the list of chat sessions for the current user."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List RAG chat sessions",
|
|
"tags": [
|
|
"ai",
|
|
"rag"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/rag/sessions/{aichat_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a RAG chat session and all its messages. The session must belong to the current user.",
|
|
"operationId": "api_rag_session_delete_api_v1_ai_rag_sessions__aichat_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "aichat_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Aichat Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Session deleted successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Session not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a RAG chat session",
|
|
"tags": [
|
|
"ai",
|
|
"rag"
|
|
]
|
|
},
|
|
"patch": {
|
|
"description": "Update a RAG chat session's title and/or favorite status. The session must belong to the current user.",
|
|
"operationId": "api_rag_session_update_api_v1_ai_rag_sessions__aichat_uuid__patch",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "aichat_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Aichat Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RAGSessionUpdateRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Session updated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Session not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a RAG chat session",
|
|
"tags": [
|
|
"ai",
|
|
"rag"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/rag/sessions/{aichat_uuid}/messages": {
|
|
"get": {
|
|
"description": "Load the full message history for a specific RAG chat session owned by the current user.",
|
|
"operationId": "api_rag_session_messages_api_v1_ai_rag_sessions__aichat_uuid__messages_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "aichat_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Aichat Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Object containing the session's messages."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Session not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get RAG chat session messages",
|
|
"tags": [
|
|
"ai",
|
|
"rag"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/send/activity_chat_message": {
|
|
"post": {
|
|
"description": "Send a message to an existing AI chat session anchored to a course activity and receive the updated session state.",
|
|
"operationId": "api_ai_send_activity_chat_message_api_v1_ai_send_activity_chat_message_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendActivityAIChatMessage"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityAIChatSessionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Message sent and AI response recorded."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission or AI feature disabled for this organization"
|
|
},
|
|
"404": {
|
|
"description": "Session or activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Send activity AI chat message",
|
|
"tags": [
|
|
"ai"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/start/activity_chat_session": {
|
|
"post": {
|
|
"description": "Start a new AI chat session anchored to a course activity. Returns the new session's state and initial message.",
|
|
"operationId": "api_ai_start_activity_chat_session_api_v1_ai_start_activity_chat_session_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StartActivityAIChatSession"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityAIChatSessionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "New AI chat session created."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission or AI feature disabled for this organization"
|
|
},
|
|
"404": {
|
|
"description": "Activity or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Start activity AI chat session",
|
|
"tags": [
|
|
"ai"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/stream/editor/message": {
|
|
"post": {
|
|
"description": "Send a message to an existing AI editor chat session and stream the response as Server-Sent Events (SSE). The endpoint is aware of the current editor content and can emit content modification blocks.",
|
|
"operationId": "api_editor_ai_send_message_stream_api_v1_ai_stream_editor_message_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendEditorAIChatMessage"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "SSE stream of editor chat events (start, chat_chunk, content_start, content_chunk, content_end, done, follow_ups, error)."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission or AI feature disabled for this organization"
|
|
},
|
|
"404": {
|
|
"description": "Session or activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Send editor AI chat message (streaming)",
|
|
"tags": [
|
|
"ai"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/stream/editor/start": {
|
|
"post": {
|
|
"description": "Start a new AI editor chat session that is aware of the current editor content. Streams the response as Server-Sent Events (SSE) and can emit content modification blocks to be inserted into the editor.",
|
|
"operationId": "api_editor_ai_start_chat_session_stream_api_v1_ai_stream_editor_start_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StartEditorAIChatSession"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "SSE stream of editor chat events (start, chat_chunk, content_start, content_chunk, content_end, done, follow_ups, error)."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission or AI feature disabled for this organization"
|
|
},
|
|
"404": {
|
|
"description": "Activity or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Start editor AI chat session (streaming)",
|
|
"tags": [
|
|
"ai"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/stream/send/activity_chat_message": {
|
|
"post": {
|
|
"description": "Send a message to an existing activity AI chat session and stream the response as Server-Sent Events (SSE).",
|
|
"operationId": "api_ai_send_activity_chat_message_stream_api_v1_ai_stream_send_activity_chat_message_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendActivityAIChatMessage"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "SSE stream of chat events (start, chunk, done, follow_ups, error)."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission or AI feature disabled for this organization"
|
|
},
|
|
"404": {
|
|
"description": "Session or activity not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Send activity AI chat message (streaming)",
|
|
"tags": [
|
|
"ai"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/ai/stream/start/activity_chat_session": {
|
|
"post": {
|
|
"description": "Start a new AI chat session for a course activity and stream the response as Server-Sent Events (SSE).",
|
|
"operationId": "api_ai_start_activity_chat_session_stream_api_v1_ai_stream_start_activity_chat_session_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StartActivityAIChatSession"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "SSE stream of chat events (start, chunk, done, follow_ups, error)."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission or AI feature disabled for this organization"
|
|
},
|
|
"404": {
|
|
"description": "Activity or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Start activity AI chat session (streaming)",
|
|
"tags": [
|
|
"ai"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/analytics/dashboard/course/detail/{query_name}": {
|
|
"get": {
|
|
"description": "Executes a predefined course-level detail query via Tinybird with fallback to PostgreSQL TrailRun data, and enriches results with course, activity, and user metadata. Requires org admin privileges and a Pro plan or higher.",
|
|
"operationId": "query_course_dashboard_detail_api_v1_analytics_dashboard_course_detail__query_name__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "query_name",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Query Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Course detail query results with enriched metadata"
|
|
},
|
|
"400": {
|
|
"description": "Invalid query parameter or course_uuid"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not admin or the organization lacks a Pro plan"
|
|
},
|
|
"404": {
|
|
"description": "Unknown course detail query name"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"502": {
|
|
"description": "Upstream analytics query failed"
|
|
},
|
|
"503": {
|
|
"description": "Analytics backend is not configured"
|
|
}
|
|
},
|
|
"summary": "Run a course-level detail analytics query",
|
|
"tags": [
|
|
"analytics"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/analytics/dashboard/course/{query_name}": {
|
|
"get": {
|
|
"description": "Executes a predefined course-level analytics query via Tinybird and returns enriched aggregated results. Requires org admin privileges and a Pro plan or higher.",
|
|
"operationId": "query_course_dashboard_api_v1_analytics_dashboard_course__query_name__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "query_name",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Query Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Course query results with enriched metadata"
|
|
},
|
|
"400": {
|
|
"description": "Invalid query parameter or course_uuid"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not admin or the organization lacks a Pro plan"
|
|
},
|
|
"404": {
|
|
"description": "Unknown course query name"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"502": {
|
|
"description": "Upstream analytics query failed"
|
|
},
|
|
"503": {
|
|
"description": "Analytics backend is not configured"
|
|
}
|
|
},
|
|
"summary": "Run a course-level analytics query",
|
|
"tags": [
|
|
"analytics"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/analytics/dashboard/db/{query_name}": {
|
|
"get": {
|
|
"description": "Executes a predefined PostgreSQL analytics query (e.g. grade distribution histogram). Requires org admin privileges and a Pro plan or higher.",
|
|
"operationId": "query_dashboard_db_api_v1_analytics_dashboard_db__query_name__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "query_name",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Query Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Query results from PostgreSQL"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not admin or the organization lacks a Pro plan"
|
|
},
|
|
"404": {
|
|
"description": "Unknown query name"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Run a PostgreSQL-backed dashboard query",
|
|
"tags": [
|
|
"analytics"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/analytics/dashboard/detail/{query_name}": {
|
|
"get": {
|
|
"description": "Executes a predefined analytics detail query against Tinybird and enriches the result rows with course, activity, and user metadata from PostgreSQL. Requires org admin privileges.",
|
|
"operationId": "query_dashboard_detail_api_v1_analytics_dashboard_detail__query_name__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "query_name",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Query Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Detail query results with enriched metadata"
|
|
},
|
|
"400": {
|
|
"description": "Invalid query parameter"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not a member or admin of the organization"
|
|
},
|
|
"404": {
|
|
"description": "Unknown detail query name"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"502": {
|
|
"description": "Upstream analytics query failed"
|
|
},
|
|
"503": {
|
|
"description": "Analytics backend is not configured"
|
|
}
|
|
},
|
|
"summary": "Run a detail dashboard query",
|
|
"tags": [
|
|
"analytics"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/analytics/dashboard/{query_name}": {
|
|
"get": {
|
|
"description": "Executes a predefined analytics query via Tinybird and returns the aggregated results. Advanced queries require an Enterprise plan. Requires org admin privileges.",
|
|
"operationId": "query_dashboard_api_v1_analytics_dashboard__query_name__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "query_name",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Query Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Query results with enriched metadata"
|
|
},
|
|
"400": {
|
|
"description": "Invalid query parameter"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not a member/admin, or plan does not permit advanced queries"
|
|
},
|
|
"404": {
|
|
"description": "Unknown query name"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"502": {
|
|
"description": "Upstream analytics query failed"
|
|
},
|
|
"503": {
|
|
"description": "Analytics backend is not configured"
|
|
}
|
|
},
|
|
"summary": "Run a dashboard analytics query",
|
|
"tags": [
|
|
"analytics"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/analytics/events": {
|
|
"post": {
|
|
"description": "Proxies a whitelisted analytics event from the frontend to the analytics backend. The authenticated user must belong to the target organization, and the event name must be in the allowed list.",
|
|
"operationId": "ingest_frontend_event_api_v1_analytics_events_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FrontendEvent"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Event ingested successfully"
|
|
},
|
|
"400": {
|
|
"description": "Invalid event name"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not a member of the target organization"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Ingest a frontend analytics event",
|
|
"tags": [
|
|
"analytics"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/analytics/export": {
|
|
"get": {
|
|
"description": "Exports results for a comma-separated list of analytics queries in either JSON or CSV format. Requires org admin privileges.",
|
|
"operationId": "export_analytics_api_v1_analytics_export_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Analytics data exported as JSON or streaming CSV"
|
|
},
|
|
"400": {
|
|
"description": "Invalid format, queries, or parameters"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not admin of the organization"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"502": {
|
|
"description": "Upstream analytics query failed"
|
|
},
|
|
"503": {
|
|
"description": "Analytics backend is not configured"
|
|
}
|
|
},
|
|
"summary": "Export analytics data",
|
|
"tags": [
|
|
"analytics"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/analytics/plan-info": {
|
|
"get": {
|
|
"description": "Returns the analytics tier (core or advanced) available to the organization based on its current plan.",
|
|
"operationId": "get_plan_info_api_v1_analytics_plan_info_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Analytics plan tier information"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not a member of the target organization"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get analytics plan tier for an organization",
|
|
"tags": [
|
|
"analytics"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/analytics/status": {
|
|
"get": {
|
|
"description": "Returns whether the analytics backend (Tinybird) is configured on the server.",
|
|
"operationId": "analytics_status_api_v1_analytics_status_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Analytics configuration status"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
}
|
|
},
|
|
"summary": "Check analytics configuration",
|
|
"tags": [
|
|
"analytics"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/": {
|
|
"post": {
|
|
"description": "Create a new assignment attached to an activity. The authenticated user must have permission to edit the parent course.",
|
|
"operationId": "api_create_assignments_api_v1_assignments__post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AssignmentCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AssignmentRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Assignment created and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create assignments in this course"
|
|
},
|
|
"404": {
|
|
"description": "Parent activity or course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create assignment",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/activity/{activity_uuid}": {
|
|
"delete": {
|
|
"description": "Delete the assignment attached to the given activity UUID.",
|
|
"operationId": "api_delete_assignment_from_activity_api_v1_assignments_activity__activity_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Assignment deleted."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this assignment"
|
|
},
|
|
"404": {
|
|
"description": "Activity or assignment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete assignment by activity",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Read the assignment attached to a given activity UUID.",
|
|
"operationId": "api_read_assignment_from_activity_api_v1_assignments_activity__activity_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AssignmentRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Assignment returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this assignment"
|
|
},
|
|
"404": {
|
|
"description": "Activity or assignment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get assignment by activity",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/course/{course_uuid}": {
|
|
"get": {
|
|
"description": "Get all assignments attached to activities within the given course.",
|
|
"operationId": "api_get_assignments_api_v1_assignments_course__course_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "List of assignments for the course."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List course assignments",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/task/{assignment_task_uuid}": {
|
|
"get": {
|
|
"description": "Read a single assignment task by its UUID.",
|
|
"operationId": "api_read_assignment_task_api_v1_assignments_task__assignment_task_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_task_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Task Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Assignment task returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this task"
|
|
},
|
|
"404": {
|
|
"description": "Assignment task not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get assignment task",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}": {
|
|
"delete": {
|
|
"description": "Delete an assignment by its UUID. The authenticated user must have permission to edit the parent course.",
|
|
"operationId": "api_delete_assignment_api_v1_assignments__assignment_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Assignment deleted."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this assignment"
|
|
},
|
|
"404": {
|
|
"description": "Assignment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete assignment",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Read an assignment by its UUID.",
|
|
"operationId": "api_read_assignment_api_v1_assignments__assignment_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AssignmentRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Assignment returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this assignment"
|
|
},
|
|
"404": {
|
|
"description": "Assignment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get assignment",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update an assignment by its UUID. The authenticated user must have permission to edit the parent course.",
|
|
"operationId": "api_update_assignment_api_v1_assignments__assignment_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AssignmentUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AssignmentRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Assignment updated and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update this assignment"
|
|
},
|
|
"404": {
|
|
"description": "Assignment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update assignment",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/submissions": {
|
|
"get": {
|
|
"description": "Read all assignment-level submissions for the given assignment (instructor view).",
|
|
"operationId": "api_read_assignment_submissions_api_v1_assignments__assignment_uuid__submissions_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 50,
|
|
"maximum": 500,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "offset",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 0,
|
|
"minimum": 0,
|
|
"title": "Offset",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "List of assignment submissions."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view these submissions"
|
|
},
|
|
"404": {
|
|
"description": "Assignment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List assignment submissions",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Create a new assignment-level submission for the current user on the given assignment.",
|
|
"operationId": "api_create_assignment_submissions_api_v1_assignments__assignment_uuid__submissions_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Assignment submission created."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to submit to this assignment"
|
|
},
|
|
"404": {
|
|
"description": "Assignment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create assignment submission",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/submissions/me": {
|
|
"get": {
|
|
"description": "Read the current user's assignment-level submission for the given assignment.",
|
|
"operationId": "api_read_user_assignment_submission_me_api_v1_assignments__assignment_uuid__submissions_me_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Current user's assignment submission."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this assignment"
|
|
},
|
|
"404": {
|
|
"description": "Assignment or submission not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get current user's assignment submission",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/submissions/me/retry": {
|
|
"post": {
|
|
"description": "Reset the current user's submission so they can attempt the assignment again. Only allowed when the assignment has allow_retries=true, the existing submission is in GRADED state, and the attempt counter is still below max_retries (0 means unlimited). Wipes per-task submissions, resets the trail step, and revokes any course certificate.",
|
|
"operationId": "api_retry_assignment_submission_api_v1_assignments__assignment_uuid__submissions_me_retry_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Submission reset; returns the new attempt info."
|
|
},
|
|
"400": {
|
|
"description": "Submission is not in a retryable state"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Retries disabled or attempt limit reached"
|
|
},
|
|
"404": {
|
|
"description": "Assignment or submission not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Retry assignment for current user",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/submissions/{user_id}": {
|
|
"delete": {
|
|
"description": "Delete a user's assignment-level submission on the given assignment.",
|
|
"operationId": "api_delete_user_assignment_submissions_api_v1_assignments__assignment_uuid__submissions__user_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Assignment submission deleted."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this submission"
|
|
},
|
|
"404": {
|
|
"description": "Assignment, user, or submission not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete assignment submission for user",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Read the assignment-level submission for a specific user on the given assignment (instructor view).",
|
|
"operationId": "api_read_user_assignment_submissions_api_v1_assignments__assignment_uuid__submissions__user_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Assignment submission for the user."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this submission"
|
|
},
|
|
"404": {
|
|
"description": "Assignment, user, or submission not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get assignment submission for user",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update a user's assignment-level submission on the given assignment.",
|
|
"operationId": "api_update_user_assignment_submissions_api_v1_assignments__assignment_uuid__submissions__user_id__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AssignmentUserSubmissionCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Assignment submission updated."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update this submission"
|
|
},
|
|
"404": {
|
|
"description": "Assignment, user, or submission not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update assignment submission for user",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/submissions/{user_id}/done": {
|
|
"post": {
|
|
"description": "Mark the underlying activity as completed for a user once their assignment submission is accepted.",
|
|
"operationId": "api_submission_mark_as_done_api_v1_assignments__assignment_uuid__submissions__user_id__done_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Activity marked as done for the user."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to mark this submission as done"
|
|
},
|
|
"404": {
|
|
"description": "Assignment, user, or submission not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Mark assignment as done for user",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/submissions/{user_id}/grade": {
|
|
"get": {
|
|
"description": "Read the computed grade for a user's assignment submission.",
|
|
"operationId": "api_get_submission_grade_api_v1_assignments__assignment_uuid__submissions__user_id__grade_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Grade information for the submission."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this grade"
|
|
},
|
|
"404": {
|
|
"description": "Assignment, user, or submission not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get assignment submission grade",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Compute and store the final grade for an assignment submission. Accepts an optional overall_feedback note that will be stored alongside the grade.",
|
|
"operationId": "api_final_grade_submission_api_v1_assignments__assignment_uuid__submissions__user_id__grade_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GradeSubmissionBody"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Body"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Final grade stored."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to grade this submission"
|
|
},
|
|
"404": {
|
|
"description": "Assignment, user, or submission not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Finalize assignment submission grade",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/tasks": {
|
|
"get": {
|
|
"description": "Read all tasks for the given assignment.",
|
|
"operationId": "api_read_assignment_tasks_api_v1_assignments__assignment_uuid__tasks_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "List of assignment tasks."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this assignment"
|
|
},
|
|
"404": {
|
|
"description": "Assignment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List assignment tasks",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Create a new task under an assignment. The authenticated user must have permission to edit the parent course.",
|
|
"operationId": "api_create_assignment_tasks_api_v1_assignments__assignment_uuid__tasks_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AssignmentTaskCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Assignment task created."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to edit this assignment"
|
|
},
|
|
"404": {
|
|
"description": "Assignment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create assignment task",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/tasks/submissions/me": {
|
|
"get": {
|
|
"description": "Read all current-user task submissions for an assignment in one round trip. Returns a map keyed by assignment_task_uuid (value is null if no submission). Registered before the per-task variant so the literal submissions path segment isn't shadowed.",
|
|
"operationId": "api_read_user_assignment_task_submissions_me_batch_api_v1_assignments__assignment_uuid__tasks_submissions_me_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Map of task_uuid -> submission (or null)."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this assignment"
|
|
},
|
|
"404": {
|
|
"description": "Assignment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Batch read current user's task submissions",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/tasks/{assignment_task_uuid}": {
|
|
"delete": {
|
|
"description": "Delete an assignment task by its UUID. The authenticated user must have permission to edit the parent course.",
|
|
"operationId": "api_delete_assignment_tasks_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_task_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Task Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Assignment task deleted."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this task"
|
|
},
|
|
"404": {
|
|
"description": "Assignment task not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete assignment task",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update an assignment task by its UUID. The authenticated user must have permission to edit the parent course.",
|
|
"operationId": "api_update_assignment_tasks_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_task_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Task Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AssignmentTaskUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Assignment task updated."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to edit this task"
|
|
},
|
|
"404": {
|
|
"description": "Assignment task not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update assignment task",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/tasks/{assignment_task_uuid}/ref_file": {
|
|
"post": {
|
|
"description": "Upload or replace the reference file for an assignment task. Instructors use this to attach a canonical solution or prompt attachment.",
|
|
"operationId": "api_put_assignment_task_ref_file_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__ref_file_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_task_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Task Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_put_assignment_task_ref_file_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__ref_file_post"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Reference file stored."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to edit this task"
|
|
},
|
|
"404": {
|
|
"description": "Assignment task not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload task reference file",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/tasks/{assignment_task_uuid}/sub_file": {
|
|
"post": {
|
|
"description": "Upload or replace the submission file for an assignment task on behalf of the current user.",
|
|
"operationId": "api_put_assignment_task_sub_file_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__sub_file_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_task_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Task Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_put_assignment_task_sub_file_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__sub_file_post"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Submission file stored."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to submit to this task"
|
|
},
|
|
"404": {
|
|
"description": "Assignment task not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload task submission file",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/tasks/{assignment_task_uuid}/submissions": {
|
|
"get": {
|
|
"description": "Read all submissions for a given assignment task (instructor view).",
|
|
"operationId": "api_read_assignment_task_submissions_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__submissions_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_task_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Task Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 50,
|
|
"maximum": 500,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "offset",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 0,
|
|
"minimum": 0,
|
|
"title": "Offset",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "List of task submissions."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view these submissions"
|
|
},
|
|
"404": {
|
|
"description": "Assignment task not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List task submissions",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Create or update the current user's submission for an assignment task.",
|
|
"operationId": "api_handle_assignment_task_submissions_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__submissions_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_task_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Task Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AssignmentTaskSubmissionUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Task submission stored."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to submit to this task"
|
|
},
|
|
"404": {
|
|
"description": "Assignment task not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upsert assignment task submission",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/tasks/{assignment_task_uuid}/submissions/me": {
|
|
"get": {
|
|
"description": "Read the current user's submission for a specific assignment task. Returns 404 if the user has no submission yet.",
|
|
"operationId": "api_read_user_assignment_task_submissions_me_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__submissions_me_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_task_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Task Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Current user's task submission."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Assignment Task Submission not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get current user's task submission",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/tasks/{assignment_task_uuid}/submissions/user/{user_id}": {
|
|
"get": {
|
|
"description": "Read the task submissions made by a specific user for the given assignment task.",
|
|
"operationId": "api_read_user_assignment_task_submissions_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__submissions_user__user_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_task_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Task Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "List of task submissions for the user."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view these submissions"
|
|
},
|
|
"404": {
|
|
"description": "Assignment task or user not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List task submissions for user",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/assignments/{assignment_uuid}/tasks/{assignment_task_uuid}/submissions/{assignment_task_submission_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a specific task submission by its UUID.",
|
|
"operationId": "api_delete_assignment_task_submissions_api_v1_assignments__assignment_uuid__tasks__assignment_task_uuid__submissions__assignment_task_submission_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "assignment_task_submission_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Assignment Task Submission Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Task submission deleted."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this submission"
|
|
},
|
|
"404": {
|
|
"description": "Task submission not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete task submission",
|
|
"tags": [
|
|
"assignments"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/auth/login": {
|
|
"post": {
|
|
"description": "Authenticate a user with username (email) and password. On success, sets httpOnly access and refresh cookies and returns the user profile and tokens. Subject to IP-based rate limiting and account lockout after repeated failures. In SaaS mode, the account's email must be verified.",
|
|
"operationId": "login_api_v1_auth_login_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_login_api_v1_auth_login_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Login successful; cookies set and body contains user + tokens."
|
|
},
|
|
"401": {
|
|
"description": "Incorrect email or password"
|
|
},
|
|
"403": {
|
|
"description": "Email not verified (SaaS mode)"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"423": {
|
|
"description": "Account is locked due to too many failed attempts"
|
|
},
|
|
"429": {
|
|
"description": "Too many login attempts from this IP"
|
|
}
|
|
},
|
|
"summary": "Log in with email and password",
|
|
"tags": [
|
|
"auth"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/auth/logout": {
|
|
"delete": {
|
|
"description": "Log out the current user by clearing the access and refresh cookies. Because JWTs are stored in httpOnly cookies, the frontend cannot clear them directly \u2014 the backend must respond with cookie-clearing headers.",
|
|
"operationId": "logout_api_v1_auth_logout_delete",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Logout successful; auth cookies cleared."
|
|
},
|
|
"401": {
|
|
"description": "No authenticated session was found"
|
|
}
|
|
},
|
|
"summary": "Log out the current user",
|
|
"tags": [
|
|
"auth"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/auth/oauth": {
|
|
"post": {
|
|
"description": "Sign in or sign up using a third-party OAuth provider (currently Google). On success, sets httpOnly access and refresh cookies and returns the user profile and tokens.",
|
|
"operationId": "third_party_login_api_v1_auth_oauth_post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Org Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ThirdPartyLogin"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "OAuth login successful; cookies set and body contains user + tokens."
|
|
},
|
|
"401": {
|
|
"description": "Third-party authentication failed"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Log in via third-party provider",
|
|
"tags": [
|
|
"auth"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/auth/refresh": {
|
|
"get": {
|
|
"description": "Validate the refresh token (read from the `refresh_token` httpOnly cookie) and issue a new access token. Subject to IP-based rate limiting.",
|
|
"operationId": "refresh_api_v1_auth_refresh_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "New access token issued and set as cookie; body contains the token and its expiry."
|
|
},
|
|
"401": {
|
|
"description": "Refresh token is missing or invalid"
|
|
},
|
|
"429": {
|
|
"description": "Too many refresh attempts from this IP"
|
|
}
|
|
},
|
|
"summary": "Refresh access token",
|
|
"tags": [
|
|
"auth"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/auth/resend-verification": {
|
|
"post": {
|
|
"description": "Resend the email-verification email for a user. The underlying service enforces its own rate limiting and will return a generic response whether or not an account exists.",
|
|
"operationId": "api_resend_verification_email_api_v1_auth_resend_verification_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResendVerificationRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Verification email dispatch requested."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Too many verification email requests \u2014 rate limited"
|
|
}
|
|
},
|
|
"summary": "Resend verification email",
|
|
"tags": [
|
|
"auth"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/auth/verify-email": {
|
|
"post": {
|
|
"description": "Verify a user's email address using the token delivered via verification email. Rate limited to 5 attempts per 5 minutes per user_uuid.",
|
|
"operationId": "api_verify_email_api_v1_auth_verify_email_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/VerifyEmailRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Email verified successfully."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Too many verification attempts for this user"
|
|
}
|
|
},
|
|
"summary": "Verify user email",
|
|
"tags": [
|
|
"auth"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/blocks/audio": {
|
|
"get": {
|
|
"description": "Retrieve an audio block by its UUID.",
|
|
"operationId": "api_get_audio_file_block_api_v1_blocks_audio_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "block_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Audio block returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Audio block not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get audio block",
|
|
"tags": [
|
|
"blocks"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Upload an audio file and create a new audio block attached to the given activity.",
|
|
"operationId": "api_create_audio_file_block_api_v1_blocks_audio_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_audio_file_block_api_v1_blocks_audio_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Audio block created and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create audio block",
|
|
"tags": [
|
|
"blocks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/blocks/image": {
|
|
"get": {
|
|
"description": "Retrieve an image block by its UUID.",
|
|
"operationId": "api_get_image_file_block_api_v1_blocks_image_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "block_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Image block returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Image block not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get image block",
|
|
"tags": [
|
|
"blocks"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Upload an image file and create a new image block attached to the given activity.",
|
|
"operationId": "api_create_image_file_block_api_v1_blocks_image_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_image_file_block_api_v1_blocks_image_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Image block created and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create image block",
|
|
"tags": [
|
|
"blocks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/blocks/pdf": {
|
|
"get": {
|
|
"description": "Retrieve a PDF block by its UUID.",
|
|
"operationId": "api_get_pdf_file_block_api_v1_blocks_pdf_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "block_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "PDF block returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "PDF block not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get PDF block",
|
|
"tags": [
|
|
"blocks"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Upload a PDF file and create a new PDF block attached to the given activity.",
|
|
"operationId": "api_create_pdf_file_block_api_v1_blocks_pdf_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_pdf_file_block_api_v1_blocks_pdf_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "PDF block created and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create PDF block",
|
|
"tags": [
|
|
"blocks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/blocks/video": {
|
|
"get": {
|
|
"description": "Retrieve a video block by its UUID.",
|
|
"operationId": "api_get_video_file_block_api_v1_blocks_video_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "block_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Video block returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Video block not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get video block",
|
|
"tags": [
|
|
"blocks"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Upload a video file and create a new video block attached to the given activity.",
|
|
"operationId": "api_create_video_file_block_api_v1_blocks_video_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_video_file_block_api_v1_blocks_video_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Video block created and returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create video block",
|
|
"tags": [
|
|
"blocks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/": {
|
|
"post": {
|
|
"description": "Create a new collaborative board within an organization. The authenticated user becomes the board owner.",
|
|
"operationId": "api_create_board_api_v1_boards__post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Board created successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to create boards"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create a board",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/org/{org_id}": {
|
|
"get": {
|
|
"description": "List all boards in the given organization that the current user is a member of or allowed to see.",
|
|
"operationId": "api_get_boards_by_org_api_v1_boards_org__org_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/BoardRead"
|
|
},
|
|
"title": "Response 200 Api Get Boards By Org Api V1 Boards Org Org Id Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of boards accessible to the current user."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Access denied to this organization"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List boards for an organization",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/playground/iterate": {
|
|
"post": {
|
|
"description": "Continue an existing Boards Playground session with a new message, streaming the updated output. Deducts AI credits and enforces the session's iteration limit.",
|
|
"operationId": "iterate_boards_playground_session_api_v1_boards_playground_iterate_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendBoardsPlaygroundMessage"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "Server-sent events stream of generated playground content."
|
|
},
|
|
"400": {
|
|
"description": "Maximum iterations reached, or board/block UUID mismatch"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Session, board, or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Iterate on a boards playground AI session",
|
|
"tags": [
|
|
"boards",
|
|
"boards-playground"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/playground/session/{session_uuid}": {
|
|
"get": {
|
|
"description": "Retrieve the current state of a Boards Playground generation session, including iteration count, current HTML, and message history.",
|
|
"operationId": "get_session_state_api_v1_boards_playground_session__session_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "session_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardsPlaygroundSessionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Current state of the boards playground session."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Session not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get boards playground session state",
|
|
"tags": [
|
|
"boards",
|
|
"boards-playground"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/playground/start": {
|
|
"post": {
|
|
"description": "Start a new Boards Playground AI generation session with a server-sent events stream. Deducts AI credits and requires a valid board and organization.",
|
|
"operationId": "start_boards_playground_session_api_v1_boards_playground_start_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StartBoardsPlaygroundSession"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "Server-sent events stream of generated playground content."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Board or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Start a boards playground AI session",
|
|
"tags": [
|
|
"boards",
|
|
"boards-playground"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/{board_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a board by UUID. The current user must be the board owner or have delete permission.",
|
|
"operationId": "api_delete_board_api_v1_boards__board_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Board deleted successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to delete board"
|
|
},
|
|
"404": {
|
|
"description": "Board not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a board",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Retrieve a single board by its UUID. The current user must be a member of the board.",
|
|
"operationId": "api_get_board_api_v1_boards__board_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "The requested board."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Not a member of this board"
|
|
},
|
|
"404": {
|
|
"description": "Board not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get a board by UUID",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update a board's fields. The current user must have update permission on the board.",
|
|
"operationId": "api_update_board_api_v1_boards__board_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Board updated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to update board"
|
|
},
|
|
"404": {
|
|
"description": "Board not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a board",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/{board_uuid}/duplicate": {
|
|
"post": {
|
|
"description": "Create a copy of an existing board. The current user must have permission to create boards in the source org.",
|
|
"operationId": "api_duplicate_board_api_v1_boards__board_uuid__duplicate_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Board duplicated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Board not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Duplicate a board",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/{board_uuid}/members": {
|
|
"get": {
|
|
"description": "Return the list of members on a given board. The current user must be a member of the board.",
|
|
"operationId": "api_get_board_members_api_v1_boards__board_uuid__members_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/BoardMemberRead"
|
|
},
|
|
"title": "Response 200 Api Get Board Members Api V1 Boards Board Uuid Members Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of board members."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Not a member of this board"
|
|
},
|
|
"404": {
|
|
"description": "Board not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List board members",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Add a single user as a member of the given board. The current user must have permission to manage board members.",
|
|
"operationId": "api_add_board_member_api_v1_boards__board_uuid__members_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardMemberCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardMemberRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Member added to board."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Board member limit reached or insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Board or user not found"
|
|
},
|
|
"409": {
|
|
"description": "User is already a board member"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Add a member to a board",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/{board_uuid}/members/batch": {
|
|
"post": {
|
|
"description": "Add several users as members of a board in a single request. The current user must have permission to manage board members.",
|
|
"operationId": "api_add_board_members_batch_api_v1_boards__board_uuid__members_batch_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardMemberBatchCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/BoardMemberRead"
|
|
},
|
|
"title": "Response 200 Api Add Board Members Batch Api V1 Boards Board Uuid Members Batch Post",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Members added to board."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Board member limit reached or insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Board not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Add multiple members to a board",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/{board_uuid}/members/{user_id}": {
|
|
"delete": {
|
|
"description": "Remove a user from a board's member list. The board owner cannot be removed via this endpoint.",
|
|
"operationId": "api_remove_board_member_api_v1_boards__board_uuid__members__user_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Member removed from board."
|
|
},
|
|
"400": {
|
|
"description": "Cannot remove the board owner"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Board member not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove a member from a board",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/{board_uuid}/membership": {
|
|
"get": {
|
|
"description": "Return the current user's membership record on a board, if any. Used by clients to check role and access before loading the collab session.",
|
|
"operationId": "api_check_board_membership_api_v1_boards__board_uuid__membership_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardMemberRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "The current user's membership record on the board."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Not a member of this board"
|
|
},
|
|
"404": {
|
|
"description": "Board not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Check current user's board membership",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/{board_uuid}/thumbnail": {
|
|
"post": {
|
|
"description": "Upload or replace the thumbnail image for a board. The current user must have update permission on the board.",
|
|
"operationId": "api_update_board_thumbnail_api_v1_boards__board_uuid__thumbnail_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_board_thumbnail_api_v1_boards__board_uuid__thumbnail_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BoardRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Thumbnail uploaded and board updated."
|
|
},
|
|
"400": {
|
|
"description": "No thumbnail file provided"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to update board"
|
|
},
|
|
"404": {
|
|
"description": "Board not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload a board thumbnail",
|
|
"tags": [
|
|
"boards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/boards/{board_uuid}/ydoc": {
|
|
"get": {
|
|
"description": "Return the persisted Yjs document binary state for a board. Internal endpoint used by the Hocuspocus collab server; requires the shared internal key header.",
|
|
"operationId": "api_get_ydoc_state_api_v1_boards__board_uuid__ydoc_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "x-internal-key",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "X-Internal-Key",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"application/octet-stream": {}
|
|
},
|
|
"description": "Binary Yjs document state (empty body if no state is stored)."
|
|
},
|
|
"403": {
|
|
"description": "Invalid internal key"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Fetch the Yjs document state for a board",
|
|
"tags": [
|
|
"boards-internal"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Store the latest Yjs document binary state for a board. Internal endpoint used by the Hocuspocus collab server; requires the shared internal key header.",
|
|
"operationId": "api_store_ydoc_state_api_v1_boards__board_uuid__ydoc_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "board_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Board Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "x-internal-key",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "X-Internal-Key",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Yjs document state persisted successfully."
|
|
},
|
|
"403": {
|
|
"description": "Invalid internal key"
|
|
},
|
|
"404": {
|
|
"description": "Board not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Persist the Yjs document state for a board",
|
|
"tags": [
|
|
"boards-internal"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/certifications/": {
|
|
"post": {
|
|
"description": "Create a new certification template for a course. Certifications are awarded when a learner completes the course.",
|
|
"operationId": "api_create_certification_api_v1_certifications__post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CertificationCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CertificationRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Certification created."
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to create certifications on this course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create certification",
|
|
"tags": [
|
|
"certifications"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/certifications/certificate/{user_certification_uuid}": {
|
|
"get": {
|
|
"description": "Get an awarded certificate by its user_certification UUID, with linked certification and course details.",
|
|
"operationId": "api_get_certificate_by_user_certification_uuid_api_v1_certifications_certificate__user_certification_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_certification_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Certification Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Get Certificate By User Certification Uuid Api V1 Certifications Certificate User Certification Uuid Get",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Awarded certificate with linked certification and course."
|
|
},
|
|
"404": {
|
|
"description": "Certificate not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get awarded certificate",
|
|
"tags": [
|
|
"certifications"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/certifications/course/{course_uuid}": {
|
|
"get": {
|
|
"description": "Get all certification templates attached to a course.",
|
|
"operationId": "api_get_certifications_by_course_api_v1_certifications_course__course_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CertificationRead"
|
|
},
|
|
"title": "Response Api Get Certifications By Course Api V1 Certifications Course Course Uuid Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of certifications for the course."
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List course certifications",
|
|
"tags": [
|
|
"certifications"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/certifications/user/all": {
|
|
"get": {
|
|
"description": "Get every certificate awarded to the current user across all courses, with complete linked information.",
|
|
"operationId": "api_get_all_user_certificates_api_v1_certifications_user_all_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Response Api Get All User Certificates Api V1 Certifications User All Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "All certificates awarded to the current user."
|
|
}
|
|
},
|
|
"summary": "List my certificates",
|
|
"tags": [
|
|
"certifications"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/certifications/user/course/{course_uuid}": {
|
|
"get": {
|
|
"description": "Get all certificates awarded to the current user for a specific course, including certification details.",
|
|
"operationId": "api_get_user_certificates_for_course_api_v1_certifications_user_course__course_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Response Api Get User Certificates For Course Api V1 Certifications User Course Course Uuid Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of the user's certificates for the course."
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List my certificates for course",
|
|
"tags": [
|
|
"certifications"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/certifications/{certification_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a certification template by its UUID. Existing awarded certificates are not removed.",
|
|
"operationId": "api_delete_certification_api_v1_certifications__certification_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "certification_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Certification Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Certification deleted."
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to delete this certification"
|
|
},
|
|
"404": {
|
|
"description": "Certification not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete certification",
|
|
"tags": [
|
|
"certifications"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Get a single certification template by its UUID.",
|
|
"operationId": "api_get_certification_api_v1_certifications__certification_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "certification_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Certification Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CertificationRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Certification details."
|
|
},
|
|
"404": {
|
|
"description": "Certification not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get certification",
|
|
"tags": [
|
|
"certifications"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update a certification template by its UUID.",
|
|
"operationId": "api_update_certification_api_v1_certifications__certification_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "certification_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Certification Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CertificationUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CertificationRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Certification updated."
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to update this certification"
|
|
},
|
|
"404": {
|
|
"description": "Certification not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update certification",
|
|
"tags": [
|
|
"certifications"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/chapters/": {
|
|
"post": {
|
|
"description": "Create a new chapter inside an existing course.",
|
|
"operationId": "api_create_coursechapter_api_v1_chapters__post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChapterCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChapterRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Chapter created successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create chapters on this course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"description": "Invalid chapter payload"
|
|
}
|
|
},
|
|
"summary": "Create chapter",
|
|
"tags": [
|
|
"chapters"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/chapters/course/{course_id}/page/{page}/limit/{limit}": {
|
|
"get": {
|
|
"description": "Paginated list of chapters for the specified course.",
|
|
"operationId": "api_get_chapter_by_api_v1_chapters_course__course_id__page__page__limit__limit__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "page",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "limit",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChapterRead"
|
|
},
|
|
"title": "Response 200 Api Get Chapter By Api V1 Chapters Course Course Id Page Page Limit Limit Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Paginated list of chapters"
|
|
},
|
|
"403": {
|
|
"description": "User lacks read access to the course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List course chapters",
|
|
"tags": [
|
|
"chapters"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/chapters/course/{course_uuid}/meta": {
|
|
"get": {
|
|
"deprecated": true,
|
|
"description": "Deprecated endpoint returning chapter metadata for a course. Use /course/{course_uuid}/meta on the courses router instead.",
|
|
"operationId": "api_get_chapter_meta_api_v1_chapters_course__course_uuid__meta_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Chapter metadata"
|
|
},
|
|
"403": {
|
|
"description": "User lacks read access to the course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get chapters metadata (deprecated)",
|
|
"tags": [
|
|
"chapters"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/chapters/course/{course_uuid}/order": {
|
|
"put": {
|
|
"description": "Update the ordering of chapters and the activities nested inside them for a given course.",
|
|
"operationId": "api_update_chapter_meta_api_v1_chapters_course__course_uuid__order_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChapterUpdateOrder"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Order updated successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to modify this course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"409": {
|
|
"description": "Course does not exist"
|
|
},
|
|
"422": {
|
|
"description": "Invalid order payload"
|
|
}
|
|
},
|
|
"summary": "Reorder chapters and activities",
|
|
"tags": [
|
|
"chapters"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/chapters/{chapter_id}": {
|
|
"delete": {
|
|
"description": "Delete a chapter and detach its activities from the course.",
|
|
"operationId": "api_delete_coursechapter_api_v1_chapters__chapter_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "chapter_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Chapter deleted successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this chapter"
|
|
},
|
|
"404": {
|
|
"description": "Chapter not found"
|
|
},
|
|
"409": {
|
|
"description": "Chapter does not exist"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete chapter",
|
|
"tags": [
|
|
"chapters"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Retrieve a single chapter by its numeric ID.",
|
|
"operationId": "api_get_coursechapter_api_v1_chapters__chapter_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "chapter_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChapterRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Chapter retrieved successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks read access to this chapter"
|
|
},
|
|
"404": {
|
|
"description": "Chapter not found"
|
|
},
|
|
"409": {
|
|
"description": "Chapter does not exist"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get chapter by ID",
|
|
"tags": [
|
|
"chapters"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update the name or other metadata of a chapter by its ID.",
|
|
"operationId": "api_update_coursechapter_api_v1_chapters__chapter_id__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "chapter_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Chapter Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChapterUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChapterRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Chapter updated successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to modify this chapter"
|
|
},
|
|
"404": {
|
|
"description": "Chapter not found"
|
|
},
|
|
"409": {
|
|
"description": "Chapter does not exist"
|
|
},
|
|
"422": {
|
|
"description": "Invalid chapter payload"
|
|
}
|
|
},
|
|
"summary": "Update chapter",
|
|
"tags": [
|
|
"chapters"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/chapters/{chapter_uuid}/usergroups": {
|
|
"get": {
|
|
"description": "Return the user groups that can access this chapter when lock_type is 'restricted'.",
|
|
"operationId": "api_list_chapter_usergroups_api_v1_chapters__chapter_uuid__usergroups_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "chapter_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Chapter Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List user groups assigned to a locked chapter",
|
|
"tags": [
|
|
"chapters"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/chapters/{chapter_uuid}/usergroups/{usergroup_uuid}": {
|
|
"delete": {
|
|
"description": "Remove the association between a user group and this chapter.",
|
|
"operationId": "api_remove_chapter_usergroup_api_v1_chapters__chapter_uuid__usergroups__usergroup_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "chapter_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Chapter Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Revoke a user group's access to a locked chapter",
|
|
"tags": [
|
|
"chapters"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Associate a user group with this chapter so its members can access it when lock_type is 'restricted'.",
|
|
"operationId": "api_add_chapter_usergroup_api_v1_chapters__chapter_uuid__usergroups__usergroup_uuid__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "chapter_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Chapter Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Grant a user group access to a locked chapter",
|
|
"tags": [
|
|
"chapters"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/code/execute": {
|
|
"post": {
|
|
"description": "Submit a single code snippet to the Judge0 sandbox and return its result. Supports SQL execution via a bundled SQLite database; API tokens are not permitted for this endpoint.",
|
|
"operationId": "execute_code_api_v1_code_execute_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ExecuteRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Judge0 submission result for the executed code."
|
|
},
|
|
"400": {
|
|
"description": "Invalid sqlite_db_path or file path"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "API tokens not permitted, or no access to the referenced course"
|
|
},
|
|
"404": {
|
|
"description": "SQLite database file not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"503": {
|
|
"description": "Code execution is not configured on this instance"
|
|
}
|
|
},
|
|
"summary": "Execute a code snippet",
|
|
"tags": [
|
|
"code-execution"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/code/execute-batch": {
|
|
"post": {
|
|
"description": "Run a code snippet against multiple test cases in parallel and return per-test pass/fail results. Supports SQL execution via a bundled SQLite database; API tokens are not permitted.",
|
|
"operationId": "execute_batch_api_v1_code_execute_batch_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ExecuteBatchRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Per-test execution results for the submitted code."
|
|
},
|
|
"400": {
|
|
"description": "Invalid sqlite_db_path or file path"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "API tokens not permitted, or no access to the referenced course"
|
|
},
|
|
"404": {
|
|
"description": "SQLite database file not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"503": {
|
|
"description": "Code execution is not configured on this instance"
|
|
}
|
|
},
|
|
"summary": "Execute code against a batch of test cases",
|
|
"tags": [
|
|
"code-execution"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/code/submissions/history": {
|
|
"get": {
|
|
"description": "Return the authenticated user's previous code submissions for a given activity block, paginated by page and limit.",
|
|
"operationId": "get_submission_history_api_v1_code_submissions_history_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "block_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Block Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 20,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Get Submission History Api V1 Code Submissions History Get",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Paginated list of code submissions for the current user on the given block."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List a user's code submission history",
|
|
"tags": [
|
|
"code_submissions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/code/submissions/save": {
|
|
"post": {
|
|
"description": "Persist a code submission (source, results, pass/fail counts) for the authenticated user on an activity block.",
|
|
"operationId": "save_submission_api_v1_code_submissions_save_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SaveSubmissionRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CodeSubmissionRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Code submission saved successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Save a code submission",
|
|
"tags": [
|
|
"code_submissions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/code/upload-sqlite": {
|
|
"post": {
|
|
"description": "Upload a SQLite database file for a code playground block. Requires an authenticated user with update permission on the target course; API tokens are not permitted.",
|
|
"operationId": "upload_sqlite_db_api_v1_code_upload_sqlite_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_upload_sqlite_db_api_v1_code_upload_sqlite_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Uploaded file path and original filename."
|
|
},
|
|
"400": {
|
|
"description": "Invalid course_uuid or file path"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "API tokens not permitted, or no update access to the course"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload a SQLite database for a code playground block",
|
|
"tags": [
|
|
"code-execution"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/collections/": {
|
|
"post": {
|
|
"description": "Create a new collection of courses within an organization.",
|
|
"operationId": "api_create_collection_api_v1_collections__post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CollectionCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CollectionRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Collection created."
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to create collections in this org"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create collection",
|
|
"tags": [
|
|
"collections"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/collections/org/{org_id}/page/{page}/limit/{limit}": {
|
|
"get": {
|
|
"description": "Get collections for an organization, paginated by `page` and `limit`.",
|
|
"operationId": "api_get_collections_by_api_v1_collections_org__org_id__page__page__limit__limit__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "page",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "limit",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CollectionRead"
|
|
},
|
|
"title": "Response Api Get Collections By Api V1 Collections Org Org Id Page Page Limit Limit Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Paginated list of collections for the organization."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List collections for org",
|
|
"tags": [
|
|
"collections"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/collections/{collection_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a collection by its UUID. The collection is permanently removed.",
|
|
"operationId": "api_delete_collection_api_v1_collections__collection_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "collection_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Collection Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Collection deleted."
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to delete this collection"
|
|
},
|
|
"404": {
|
|
"description": "Collection not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete collection",
|
|
"tags": [
|
|
"collections"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Get a single collection by its UUID.",
|
|
"operationId": "api_get_collection_api_v1_collections__collection_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "collection_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Collection Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CollectionRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Collection details."
|
|
},
|
|
"404": {
|
|
"description": "Collection not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get collection",
|
|
"tags": [
|
|
"collections"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update a collection by its UUID.",
|
|
"operationId": "api_update_collection_api_v1_collections__collection_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "collection_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Collection Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CollectionUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CollectionRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Collection updated."
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to update this collection"
|
|
},
|
|
"404": {
|
|
"description": "Collection not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update collection",
|
|
"tags": [
|
|
"collections"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/comments/{comment_uuid}": {
|
|
"delete": {
|
|
"description": "Permanently delete a comment. Requires the comment author or a community admin.",
|
|
"operationId": "api_delete_comment_api_v1_comments__comment_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "comment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Comment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Delete Comment Api V1 Comments Comment Uuid Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Comment deleted successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not the author and lacks community admin role"
|
|
},
|
|
"404": {
|
|
"description": "Comment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a comment",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Edit the content of an existing comment. Requires the comment author.",
|
|
"operationId": "api_update_comment_api_v1_comments__comment_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "comment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Comment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionCommentUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionCommentReadWithVoteStatus"
|
|
}
|
|
}
|
|
},
|
|
"description": "Comment updated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not the comment author"
|
|
},
|
|
"404": {
|
|
"description": "Comment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a comment",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/comments/{comment_uuid}/vote": {
|
|
"delete": {
|
|
"description": "Remove the current user's upvote from a comment. The user must have previously voted.",
|
|
"operationId": "api_remove_comment_upvote_api_v1_comments__comment_uuid__vote_delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "comment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Comment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Remove Comment Upvote Api V1 Comments Comment Uuid Vote Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Upvote removed."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this comment's community"
|
|
},
|
|
"404": {
|
|
"description": "Comment or existing vote not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove an upvote from a comment",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Cast an upvote for a comment on behalf of the current user. Requires read access to the parent community.",
|
|
"operationId": "api_upvote_comment_api_v1_comments__comment_uuid__vote_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "comment_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Comment Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionCommentVoteRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Upvote registered."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this comment's community"
|
|
},
|
|
"404": {
|
|
"description": "Comment not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upvote a comment",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/communities/": {
|
|
"post": {
|
|
"description": "Create a new community inside an organization. Optionally link it to a course on creation. Requires admin/maintainer role.",
|
|
"operationId": "api_create_community_api_v1_communities__post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommunityCreateRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommunityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Community created successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks admin/maintainer role for the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization or course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create a community",
|
|
"tags": [
|
|
"communities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/communities/course/{course_uuid}": {
|
|
"get": {
|
|
"description": "Retrieve the community that is linked to a specific course, if one exists.",
|
|
"operationId": "api_get_community_by_course_api_v1_communities_course__course_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CommunityRead"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Response Api Get Community By Course Api V1 Communities Course Course Uuid Get"
|
|
}
|
|
}
|
|
},
|
|
"description": "Community linked to the course, or null if no community is linked."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get community for a course",
|
|
"tags": [
|
|
"communities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/communities/org/{org_id}/page/{page}/limit/{limit}": {
|
|
"get": {
|
|
"description": "Retrieve a paginated list of communities belonging to an organization.",
|
|
"operationId": "api_get_communities_by_org_api_v1_communities_org__org_id__page__page__limit__limit__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "page",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "limit",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CommunityRead"
|
|
},
|
|
"title": "Response 200 Api Get Communities By Org Api V1 Communities Org Org Id Page Page Limit Limit Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Paginated list of communities."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks access to this organization's communities"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List communities for an organization",
|
|
"tags": [
|
|
"communities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/communities/{community_uuid}": {
|
|
"delete": {
|
|
"description": "Permanently delete a community. Requires admin/maintainer role.",
|
|
"operationId": "api_delete_community_api_v1_communities__community_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "community_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Delete Community Api V1 Communities Community Uuid Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Community deleted successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks admin/maintainer role for this community"
|
|
},
|
|
"404": {
|
|
"description": "Community not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a community",
|
|
"tags": [
|
|
"communities"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Retrieve a community by its UUID. The caller must be able to read the community.",
|
|
"operationId": "api_get_community_api_v1_communities__community_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "community_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommunityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Community retrieved."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have read access to this community"
|
|
},
|
|
"404": {
|
|
"description": "Community not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get a community",
|
|
"tags": [
|
|
"communities"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update an existing community's attributes. Requires admin/maintainer role.",
|
|
"operationId": "api_update_community_api_v1_communities__community_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "community_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommunityUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommunityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Community updated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks admin/maintainer role for this community"
|
|
},
|
|
"404": {
|
|
"description": "Community not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a community",
|
|
"tags": [
|
|
"communities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/communities/{community_uuid}/discussions": {
|
|
"get": {
|
|
"description": "Retrieve a paginated list of discussions for a community with sorting and optional label filtering. Pinned discussions are always returned first.",
|
|
"operationId": "api_get_discussions_by_community_api_v1_communities__community_uuid__discussions_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "community_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "sort_by",
|
|
"required": false,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionSortBy",
|
|
"default": "recent"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 1,
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 10,
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "label",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Label"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/DiscussionReadWithVoteStatus"
|
|
},
|
|
"title": "Response 200 Api Get Discussions By Community Api V1 Communities Community Uuid Discussions Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Discussions for the community."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this community"
|
|
},
|
|
"404": {
|
|
"description": "Community not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List discussions in a community",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Create a new discussion thread inside a community. Requires an authenticated user with read access to the community.",
|
|
"operationId": "api_create_discussion_api_v1_communities__community_uuid__discussions_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "community_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionCreateRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionReadWithVoteStatus"
|
|
}
|
|
}
|
|
},
|
|
"description": "Discussion created successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this community"
|
|
},
|
|
"404": {
|
|
"description": "Community not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/communities/{community_uuid}/link-course/{course_uuid}": {
|
|
"put": {
|
|
"description": "Associate a community with a course so that course members can participate. Requires admin/maintainer role.",
|
|
"operationId": "api_link_community_to_course_api_v1_communities__community_uuid__link_course__course_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "community_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommunityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Community linked to course."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks admin/maintainer role for this community"
|
|
},
|
|
"404": {
|
|
"description": "Community or course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Link community to a course",
|
|
"tags": [
|
|
"communities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/communities/{community_uuid}/rights": {
|
|
"get": {
|
|
"description": "Return a detailed breakdown of the rights the current user has on a community (read, write, moderate, admin).",
|
|
"operationId": "api_get_community_rights_api_v1_communities__community_uuid__rights_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "community_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Get Community Rights Api V1 Communities Community Uuid Rights Get",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "User rights for the community."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Community not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get current user rights for a community",
|
|
"tags": [
|
|
"communities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/communities/{community_uuid}/thumbnail": {
|
|
"put": {
|
|
"description": "Upload or replace the thumbnail image for a community. Requires admin/maintainer role.",
|
|
"operationId": "api_update_community_thumbnail_api_v1_communities__community_uuid__thumbnail_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "community_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_community_thumbnail_api_v1_communities__community_uuid__thumbnail_put"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommunityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Thumbnail uploaded and community updated."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks admin/maintainer role for this community"
|
|
},
|
|
"404": {
|
|
"description": "Community or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload a community thumbnail",
|
|
"tags": [
|
|
"communities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/communities/{community_uuid}/unlink-course": {
|
|
"delete": {
|
|
"description": "Remove the association between a community and its currently linked course. Requires admin/maintainer role.",
|
|
"operationId": "api_unlink_community_from_course_api_v1_communities__community_uuid__unlink_course_delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "community_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Community Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommunityRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Community unlinked from course."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks admin/maintainer role for this community"
|
|
},
|
|
"404": {
|
|
"description": "Community not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Unlink community from its course",
|
|
"tags": [
|
|
"communities"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/": {
|
|
"post": {
|
|
"description": "Create a new course in the specified organization. Accepts multipart form data with course metadata and an optional thumbnail image or video.",
|
|
"operationId": "api_create_course_api_v1_courses__post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_course_api_v1_courses__post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course created successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create courses in the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"description": "Invalid form data"
|
|
}
|
|
},
|
|
"summary": "Create course",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/export/batch": {
|
|
"post": {
|
|
"description": "Export multiple courses (up to 20 per request) as a single ZIP archive. All specified courses must belong to the same organization and the caller must have read access to each course.",
|
|
"operationId": "api_export_courses_batch_api_v1_courses_export_batch_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BatchExportRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"application/zip": {}
|
|
},
|
|
"description": "ZIP archive containing the exported courses"
|
|
},
|
|
"403": {
|
|
"description": "User lacks read permission on one of the courses"
|
|
},
|
|
"404": {
|
|
"description": "One or more of the requested courses was not found"
|
|
},
|
|
"422": {
|
|
"description": "Validation error (empty list or more than 20 courses requested)"
|
|
}
|
|
},
|
|
"summary": "Export multiple courses as ZIP",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/id/{course_id}": {
|
|
"get": {
|
|
"description": "Retrieve a single course by its numeric database ID.",
|
|
"operationId": "api_get_course_by_id_api_v1_courses_id__course_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course retrieved successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks read access to this course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get course by ID",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/import": {
|
|
"post": {
|
|
"description": "Import previously analyzed courses into an organization. Uses the temp_id returned by the analyze step along with the list of course UUIDs to import. Up to 20 courses can be imported per request.",
|
|
"operationId": "api_import_courses_api_v1_courses_import_post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ImportRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ImportResult"
|
|
}
|
|
}
|
|
},
|
|
"description": "Courses imported successfully"
|
|
},
|
|
"400": {
|
|
"description": "Invalid temp_id or course_uuids not present in the package"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create courses in the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization or temporary package not found"
|
|
},
|
|
"422": {
|
|
"description": "Validation error (empty list or more than 20 courses)"
|
|
}
|
|
},
|
|
"summary": "Import courses from an analyzed package",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/import/analyze": {
|
|
"post": {
|
|
"description": "Upload and analyze a LearnHouse course export ZIP. Validates the package, extracts its contents, and returns a list of courses available for import along with a temp_id to use with the subsequent import endpoint.",
|
|
"operationId": "api_analyze_import_package_api_v1_courses_import_analyze_post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_analyze_import_package_api_v1_courses_import_analyze_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ImportAnalysisResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Package analyzed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Invalid or malformed export package"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create courses in the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Analyze a course import package",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/migrate/create": {
|
|
"post": {
|
|
"description": "Create a course from the finalized migration tree structure returned by the suggest endpoint.",
|
|
"operationId": "api_create_from_migration_api_v1_courses_migrate_create_post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreateFromMigrationRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MigrationCreateResult"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course created from the migration payload; returns ids of created resources."
|
|
},
|
|
"400": {
|
|
"description": "Invalid structure payload"
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to create courses in this org"
|
|
},
|
|
"404": {
|
|
"description": "Temporary upload id or referenced resources not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create course from migration",
|
|
"tags": [
|
|
"migration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/migrate/suggest": {
|
|
"post": {
|
|
"description": "Use AI to suggest a course structure from previously uploaded migration files.",
|
|
"operationId": "api_suggest_structure_api_v1_courses_migrate_suggest_post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SuggestStructureRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MigrationTreeStructure"
|
|
}
|
|
}
|
|
},
|
|
"description": "Suggested course tree structure based on the uploaded files."
|
|
},
|
|
"404": {
|
|
"description": "Temporary upload id not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Suggest migration structure",
|
|
"tags": [
|
|
"migration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/migrate/upload": {
|
|
"post": {
|
|
"description": "Upload files for content migration from another LMS. Pass an existing `temp_id` to append additional files to a prior upload.",
|
|
"operationId": "api_upload_migration_files_api_v1_courses_migrate_upload_post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "temp_id",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Temp Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_upload_migration_files_api_v1_courses_migrate_upload_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MigrationUploadResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Files uploaded; returns the temporary upload id."
|
|
},
|
|
"400": {
|
|
"description": "Uploaded files are invalid or unsupported"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload migration files",
|
|
"tags": [
|
|
"migration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/org_slug/{org_slug}/count": {
|
|
"get": {
|
|
"description": "Return the total number of courses for the organization identified by slug.",
|
|
"operationId": "api_get_courses_count_api_v1_courses_org_slug__org_slug__count_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"title": "Response Api Get Courses Count Api V1 Courses Org Slug Org Slug Count Get",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"description": "Total course count"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Count courses in an organization",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/org_slug/{org_slug}/page/{page}/limit/{limit}": {
|
|
"get": {
|
|
"description": "Paginated list of courses for an organization identified by slug. Set include_unpublished=true to include unpublished courses (requires update permission on the organization).",
|
|
"operationId": "api_get_course_by_orgslug_api_v1_courses_org_slug__org_slug__page__page__limit__limit__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "page",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "limit",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "include_unpublished",
|
|
"required": false,
|
|
"schema": {
|
|
"default": false,
|
|
"title": "Include Unpublished",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CourseRead"
|
|
},
|
|
"title": "Response 200 Api Get Course By Orgslug Api V1 Courses Org Slug Org Slug Page Page Limit Limit Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Paginated list of courses"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to list unpublished courses"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List courses for an organization",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/org_slug/{org_slug}/search": {
|
|
"get": {
|
|
"description": "Full-text search courses by title and description within an organization. Query length is capped at 200 characters and results are paginated with a maximum page size of 50 to prevent data dumping.",
|
|
"operationId": "api_search_courses_api_v1_courses_org_slug__org_slug__search_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Search query",
|
|
"in": "query",
|
|
"name": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Search query",
|
|
"maxLength": 200,
|
|
"minLength": 1,
|
|
"title": "Query",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Page number",
|
|
"in": "query",
|
|
"name": "page",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"description": "Items per page (max 50)",
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 10,
|
|
"description": "Items per page (max 50)",
|
|
"maximum": 50,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CourseRead"
|
|
},
|
|
"title": "Response 200 Api Search Courses Api V1 Courses Org Slug Org Slug Search Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Paginated list of matching courses"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"description": "Invalid query or pagination parameters"
|
|
}
|
|
},
|
|
"summary": "Search courses",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}": {
|
|
"delete": {
|
|
"description": "Permanently delete a course and all of its content by UUID.",
|
|
"operationId": "api_delete_course_api_v1_courses__course_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Course deleted successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete the course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete course",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Retrieve a single course by its UUID.",
|
|
"operationId": "api_get_course_api_v1_courses__course_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course retrieved successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks read access to this course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get course by UUID",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update course metadata (name, description, about, tags, visibility, etc.) by UUID.",
|
|
"operationId": "api_update_course_api_v1_courses__course_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course updated successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update the course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"description": "Invalid update payload"
|
|
}
|
|
},
|
|
"summary": "Update course",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/apply-contributor": {
|
|
"post": {
|
|
"description": "Submit an application for the current user to become a contributor on the given course.",
|
|
"operationId": "api_apply_course_contributor_api_v1_courses__course_uuid__apply_contributor_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Application submitted"
|
|
},
|
|
"403": {
|
|
"description": "Course is not open to contributors"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Apply as course contributor",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/bulk-add-contributors": {
|
|
"post": {
|
|
"description": "Add multiple contributors to a course by their usernames in a single call. Only course administrators can perform this action.",
|
|
"operationId": "api_add_bulk_course_contributors_api_v1_courses__course_uuid__bulk_add_contributors_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Usernames",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Contributors added"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to manage contributors"
|
|
},
|
|
"404": {
|
|
"description": "Course or one of the specified users not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Bulk add course contributors",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/bulk-remove-contributors": {
|
|
"put": {
|
|
"description": "Remove multiple contributors from a course by their usernames in a single call.",
|
|
"operationId": "api_remove_bulk_course_contributors_api_v1_courses__course_uuid__bulk_remove_contributors_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Usernames",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Contributors removed"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to manage contributors"
|
|
},
|
|
"404": {
|
|
"description": "Course or one of the specified users not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Bulk remove course contributors",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/clone": {
|
|
"post": {
|
|
"description": "Create a complete copy of a course including chapters, activities, blocks and all associated files. The cloned course gets a new UUID, is set to private by default, and has the current user as the creator.",
|
|
"operationId": "api_clone_course_api_v1_courses__course_uuid__clone_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cloned course"
|
|
},
|
|
"403": {
|
|
"description": "User lacks read access to the source course or cannot create courses"
|
|
},
|
|
"404": {
|
|
"description": "Source course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Clone course",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/contributors": {
|
|
"get": {
|
|
"description": "Return all contributors attached to a given course along with their authorship role and status.",
|
|
"operationId": "api_get_course_contributors_api_v1_courses__course_uuid__contributors_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "List of course contributors"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view contributors"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List course contributors",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/contributors/{contributor_user_id}": {
|
|
"put": {
|
|
"description": "Update a course contributor's authorship role and status. Only course administrators or maintainers can perform this action.",
|
|
"operationId": "api_update_course_contributor_api_v1_courses__course_uuid__contributors__contributor_user_id__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "contributor_user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Contributor User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "authorship",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResourceAuthorshipEnum"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "authorship_status",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResourceAuthorshipStatusEnum"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Contributor updated"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to manage contributors"
|
|
},
|
|
"404": {
|
|
"description": "Course or contributor not found"
|
|
},
|
|
"422": {
|
|
"description": "Invalid authorship or status value"
|
|
}
|
|
},
|
|
"summary": "Update course contributor",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/export": {
|
|
"get": {
|
|
"description": "Export a single course and all its content (chapters, activities, blocks, and files) as a ZIP archive following the LearnHouse export format.",
|
|
"operationId": "api_export_course_api_v1_courses__course_uuid__export_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"application/zip": {}
|
|
},
|
|
"description": "ZIP archive containing the exported course"
|
|
},
|
|
"403": {
|
|
"description": "User lacks read access to the course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Export course as ZIP",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/meta": {
|
|
"get": {
|
|
"description": "Retrieve full course metadata including chapters and activities. Use slim=true to exclude heavy activity content/details, useful for navigation menus.",
|
|
"operationId": "api_get_course_meta_api_v1_courses__course_uuid__meta_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "with_unpublished_activities",
|
|
"required": false,
|
|
"schema": {
|
|
"default": false,
|
|
"title": "With Unpublished Activities",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "slim",
|
|
"required": false,
|
|
"schema": {
|
|
"default": false,
|
|
"title": "Slim",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FullCourseRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course metadata retrieved successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks read access to this course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get course metadata",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/rights": {
|
|
"get": {
|
|
"description": "Return the current user's detailed rights on a course (permissions, ownership, roles). Intended for UI-level feature gating; anonymous users only see rights for public courses.",
|
|
"operationId": "api_get_course_user_rights_api_v1_courses__course_uuid__rights_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Get Course User Rights Api V1 Courses Course Uuid Rights Get",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Rights object describing permissions, ownership and roles"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get course user rights",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/thumbnail": {
|
|
"put": {
|
|
"description": "Replace the thumbnail image or video for an existing course.",
|
|
"operationId": "api_create_course_thumbnail_api_v1_courses__course_uuid__thumbnail_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_course_thumbnail_api_v1_courses__course_uuid__thumbnail_put"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Thumbnail updated successfully"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update the course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"description": "Invalid thumbnail file"
|
|
}
|
|
},
|
|
"summary": "Update course thumbnail",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/update/{courseupdate_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a course update post by its UUID.",
|
|
"operationId": "api_delete_course_update_api_v1_courses__course_uuid__update__courseupdate_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "courseupdate_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Courseupdate Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Course update deleted"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete updates on this course"
|
|
},
|
|
"404": {
|
|
"description": "Course or course update not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete course update",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Edit an existing course update post identified by its UUID.",
|
|
"operationId": "api_update_course_update_api_v1_courses__course_uuid__update__courseupdate_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "courseupdate_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Courseupdate Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseUpdateUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseUpdateRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course update modified"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to modify updates on this course"
|
|
},
|
|
"404": {
|
|
"description": "Course or course update not found"
|
|
},
|
|
"422": {
|
|
"description": "Invalid update payload"
|
|
}
|
|
},
|
|
"summary": "Update course update",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/courses/{course_uuid}/updates": {
|
|
"get": {
|
|
"description": "Return all course update posts for a given course.",
|
|
"operationId": "api_get_course_updates_api_v1_courses__course_uuid__updates_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CourseUpdateRead"
|
|
},
|
|
"title": "Response 200 Api Get Course Updates Api V1 Courses Course Uuid Updates Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of course update posts"
|
|
},
|
|
"403": {
|
|
"description": "User lacks read access to the course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List course updates",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Create a new course update post associated with the given course.",
|
|
"operationId": "api_create_course_update_api_v1_courses__course_uuid__updates_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseUpdateCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CourseUpdateRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course update created"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create updates for this course"
|
|
},
|
|
"404": {
|
|
"description": "Course not found"
|
|
},
|
|
"422": {
|
|
"description": "Invalid update payload"
|
|
}
|
|
},
|
|
"summary": "Create course update",
|
|
"tags": [
|
|
"courses"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dev/config": {
|
|
"get": {
|
|
"description": "Returns the current LearnHouse configuration with sensitive values redacted. Restricted to superadmin users.",
|
|
"operationId": "config_api_v1_dev_config_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Configuration dictionary with secrets redacted"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Superadmin access required"
|
|
}
|
|
},
|
|
"summary": "Get LearnHouse runtime config",
|
|
"tags": [
|
|
"dev"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dev/migrate_orgconfig_v0_to_v1": {
|
|
"post": {
|
|
"description": "Runs the v0 to v1 schema migration across every organization's configuration. Restricted to superadmin users.",
|
|
"operationId": "migrate_api_v1_dev_migrate_orgconfig_v0_to_v1_post",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Migration completed successfully"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Superadmin access required"
|
|
}
|
|
},
|
|
"summary": "Migrate organization config v0 to v1",
|
|
"tags": [
|
|
"dev"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dev/migrate_orgconfig_v1_to_v1.1": {
|
|
"post": {
|
|
"description": "Runs the v1 to v1.1 schema migration across every organization's configuration. Restricted to superadmin users.",
|
|
"operationId": "migratev1_1_api_v1_dev_migrate_orgconfig_v1_to_v1_1_post",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Migration completed successfully"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Superadmin access required"
|
|
}
|
|
},
|
|
"summary": "Migrate organization config v1 to v1.1",
|
|
"tags": [
|
|
"dev"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dev/migrate_orgconfig_v1_to_v1.2": {
|
|
"post": {
|
|
"description": "Runs the v1 to v1.2 schema migration across every organization's configuration. Restricted to superadmin users.",
|
|
"operationId": "migratev1_2_api_v1_dev_migrate_orgconfig_v1_to_v1_2_post",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Migration completed successfully"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Superadmin access required"
|
|
}
|
|
},
|
|
"summary": "Migrate organization config v1 to v1.2",
|
|
"tags": [
|
|
"dev"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/discussions/labels": {
|
|
"get": {
|
|
"description": "Return the catalog of labels (category tags) that can be assigned to discussions.",
|
|
"operationId": "api_get_discussion_labels_api_v1_discussions_labels_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/DiscussionLabelInfo"
|
|
},
|
|
"title": "Response 200 Api Get Discussion Labels Api V1 Discussions Labels Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Available discussion labels."
|
|
}
|
|
},
|
|
"summary": "List discussion labels",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/discussions/votes/batch": {
|
|
"post": {
|
|
"description": "Check in bulk whether the current user has upvoted each of the supplied discussion UUIDs. Returns a mapping of discussion_uuid to voted status.",
|
|
"operationId": "api_get_user_votes_batch_api_v1_discussions_votes_batch_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Discussion Uuids",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": {
|
|
"type": "boolean"
|
|
},
|
|
"title": "Response Api Get User Votes Batch Api V1 Discussions Votes Batch Post",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Mapping of discussion_uuid to voted status."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Batch check user vote status",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/discussions/{discussion_uuid}": {
|
|
"delete": {
|
|
"description": "Permanently delete a discussion and its associated comments. Requires the discussion author or an admin role.",
|
|
"operationId": "api_delete_discussion_api_v1_discussions__discussion_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Delete Discussion Api V1 Discussions Discussion Uuid Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Discussion deleted successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not the author or lacks admin role"
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Retrieve a single discussion by its UUID, including the current user's vote status.",
|
|
"operationId": "api_get_discussion_api_v1_discussions__discussion_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionReadWithVoteStatus"
|
|
}
|
|
}
|
|
},
|
|
"description": "Discussion retrieved."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this discussion's community"
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update a discussion's title, content, or label. Requires the discussion author or an admin role.",
|
|
"operationId": "api_update_discussion_api_v1_discussions__discussion_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionReadWithVoteStatus"
|
|
}
|
|
}
|
|
},
|
|
"description": "Discussion updated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not the author or lacks admin role"
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/discussions/{discussion_uuid}/comments": {
|
|
"get": {
|
|
"description": "Retrieve a paginated list of comments belonging to a discussion, including the current user's vote status.",
|
|
"operationId": "api_get_comments_by_discussion_api_v1_discussions__discussion_uuid__comments_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 1,
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 50,
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/DiscussionCommentReadWithVoteStatus"
|
|
},
|
|
"title": "Response 200 Api Get Comments By Discussion Api V1 Discussions Discussion Uuid Comments Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Comments for the discussion."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this discussion's community"
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List comments for a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Post a new comment on a discussion. Requires read access to the community and the discussion must not be locked.",
|
|
"operationId": "api_create_comment_api_v1_discussions__discussion_uuid__comments_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommentCreateRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionCommentReadWithVoteStatus"
|
|
}
|
|
}
|
|
},
|
|
"description": "Comment created successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this community or discussion is locked"
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create a comment",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/discussions/{discussion_uuid}/comments/count": {
|
|
"get": {
|
|
"description": "Return the total number of comments on a discussion. This endpoint is unauthenticated and safe to call for counters.",
|
|
"operationId": "api_get_comment_count_api_v1_discussions__discussion_uuid__comments_count_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Get Comment Count Api V1 Discussions Discussion Uuid Comments Count Get",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Object with the comment count (e.g. {\"count\": 42})."
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get comment count for a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/discussions/{discussion_uuid}/lock": {
|
|
"put": {
|
|
"description": "Toggle the locked state of a discussion. Locked discussions cannot receive new comments. Requires a community admin or maintainer role.",
|
|
"operationId": "api_lock_discussion_api_v1_discussions__discussion_uuid__lock_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionLockUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionReadWithVoteStatus"
|
|
}
|
|
}
|
|
},
|
|
"description": "Discussion lock state updated."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks the required moderator role"
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Lock or unlock a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/discussions/{discussion_uuid}/pin": {
|
|
"put": {
|
|
"description": "Toggle the pinned state of a discussion. Requires a community admin or maintainer role.",
|
|
"operationId": "api_pin_discussion_api_v1_discussions__discussion_uuid__pin_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionPinUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionReadWithVoteStatus"
|
|
}
|
|
}
|
|
},
|
|
"description": "Discussion pin state updated."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks the required moderator role"
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Pin or unpin a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/discussions/{discussion_uuid}/reactions": {
|
|
"get": {
|
|
"description": "Return all emoji reactions on a discussion, grouped by emoji, with counts and a flag indicating whether the current user has reacted.",
|
|
"operationId": "api_get_reactions_api_v1_discussions__discussion_uuid__reactions_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/DiscussionReactionSummary"
|
|
},
|
|
"title": "Response 200 Api Get Reactions Api V1 Discussions Discussion Uuid Reactions Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Reaction summaries for the discussion."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this discussion's community"
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List reactions on a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Toggle an emoji reaction on a discussion for the current user. If the user has already reacted with this emoji it is removed; otherwise it is added. Requires read access to the community.",
|
|
"operationId": "api_toggle_reaction_api_v1_discussions__discussion_uuid__reactions_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ReactionRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Toggle Reaction Api V1 Discussions Discussion Uuid Reactions Post",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Reaction toggled; response indicates the new state."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this discussion's community"
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Toggle a reaction on a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/discussions/{discussion_uuid}/vote": {
|
|
"delete": {
|
|
"description": "Remove the current user's upvote from a discussion. The user must have previously voted.",
|
|
"operationId": "api_remove_upvote_api_v1_discussions__discussion_uuid__vote_delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Remove Upvote Api V1 Discussions Discussion Uuid Vote Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Upvote removed."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this discussion's community"
|
|
},
|
|
"404": {
|
|
"description": "Discussion or existing vote not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove an upvote from a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Cast an upvote for a discussion on behalf of the current user. Requires read access to the community.",
|
|
"operationId": "api_upvote_discussion_api_v1_discussions__discussion_uuid__vote_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "discussion_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Discussion Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DiscussionVoteRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Upvote registered."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this discussion's community"
|
|
},
|
|
"404": {
|
|
"description": "Discussion not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upvote a discussion",
|
|
"tags": [
|
|
"discussions"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/health": {
|
|
"get": {
|
|
"description": "Returns the overall health of the service and its dependencies (e.g. database connectivity).",
|
|
"operationId": "health_api_v1_health_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Service is healthy; includes per-dependency status."
|
|
}
|
|
},
|
|
"summary": "Health check",
|
|
"tags": [
|
|
"health"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/instance/info": {
|
|
"get": {
|
|
"description": "Public endpoint returning instance configuration (deployment mode, default org slug, frontend domain, and multi-org flag). Result is cached for performance.",
|
|
"operationId": "get_instance_info_api_v1_instance_info_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Instance configuration for the current deployment."
|
|
}
|
|
},
|
|
"summary": "Get instance info",
|
|
"tags": [
|
|
"instance"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/integrations/zapier/courses": {
|
|
"get": {
|
|
"description": "List courses in the caller's organization for use as Zapier trigger samples. Maximum 500 rows.",
|
|
"operationId": "zapier_list_courses_api_v1_integrations_zapier_courses_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 100,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ZapierCourseItem"
|
|
},
|
|
"title": "Response Zapier List Courses Api V1 Integrations Zapier Courses Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of courses in the caller's organization."
|
|
},
|
|
"401": {
|
|
"description": "Missing or invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Organization plan does not include Zapier integration (Pro+ required)"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List courses for Zapier",
|
|
"tags": [
|
|
"integrations",
|
|
"zapier"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/integrations/zapier/events": {
|
|
"get": {
|
|
"description": "List every webhook event name a Zap can subscribe to.",
|
|
"operationId": "zapier_list_events_api_v1_integrations_zapier_events_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Zapier List Events Api V1 Integrations Zapier Events Get",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dictionary with `events`: the full list of supported event names."
|
|
},
|
|
"401": {
|
|
"description": "Missing or invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Organization plan does not include Zapier integration (Pro+ required)"
|
|
}
|
|
},
|
|
"summary": "List webhook events",
|
|
"tags": [
|
|
"integrations",
|
|
"zapier"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/integrations/zapier/me": {
|
|
"get": {
|
|
"description": "Return the organization and token identity for the current Zapier API token. Used by Zapier as the auth test endpoint.",
|
|
"operationId": "zapier_me_api_v1_integrations_zapier_me_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ZapierMeResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Organization and token identity for the current Zapier caller."
|
|
},
|
|
"401": {
|
|
"description": "Missing or invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Organization plan does not include Zapier integration (Pro+ required)"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found for this token"
|
|
}
|
|
},
|
|
"summary": "Identify Zapier caller",
|
|
"tags": [
|
|
"integrations",
|
|
"zapier"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/integrations/zapier/subscriptions": {
|
|
"get": {
|
|
"description": "List every active Zapier REST Hook subscription for the caller's organization.",
|
|
"operationId": "zapier_list_subscriptions_api_v1_integrations_zapier_subscriptions_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ZapierSubscriptionResponse"
|
|
},
|
|
"title": "Response Zapier List Subscriptions Api V1 Integrations Zapier Subscriptions Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of Zapier subscriptions for the caller's organization."
|
|
},
|
|
"401": {
|
|
"description": "Missing or invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Organization plan does not include Zapier integration (Pro+ required)"
|
|
}
|
|
},
|
|
"summary": "List Zap subscriptions",
|
|
"tags": [
|
|
"integrations",
|
|
"zapier"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Register a Zapier REST Hook subscription. Called by Zapier when a Zap is enabled. Creates a webhook endpoint tagged `source=\"zapier\"` that the dispatcher will deliver events to.",
|
|
"operationId": "zapier_create_subscription_api_v1_integrations_zapier_subscriptions_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ZapierSubscriptionCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ZapierSubscriptionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Subscription created \u2014 webhook endpoint registered for the given event."
|
|
},
|
|
"400": {
|
|
"description": "Unknown event name or invalid target URL (SSRF guard)"
|
|
},
|
|
"401": {
|
|
"description": "Missing or invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Organization plan does not include Zapier integration (Pro+ required)"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create Zap subscription",
|
|
"tags": [
|
|
"integrations",
|
|
"zapier"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/integrations/zapier/subscriptions/{subscription_id}": {
|
|
"delete": {
|
|
"description": "Delete a Zapier REST Hook subscription. Called by Zapier when a Zap is disabled or deleted.",
|
|
"operationId": "zapier_delete_subscription_api_v1_integrations_zapier_subscriptions__subscription_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "subscription_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Subscription Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Zapier Delete Subscription Api V1 Integrations Zapier Subscriptions Subscription Id Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Subscription deleted."
|
|
},
|
|
"401": {
|
|
"description": "Missing or invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Organization plan does not include Zapier integration (Pro+ required)"
|
|
},
|
|
"404": {
|
|
"description": "Subscription not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete Zap subscription",
|
|
"tags": [
|
|
"integrations",
|
|
"zapier"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/integrations/zapier/usergroups": {
|
|
"get": {
|
|
"description": "List cohorts / user groups in the caller's organization. Maximum 500 rows.",
|
|
"operationId": "zapier_list_usergroups_api_v1_integrations_zapier_usergroups_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 100,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ZapierUserGroupItem"
|
|
},
|
|
"title": "Response Zapier List Usergroups Api V1 Integrations Zapier Usergroups Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of user groups in the caller's organization."
|
|
},
|
|
"401": {
|
|
"description": "Missing or invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Organization plan does not include Zapier integration (Pro+ required)"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List user groups for Zapier",
|
|
"tags": [
|
|
"integrations",
|
|
"zapier"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/integrations/zapier/users": {
|
|
"get": {
|
|
"description": "List users that belong to the caller's organization for use as Zapier trigger samples. Maximum 500 rows.",
|
|
"operationId": "zapier_list_users_api_v1_integrations_zapier_users_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 100,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ZapierUserItem"
|
|
},
|
|
"title": "Response Zapier List Users Api V1 Integrations Zapier Users Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of users in the caller's organization."
|
|
},
|
|
"401": {
|
|
"description": "Missing or invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Organization plan does not include Zapier integration (Pro+ required)"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List users for Zapier",
|
|
"tags": [
|
|
"integrations",
|
|
"zapier"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/internal/domains/verified": {
|
|
"get": {
|
|
"description": "Return every verified custom domain across all organizations. Protected by an internal API key and used by the domain sync CronJob.",
|
|
"operationId": "api_list_all_verified_domains_api_v1_internal_domains_verified_get",
|
|
"parameters": [
|
|
{
|
|
"in": "header",
|
|
"name": "x-internal-key",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "X-Internal-Key",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Response Api List All Verified Domains Api V1 Internal Domains Verified Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of every verified custom domain across organizations."
|
|
},
|
|
"403": {
|
|
"description": "Invalid internal API key"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List all verified custom domains",
|
|
"tags": [
|
|
"custom-domains-internal"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/internal/packs/{org_id}/activate": {
|
|
"post": {
|
|
"description": "Internal endpoint used by the billing platform to activate a pack on an organization after a successful purchase. Requires a valid platform API key.",
|
|
"operationId": "api_activate_pack_api_v1_internal_packs__org_id__activate_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "x-platform-key",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "X-Platform-Key",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivatePackRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrgPackRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Pack activated for the organization."
|
|
},
|
|
"403": {
|
|
"description": "Invalid platform API key"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"500": {
|
|
"description": "LEARNHOUSE_PLATFORM_API_KEY is not configured on the server"
|
|
}
|
|
},
|
|
"summary": "Activate a pack for an organization",
|
|
"tags": [
|
|
"packs-internal"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/internal/packs/{org_id}/deactivate": {
|
|
"delete": {
|
|
"description": "Internal endpoint used by the billing platform to deactivate a single pack tied to a subscription ID. Requires a valid platform API key.",
|
|
"operationId": "api_deactivate_pack_api_v1_internal_packs__org_id__deactivate_delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "x-platform-key",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "X-Platform-Key",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DeactivatePackRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrgPackRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Pack deactivated."
|
|
},
|
|
"403": {
|
|
"description": "Invalid platform API key"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"500": {
|
|
"description": "LEARNHOUSE_PLATFORM_API_KEY is not configured on the server"
|
|
}
|
|
},
|
|
"summary": "Deactivate a pack",
|
|
"tags": [
|
|
"packs-internal"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/internal/packs/{org_id}/deactivate-all": {
|
|
"delete": {
|
|
"description": "Internal endpoint used by the billing platform to deactivate every pack currently attached to the organization. Requires a valid platform API key.",
|
|
"operationId": "api_deactivate_all_packs_api_v1_internal_packs__org_id__deactivate_all_delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "x-platform-key",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "X-Platform-Key",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "All packs deactivated; returns the number of packs affected."
|
|
},
|
|
"403": {
|
|
"description": "Invalid platform API key"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"500": {
|
|
"description": "LEARNHOUSE_PLATFORM_API_KEY is not configured on the server"
|
|
}
|
|
},
|
|
"summary": "Deactivate all packs for an organization",
|
|
"tags": [
|
|
"packs-internal"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/internal/packs/{org_id}/mark-canceling": {
|
|
"patch": {
|
|
"description": "Internal endpoint used by the billing platform to mark a pack as pending cancellation for the given subscription. Requires a valid platform API key.",
|
|
"operationId": "api_mark_pack_canceling_api_v1_internal_packs__org_id__mark_canceling_patch",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "x-platform-key",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "X-Platform-Key",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MarkCancelingRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrgPackRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Pack marked as canceling."
|
|
},
|
|
"403": {
|
|
"description": "Invalid platform API key"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"500": {
|
|
"description": "LEARNHOUSE_PLATFORM_API_KEY is not configured on the server"
|
|
}
|
|
},
|
|
"summary": "Mark a pack as canceling",
|
|
"tags": [
|
|
"packs-internal"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/monitoring/feedback": {
|
|
"post": {
|
|
"description": "Relay user feedback to Sentry from the server so requests aren't dropped by client-side ad/tracker blockers.",
|
|
"operationId": "submit_feedback_api_v1_monitoring_feedback_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_submit_feedback_api_v1_monitoring_feedback_post"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"204": {
|
|
"description": "Feedback accepted and forwarded to Sentry."
|
|
},
|
|
"400": {
|
|
"description": "Empty or invalid feedback payload."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"503": {
|
|
"description": "Sentry is not configured on this instance."
|
|
}
|
|
},
|
|
"summary": "Submit user feedback",
|
|
"tags": [
|
|
"monitoring"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/": {
|
|
"post": {
|
|
"description": "Create a new organization owned by the authenticated user.",
|
|
"operationId": "api_create_org_api_v1_orgs__post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrganizationCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrganizationRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Organization created."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create an organization",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/domains/check": {
|
|
"get": {
|
|
"description": "Returns 200 if `domain` is registered against an organization and has status `verified` or `active`; 404 otherwise. Takes the hostname as a query parameter so the endpoint composes cleanly with reverse proxies that want a lightweight allow/deny gate (e.g. for on-demand TLS provisioning) without needing path rewriting.",
|
|
"operationId": "api_check_domain_api_v1_orgs_domains_check_get",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "domain",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Domain",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Domain is registered and verified."
|
|
},
|
|
"404": {
|
|
"description": "Domain is not registered or not verified."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Check whether a custom domain is registered and verified",
|
|
"tags": [
|
|
"custom-domains"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/join": {
|
|
"post": {
|
|
"description": "Join an existing organization, optionally consuming an invite code.",
|
|
"operationId": "api_join_an_org_api_v1_orgs_join_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/JoinOrg"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Organization joined successfully."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Organization is invite-only or invite is invalid"
|
|
},
|
|
"404": {
|
|
"description": "Organization or invite not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Join an organization",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/resolve/domain/{domain}": {
|
|
"get": {
|
|
"description": "Public endpoint used by the frontend proxy to route custom domain requests to the correct organization. Returns 404 if the domain is not registered or not verified.",
|
|
"operationId": "api_resolve_domain_api_v1_orgs_resolve_domain__domain__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "domain",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Domain",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomDomainResolveResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Organization that owns the requested custom domain."
|
|
},
|
|
"404": {
|
|
"description": "Domain not found or not verified"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Resolve custom domain to organization",
|
|
"tags": [
|
|
"custom-domains"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/slug/{org_slug}": {
|
|
"get": {
|
|
"description": "Fetch a single organization by its URL slug.",
|
|
"operationId": "api_get_org_by_slug_api_v1_orgs_slug__org_slug__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrganizationRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Organization matching the slug."
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get organization by slug",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/user/page/{page}/limit/{limit}": {
|
|
"get": {
|
|
"description": "Return a paginated list of organizations the current user belongs to.",
|
|
"operationId": "api_user_orgs_api_v1_orgs_user_page__page__limit__limit__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "page",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "limit",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/OrganizationRead"
|
|
},
|
|
"title": "Response 200 Api User Orgs Api V1 Orgs User Page Page Limit Limit Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Paginated organizations for the current user."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List organizations for current user",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/user_admin/page/{page}/limit/{limit}": {
|
|
"get": {
|
|
"description": "Return a paginated list of organizations where the current user has admin rights.",
|
|
"operationId": "api_user_orgs_admin_api_v1_orgs_user_admin_page__page__limit__limit__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "page",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "limit",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/OrganizationRead"
|
|
},
|
|
"title": "Response 200 Api User Orgs Admin Api V1 Orgs User Admin Page Page Limit Limit Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Paginated organizations the current user administers."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List organizations the user administers",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/uuid/{org_uuid}": {
|
|
"get": {
|
|
"description": "Fetch a single organization by its UUID.",
|
|
"operationId": "api_get_org_by_uuid_api_v1_orgs_uuid__org_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrganizationRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Organization matching the UUID."
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get organization by UUID",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/withconfig/": {
|
|
"post": {
|
|
"description": "Create a new organization together with its base configuration in a single call (pre-alpha).",
|
|
"operationId": "api_create_org_withconfig_api_v1_orgs_withconfig__post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_org_withconfig_api_v1_orgs_withconfig__post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrganizationRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Organization and configuration created."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create an organization with config",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}": {
|
|
"delete": {
|
|
"description": "Delete an organization by its ID. This action cannot be undone.",
|
|
"operationId": "api_delete_org_api_v1_orgs__org_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Organization deleted."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete an organization",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update an organization's core fields by ID.",
|
|
"operationId": "api_update_org_api_v1_orgs__org_id__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrganizationUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrganizationRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Organization updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update an organization",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/ai-credits": {
|
|
"get": {
|
|
"description": "Return the AI credits summary for an organization, including base, purchased, used, and remaining credits. The caller must be a member of the organization.",
|
|
"operationId": "get_org_ai_credits_api_v1_orgs__org_id__ai_credits_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AICreditsSummary"
|
|
}
|
|
}
|
|
},
|
|
"description": "AI credits summary for the organization."
|
|
},
|
|
"403": {
|
|
"description": "User is not a member of this organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found or credits summary unavailable"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get AI credits summary",
|
|
"tags": [
|
|
"ai-credits"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/ai-credits/add": {
|
|
"post": {
|
|
"description": "Add purchased AI credits to an organization. Only organization admins can add credits and the amount must be a positive integer.",
|
|
"operationId": "add_org_ai_credits_api_v1_orgs__org_id__ai_credits_add_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AddCreditsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AddCreditsResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Credits added and new purchased total returned."
|
|
},
|
|
"400": {
|
|
"description": "Credit amount must be a positive number"
|
|
},
|
|
"403": {
|
|
"description": "Only organization admins can add AI credits"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Add purchased AI credits",
|
|
"tags": [
|
|
"ai-credits"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/ai-credits/reset": {
|
|
"post": {
|
|
"description": "Reset AI credits usage for an organization. Typically used at the start of a new billing period. Only organization admins can reset credits.",
|
|
"operationId": "reset_org_ai_credits_api_v1_orgs__org_id__ai_credits_reset_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResetCreditsResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "AI credits usage reset to zero."
|
|
},
|
|
"403": {
|
|
"description": "Only organization admins can reset AI credits"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Reset AI credits usage",
|
|
"tags": [
|
|
"ai-credits"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/ai-credits/set": {
|
|
"post": {
|
|
"description": "Overwrite the org's purchased AI credit balance to an absolute value. Restricted to superadmins; bypasses the additive /add flow so it can grant, correct, or zero out credits in one call.",
|
|
"operationId": "set_org_ai_credits_api_v1_orgs__org_id__ai_credits_set_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SetCreditsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SetCreditsResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Credits set; returns the new purchased total."
|
|
},
|
|
"400": {
|
|
"description": "Credit amount must be non-negative"
|
|
},
|
|
"403": {
|
|
"description": "Superadmin access required"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Set purchased AI credits (superadmin only)",
|
|
"tags": [
|
|
"ai-credits"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/api-tokens": {
|
|
"get": {
|
|
"description": "List all API tokens for an organization. Returns token metadata including the prefix, but never the full token secret. Requires `roles.action_read` permission.",
|
|
"operationId": "api_list_api_tokens_api_v1_orgs__org_id__api_tokens_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/APITokenRead"
|
|
},
|
|
"title": "Response Api List Api Tokens Api V1 Orgs Org Id Api Tokens Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of API tokens for the organization (metadata only)."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List API tokens",
|
|
"tags": [
|
|
"api-tokens"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Create a new API token for an organization. The full token value is only returned once upon creation \u2014 store it securely, as it cannot be retrieved later. Requires the user to have `roles.action_create` permission in the organization.",
|
|
"operationId": "api_create_api_token_api_v1_orgs__org_id__api_tokens_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/APITokenCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/APITokenCreatedResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Token created; the full secret is included in the response (only time it is returned)."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded for token creation"
|
|
}
|
|
},
|
|
"summary": "Create API token",
|
|
"tags": [
|
|
"api-tokens"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/api-tokens/{token_uuid}": {
|
|
"delete": {
|
|
"description": "Revoke an API token. The token will immediately stop working and this action cannot be undone. Requires `roles.action_delete` permission.",
|
|
"operationId": "api_revoke_api_token_api_v1_orgs__org_id__api_tokens__token_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "token_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Token Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Revoke Api Token Api V1 Orgs Org Id Api Tokens Token Uuid Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Token revoked successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Revoke API token",
|
|
"tags": [
|
|
"api-tokens"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Get details of a specific API token. Returns token metadata, but never the full token secret.",
|
|
"operationId": "api_get_api_token_api_v1_orgs__org_id__api_tokens__token_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "token_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Token Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/APITokenRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "API token metadata."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get API token",
|
|
"tags": [
|
|
"api-tokens"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update an API token's name, description, rights, or expiration. The token secret cannot be changed here \u2014 use the regenerate endpoint for that. Requires `roles.action_update` permission.",
|
|
"operationId": "api_update_api_token_api_v1_orgs__org_id__api_tokens__token_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "token_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Token Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/APITokenUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/APITokenRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Token metadata updated."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update API token",
|
|
"tags": [
|
|
"api-tokens"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/api-tokens/{token_uuid}/regenerate": {
|
|
"post": {
|
|
"description": "Regenerate the secret for an API token. The old token will immediately stop working. The new full token value is only returned once \u2014 store it securely. Requires `roles.action_update` permission.",
|
|
"operationId": "api_regenerate_api_token_api_v1_orgs__org_id__api_tokens__token_uuid__regenerate_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "token_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Token Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/APITokenCreatedResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Token secret regenerated; new full secret is returned."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded for token regeneration"
|
|
}
|
|
},
|
|
"summary": "Regenerate API token secret",
|
|
"tags": [
|
|
"api-tokens"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/auth_background": {
|
|
"put": {
|
|
"description": "Upload the background image shown on the organization's authentication pages.",
|
|
"operationId": "api_upload_org_auth_background_api_v1_orgs__org_id__auth_background_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_upload_org_auth_background_api_v1_orgs__org_id__auth_background_put"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Auth background image uploaded."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload auth page background",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/ai": {
|
|
"put": {
|
|
"description": "Update the organization's AI feature configuration, including the Copilot toggle. Admin only.",
|
|
"operationId": "api_update_org_ai_config_api_v1_orgs__org_id__config_ai_put",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization ID",
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization ID",
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "ai_enabled",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Ai Enabled"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "copilot_enabled",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Copilot Enabled"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "AI configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization AI config",
|
|
"tags": [
|
|
"orgs",
|
|
"Feature Configuration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/auth_branding": {
|
|
"put": {
|
|
"description": "Update branding configuration for the organization's authentication pages.",
|
|
"operationId": "api_update_org_auth_branding_config_api_v1_orgs__org_id__config_auth_branding_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AuthBrandingConfig"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Auth branding configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update auth page branding",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/boards": {
|
|
"put": {
|
|
"description": "Enable or disable the boards feature for the organization. Admin only.",
|
|
"operationId": "api_update_org_boards_config_api_v1_orgs__org_id__config_boards_put",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization ID",
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization ID",
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "boards_enabled",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Boards Enabled",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Boards configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization boards config",
|
|
"tags": [
|
|
"orgs",
|
|
"Feature Configuration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/collections": {
|
|
"put": {
|
|
"description": "Enable or disable the collections feature for the organization. Admin only.",
|
|
"operationId": "api_update_org_collections_config_api_v1_orgs__org_id__config_collections_put",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization ID",
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization ID",
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "collections_enabled",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Collections Enabled",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Collections configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization collections config",
|
|
"tags": [
|
|
"orgs",
|
|
"Feature Configuration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/color": {
|
|
"put": {
|
|
"description": "Update the organization's primary color used for branding.",
|
|
"operationId": "api_update_org_color_config_api_v1_orgs__org_id__config_color_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "color",
|
|
"required": false,
|
|
"schema": {
|
|
"default": "",
|
|
"title": "Color",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Color configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization color",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/communities": {
|
|
"put": {
|
|
"description": "Enable or disable the communities feature for the organization. Admin only.",
|
|
"operationId": "api_update_org_communities_config_api_v1_orgs__org_id__config_communities_put",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization ID",
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization ID",
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "communities_enabled",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Communities Enabled",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Communities configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization communities config",
|
|
"tags": [
|
|
"orgs",
|
|
"Feature Configuration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/courses": {
|
|
"put": {
|
|
"description": "Enable or disable the courses feature for the organization. Admin only.",
|
|
"operationId": "api_update_org_courses_config_api_v1_orgs__org_id__config_courses_put",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization ID",
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization ID",
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "courses_enabled",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Courses Enabled",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Courses configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization courses config",
|
|
"tags": [
|
|
"orgs",
|
|
"Feature Configuration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/default_language": {
|
|
"put": {
|
|
"description": "Update the organization's default language used for the public UI and outgoing emails. Admin only.",
|
|
"operationId": "api_update_org_default_language_config_api_v1_orgs__org_id__config_default_language_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "default_language",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Default Language",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Default language updated."
|
|
},
|
|
"400": {
|
|
"description": "Unsupported language code"
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization default language",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/font": {
|
|
"put": {
|
|
"description": "Update the organization's branding font family.",
|
|
"operationId": "api_update_org_font_config_api_v1_orgs__org_id__config_font_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "font",
|
|
"required": false,
|
|
"schema": {
|
|
"default": "",
|
|
"title": "Font",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Font configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization font",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/footer_text": {
|
|
"put": {
|
|
"description": "Update the organization's footer text used across learner-facing pages.",
|
|
"operationId": "api_update_org_footer_text_config_api_v1_orgs__org_id__config_footer_text_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "footer_text",
|
|
"required": false,
|
|
"schema": {
|
|
"default": "",
|
|
"title": "Footer Text",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Footer text configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization footer text",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/payments": {
|
|
"put": {
|
|
"description": "Enable or disable the payments feature for the organization. Admin only.",
|
|
"operationId": "api_update_org_payments_config_api_v1_orgs__org_id__config_payments_put",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization ID",
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization ID",
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "payments_enabled",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Payments Enabled",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Payments configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization payments config",
|
|
"tags": [
|
|
"orgs",
|
|
"Feature Configuration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/playgrounds": {
|
|
"put": {
|
|
"description": "Enable or disable the playgrounds feature for the organization. Admin only.",
|
|
"operationId": "api_update_org_playgrounds_config_api_v1_orgs__org_id__config_playgrounds_put",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization ID",
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization ID",
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "playgrounds_enabled",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playgrounds Enabled",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Playgrounds configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization playgrounds config",
|
|
"tags": [
|
|
"orgs",
|
|
"Feature Configuration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/podcasts": {
|
|
"put": {
|
|
"description": "Enable or disable the podcasts feature for the organization. Admin only.",
|
|
"operationId": "api_update_org_podcasts_config_api_v1_orgs__org_id__config_podcasts_put",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization ID",
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization ID",
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "podcasts_enabled",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Podcasts Enabled",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Podcasts configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization podcasts config",
|
|
"tags": [
|
|
"orgs",
|
|
"Feature Configuration"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/seo": {
|
|
"put": {
|
|
"description": "Update SEO-related configuration such as titles, descriptions and keywords.",
|
|
"operationId": "api_update_org_seo_config_api_v1_orgs__org_id__config_seo_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SeoOrgConfig"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "SEO configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization SEO config",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/config/watermark": {
|
|
"put": {
|
|
"description": "Enable or disable the watermark. Free plan organizations are not allowed to disable it.",
|
|
"operationId": "api_update_org_watermark_config_api_v1_orgs__org_id__config_watermark_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "watermark_enabled",
|
|
"required": false,
|
|
"schema": {
|
|
"default": true,
|
|
"title": "Watermark Enabled",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Watermark configuration updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an admin or free plan cannot disable the watermark"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization watermark",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/domains": {
|
|
"get": {
|
|
"description": "List all custom domains for an organization, including their verification status.",
|
|
"operationId": "api_list_custom_domains_api_v1_orgs__org_id__domains_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CustomDomainRead"
|
|
},
|
|
"title": "Response 200 Api List Custom Domains Api V1 Orgs Org Id Domains Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of custom domains for the organization."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not a member of the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List custom domains",
|
|
"tags": [
|
|
"custom-domains"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Add a new custom domain to an organization. This generates a verification token and returns DNS instructions. Only organization administrators can add custom domains.",
|
|
"operationId": "api_add_custom_domain_api_v1_orgs__org_id__domains_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomDomainCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomDomainRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Custom domain registered with DNS verification instructions."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Add a custom domain",
|
|
"tags": [
|
|
"custom-domains"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/domains/{domain_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a custom domain. This action cannot be undone. Only organization administrators can delete custom domains.",
|
|
"operationId": "api_delete_custom_domain_api_v1_orgs__org_id__domains__domain_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "domain_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Domain Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Delete Custom Domain Api V1 Orgs Org Id Domains Domain Uuid Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Custom domain deleted."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization or custom domain not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a custom domain",
|
|
"tags": [
|
|
"custom-domains"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Get details of a single custom domain by its UUID, including verification status.",
|
|
"operationId": "api_get_custom_domain_api_v1_orgs__org_id__domains__domain_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "domain_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Domain Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomDomainRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Custom domain details."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not a member of the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization or custom domain not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get a custom domain",
|
|
"tags": [
|
|
"custom-domains"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/domains/{domain_uuid}/ssl-status": {
|
|
"get": {
|
|
"description": "Check the SSL certificate status for a custom domain by performing a TLS handshake to determine whether a certificate has been provisioned.",
|
|
"operationId": "api_check_domain_ssl_status_api_v1_orgs__org_id__domains__domain_uuid__ssl_status_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "domain_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Domain Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Check Domain Ssl Status Api V1 Orgs Org Id Domains Domain Uuid Ssl Status Get",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "SSL certificate status for the custom domain."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not a member of the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization or custom domain not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Check custom domain SSL status",
|
|
"tags": [
|
|
"custom-domains"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/domains/{domain_uuid}/verification-info": {
|
|
"get": {
|
|
"description": "Return the DNS records (TXT and CNAME) that must be configured at the domain provider in order to verify the custom domain.",
|
|
"operationId": "api_get_domain_verification_info_api_v1_orgs__org_id__domains__domain_uuid__verification_info_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "domain_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Domain Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomDomainVerificationInfo"
|
|
}
|
|
}
|
|
},
|
|
"description": "DNS verification instructions for the custom domain."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not a member of the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization or custom domain not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get DNS verification info",
|
|
"tags": [
|
|
"custom-domains"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/domains/{domain_uuid}/verify": {
|
|
"post": {
|
|
"description": "Verify the DNS configuration for a custom domain by checking that the expected TXT verification record is in place. Only organization administrators can verify domains.",
|
|
"operationId": "api_verify_custom_domain_api_v1_orgs__org_id__domains__domain_uuid__verify_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "domain_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Domain Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Verify Custom Domain Api V1 Orgs Org Id Domains Domain Uuid Verify Post",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "DNS verification result for the custom domain."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization or custom domain not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Verify custom domain DNS",
|
|
"tags": [
|
|
"custom-domains"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/favicon": {
|
|
"put": {
|
|
"description": "Upload a new favicon image for the organization.",
|
|
"operationId": "api_update_org_favicon_api_v1_orgs__org_id__favicon_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_org_favicon_api_v1_orgs__org_id__favicon_put"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Favicon updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization favicon",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/invites": {
|
|
"get": {
|
|
"description": "List all invite codes for the organization.",
|
|
"operationId": "api_get_invite_codes_api_v1_orgs__org_id__invites_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "List of invite codes for the organization."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List invite codes",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Create a new invite code for the organization, optionally linked to a usergroup.",
|
|
"operationId": "api_create_invite_code_api_v1_orgs__org_id__invites_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "usergroup_id",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Usergroup Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Invite code created."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization or usergroup not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create an invite code",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/invites/code/{invite_code}": {
|
|
"get": {
|
|
"description": "Fetch details for a single invite code.",
|
|
"operationId": "api_get_invite_code_api_v1_orgs__org_id__invites_code__invite_code__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "invite_code",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Invite Code",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Invite code details."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Invite code not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get an invite code",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/invites/users": {
|
|
"get": {
|
|
"description": "List users who have been invited to the organization but have not joined yet.",
|
|
"operationId": "api_get_org_users_invites_api_v1_orgs__org_id__invites_users_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "List of invited users."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List invited users",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/invites/users/batch": {
|
|
"post": {
|
|
"description": "Invite multiple users by email in a single request, optionally using a specific invite code.",
|
|
"operationId": "api_invite_batch_users_api_v1_orgs__org_id__invites_users_batch_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "emails",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Emails",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "invite_code_uuid",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Invite Code Uuid"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Invitations queued for the supplied emails."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization or invite code not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Invite a batch of users",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/invites/users/{email}": {
|
|
"delete": {
|
|
"description": "Revoke a pending invitation for the user identified by email.",
|
|
"operationId": "api_delete_org_users_invites_api_v1_orgs__org_id__invites_users__email__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "email",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Email",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Invitation revoked."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Invitation not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Revoke an invited user",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/invites/{org_invite_code_uuid}": {
|
|
"delete": {
|
|
"description": "Delete an invite code by its UUID.",
|
|
"operationId": "api_delete_invite_code_api_v1_orgs__org_id__invites__org_invite_code_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "org_invite_code_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Invite Code Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Invite code deleted."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Invite code not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete an invite code",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/landing": {
|
|
"put": {
|
|
"description": "Update the organization's landing page content object.",
|
|
"operationId": "api_update_org_landing_api_v1_orgs__org_id__landing_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Landing Object",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Landing page updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization landing page",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/landing/content": {
|
|
"post": {
|
|
"description": "Upload a content asset (image or file) to attach to the organization's landing page.",
|
|
"operationId": "api_upload_org_landing_content_api_v1_orgs__org_id__landing_content_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_upload_org_landing_content_api_v1_orgs__org_id__landing_content_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Landing page content uploaded."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload landing page content",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/logo": {
|
|
"put": {
|
|
"description": "Upload a new logo image for the organization.",
|
|
"operationId": "api_update_org_logo_api_v1_orgs__org_id__logo_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_org_logo_api_v1_orgs__org_id__logo_put"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Logo updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization logo",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/og_image": {
|
|
"put": {
|
|
"description": "Upload the OpenGraph image used for social media sharing previews.",
|
|
"operationId": "api_upload_org_og_image_api_v1_orgs__org_id__og_image_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_upload_org_og_image_api_v1_orgs__org_id__og_image_put"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "OG image uploaded."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload OG image",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/packs": {
|
|
"get": {
|
|
"description": "Return the organization's active packs along with the full catalog of available packs. Only organization admins can view packs.",
|
|
"operationId": "api_get_org_packs_api_v1_orgs__org_id__packs_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrgPacksResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Active packs and available pack catalog."
|
|
},
|
|
"403": {
|
|
"description": "Only organization admins can view packs"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List active and available packs",
|
|
"tags": [
|
|
"packs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/packs/summary": {
|
|
"get": {
|
|
"description": "Return aggregated totals from the organization's active packs (AI credits, member seats, and active pack count). Only organization admins can view the summary.",
|
|
"operationId": "api_get_org_pack_summary_api_v1_orgs__org_id__packs_summary_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PackSummaryResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Aggregated pack totals for the organization."
|
|
},
|
|
"403": {
|
|
"description": "Only organization admins can view pack summary"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get pack totals summary",
|
|
"tags": [
|
|
"packs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/preview": {
|
|
"put": {
|
|
"description": "Upload a new preview image used on the organization's landing page.",
|
|
"operationId": "api_update_org_preview_api_v1_orgs__org_id__preview_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_org_preview_api_v1_orgs__org_id__preview_put"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Preview image updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization preview image",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/signup_mechanism": {
|
|
"put": {
|
|
"description": "Change whether the organization allows open signup or requires an invite code.",
|
|
"operationId": "api_get_org_signup_mechanism_api_v1_orgs__org_id__signup_mechanism_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "signup_mechanism",
|
|
"required": true,
|
|
"schema": {
|
|
"enum": [
|
|
"open",
|
|
"inviteOnly"
|
|
],
|
|
"title": "Signup Mechanism",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Signup mechanism updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization signup mechanism",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/thumbnail": {
|
|
"put": {
|
|
"description": "Upload a new thumbnail image for the organization.",
|
|
"operationId": "api_update_org_thumbnail_api_v1_orgs__org_id__thumbnail_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_org_thumbnail_api_v1_orgs__org_id__thumbnail_put"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Thumbnail updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not an organization administrator"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update organization thumbnail",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/usage": {
|
|
"get": {
|
|
"description": "Return current usage, plan limits, and remaining quota for the organization's plan-based features.",
|
|
"operationId": "api_get_org_usage_api_v1_orgs__org_id__usage_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Usage, limits, and remaining quota for the organization."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not a member of the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get organization usage and limits",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/users": {
|
|
"get": {
|
|
"description": "List organization users with pagination, search and filters. Requires authentication; anonymous access is rejected. The limit is capped at 100 to prevent data dumping.",
|
|
"operationId": "api_get_org_users_api_v1_orgs__org_id__users_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"description": "Page number",
|
|
"in": "query",
|
|
"name": "page",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"description": "Items per page (max 100)",
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 20,
|
|
"description": "Items per page (max 100)",
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "search",
|
|
"required": false,
|
|
"schema": {
|
|
"default": "",
|
|
"title": "Search",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Filter by usergroup membership",
|
|
"in": "query",
|
|
"name": "usergroup_id",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Filter by usergroup membership",
|
|
"title": "Usergroup Id"
|
|
}
|
|
},
|
|
{
|
|
"description": "Membership filter: 'in_group' or 'not_in_group'",
|
|
"in": "query",
|
|
"name": "usergroup_filter",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"in_group",
|
|
"not_in_group"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Membership filter: 'in_group' or 'not_in_group'",
|
|
"title": "Usergroup Filter"
|
|
}
|
|
},
|
|
{
|
|
"description": "Sort order for join date",
|
|
"in": "query",
|
|
"name": "sort_order",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"asc",
|
|
"desc"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "desc",
|
|
"description": "Sort order for join date",
|
|
"title": "Sort Order"
|
|
}
|
|
},
|
|
{
|
|
"description": "Filter by role ID",
|
|
"in": "query",
|
|
"name": "role_id",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Filter by role ID",
|
|
"title": "Role Id"
|
|
}
|
|
},
|
|
{
|
|
"description": "Filter by verification status",
|
|
"in": "query",
|
|
"name": "status",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"verified",
|
|
"unverified"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Filter by verification status",
|
|
"title": "Status"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Paginated list of organization users."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not a member of the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List organization users",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/users/batch/remove": {
|
|
"delete": {
|
|
"description": "Remove a batch of users from the organization in a single call.",
|
|
"operationId": "api_remove_batch_users_from_org_api_v1_orgs__org_id__users_batch_remove_delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"description": "List of user IDs to remove",
|
|
"in": "query",
|
|
"name": "user_ids",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "List of user IDs to remove",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"title": "User Ids",
|
|
"type": "array"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Users removed from the organization."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to remove users"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove multiple users from organization",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/users/export": {
|
|
"get": {
|
|
"description": "Export organization users as a CSV file. Supports the same filters as the users listing endpoint. Requires authentication; anonymous access is rejected.",
|
|
"operationId": "api_export_org_users_api_v1_orgs__org_id__users_export_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "search",
|
|
"required": false,
|
|
"schema": {
|
|
"default": "",
|
|
"title": "Search",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "usergroup_id",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Usergroup Id"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "usergroup_filter",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"in_group",
|
|
"not_in_group"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Usergroup Filter"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "sort_order",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"asc",
|
|
"desc"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "desc",
|
|
"title": "Sort Order"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "role_id",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Role Id"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "status",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"verified",
|
|
"unverified"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Status"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "CSV file of organization users matching the filters."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller is not a member of the organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Export organization users as CSV",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/users/{user_id}": {
|
|
"delete": {
|
|
"description": "Remove a single user from the organization.",
|
|
"operationId": "api_remove_user_from_org_api_v1_orgs__org_id__users__user_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "User removed from the organization."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to remove users"
|
|
},
|
|
"404": {
|
|
"description": "Organization or user not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove a user from organization",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/users/{user_id}/role/{role_uuid}": {
|
|
"put": {
|
|
"description": "Update the role of a user within an organization by role UUID.",
|
|
"operationId": "api_update_user_role_api_v1_orgs__org_id__users__user_id__role__role_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "role_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Role Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "User role updated."
|
|
},
|
|
"401": {
|
|
"description": "Not authenticated"
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to change roles"
|
|
},
|
|
"404": {
|
|
"description": "Organization, user, or role not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update user role in organization",
|
|
"tags": [
|
|
"orgs"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/webhooks": {
|
|
"get": {
|
|
"description": "Returns all webhook endpoints configured for the given organization.",
|
|
"operationId": "api_list_webhook_endpoints_api_v1_orgs__org_id__webhooks_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/WebhookEndpointRead"
|
|
},
|
|
"title": "Response 200 Api List Webhook Endpoints Api V1 Orgs Org Id Webhooks Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of webhook endpoints"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view webhooks for this organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List webhook endpoints",
|
|
"tags": [
|
|
"webhooks"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Creates a new webhook endpoint for the organization. The signing secret is only returned once upon creation and cannot be retrieved later; store it securely.",
|
|
"operationId": "api_create_webhook_endpoint_api_v1_orgs__org_id__webhooks_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhookEndpointCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhookEndpointCreatedResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Webhook endpoint created; signing secret included"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to manage webhooks for this organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create a webhook endpoint",
|
|
"tags": [
|
|
"webhooks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/webhooks/events": {
|
|
"get": {
|
|
"description": "Returns the catalogue of webhook event types supported by LearnHouse along with their descriptions.",
|
|
"operationId": "api_list_webhook_events_api_v1_orgs__org_id__webhooks_events_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api List Webhook Events Api V1 Orgs Org Id Webhooks Events Get",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dictionary of event types and their descriptions"
|
|
}
|
|
},
|
|
"summary": "List available webhook event types",
|
|
"tags": [
|
|
"webhooks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/webhooks/{webhook_uuid}": {
|
|
"delete": {
|
|
"description": "Deletes a webhook endpoint along with all of its delivery logs.",
|
|
"operationId": "api_delete_webhook_endpoint_api_v1_orgs__org_id__webhooks__webhook_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "webhook_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Webhook Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Delete Webhook Endpoint Api V1 Orgs Org Id Webhooks Webhook Uuid Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Webhook endpoint deleted"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this webhook"
|
|
},
|
|
"404": {
|
|
"description": "Webhook endpoint not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a webhook endpoint",
|
|
"tags": [
|
|
"webhooks"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Returns details of a specific webhook endpoint by its UUID.",
|
|
"operationId": "api_get_webhook_endpoint_api_v1_orgs__org_id__webhooks__webhook_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "webhook_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Webhook Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhookEndpointRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Webhook endpoint details"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this webhook"
|
|
},
|
|
"404": {
|
|
"description": "Webhook endpoint not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get a webhook endpoint",
|
|
"tags": [
|
|
"webhooks"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Updates mutable fields of a webhook endpoint (URL, subscribed events, active flag).",
|
|
"operationId": "api_update_webhook_endpoint_api_v1_orgs__org_id__webhooks__webhook_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "webhook_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Webhook Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhookEndpointUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhookEndpointRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Webhook endpoint updated"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to modify this webhook"
|
|
},
|
|
"404": {
|
|
"description": "Webhook endpoint not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a webhook endpoint",
|
|
"tags": [
|
|
"webhooks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/webhooks/{webhook_uuid}/deliveries": {
|
|
"get": {
|
|
"description": "Returns recent webhook delivery attempts and their outcomes for the specified endpoint, up to the requested limit.",
|
|
"operationId": "api_get_webhook_deliveries_api_v1_orgs__org_id__webhooks__webhook_uuid__deliveries_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "webhook_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Webhook Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 50,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/WebhookDeliveryLogRead"
|
|
},
|
|
"title": "Response 200 Api Get Webhook Deliveries Api V1 Orgs Org Id Webhooks Webhook Uuid Deliveries Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of webhook delivery log entries"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this webhook"
|
|
},
|
|
"404": {
|
|
"description": "Webhook endpoint not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List webhook delivery logs",
|
|
"tags": [
|
|
"webhooks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/webhooks/{webhook_uuid}/regenerate-secret": {
|
|
"post": {
|
|
"description": "Regenerates the signing secret for a webhook endpoint. The new secret is only returned once and must be stored securely.",
|
|
"operationId": "api_regenerate_webhook_secret_api_v1_orgs__org_id__webhooks__webhook_uuid__regenerate_secret_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "webhook_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Webhook Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhookEndpointCreatedResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Webhook signing secret regenerated"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to manage this webhook"
|
|
},
|
|
"404": {
|
|
"description": "Webhook endpoint not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Regenerate a webhook signing secret",
|
|
"tags": [
|
|
"webhooks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orgs/{org_id}/webhooks/{webhook_uuid}/test": {
|
|
"post": {
|
|
"description": "Sends a synthetic 'ping' event to the webhook endpoint to verify it is reachable and correctly configured.",
|
|
"operationId": "api_send_test_event_api_v1_orgs__org_id__webhooks__webhook_uuid__test_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "webhook_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Webhook Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Send Test Event Api V1 Orgs Org Id Webhooks Webhook Uuid Test Post",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Test event delivered (or attempted) successfully"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to manage this webhook"
|
|
},
|
|
"404": {
|
|
"description": "Webhook endpoint not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Send a test webhook event",
|
|
"tags": [
|
|
"webhooks"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/plans": {
|
|
"get": {
|
|
"description": "Public endpoint that returns the feature limits (courses, members, admin seats, AI credits) for every available plan. Used by the frontend to render pricing pages and plan comparison tables.",
|
|
"operationId": "api_get_plan_limits_api_v1_plans_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Mapping of plan id to feature limits"
|
|
}
|
|
},
|
|
"summary": "Get plan feature limits",
|
|
"tags": [
|
|
"plans"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/": {
|
|
"post": {
|
|
"description": "Create a new playground within an organization. The authenticated user must have permission to create playgrounds in the target org.",
|
|
"operationId": "api_create_playground_api_v1_playgrounds__post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlaygroundCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlaygroundRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Playground created successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to create playgrounds"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create a playground",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/generate/iterate": {
|
|
"post": {
|
|
"description": "Continue an existing Playground session with a new message, streaming the updated output. Deducts AI credits and enforces the session's iteration limit.",
|
|
"operationId": "iterate_playground_session_api_v1_playgrounds_generate_iterate_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendPlaygroundMessage"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "Server-sent events stream of generated playground content."
|
|
},
|
|
"400": {
|
|
"description": "Maximum iterations reached or playground UUID mismatch"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Session, playground, or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Iterate on a playground generation session",
|
|
"tags": [
|
|
"playgrounds",
|
|
"playgrounds-generator"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/generate/session/{session_uuid}": {
|
|
"get": {
|
|
"description": "Retrieve the current state of a Playground generation session, including iteration count, current HTML, and message history.",
|
|
"operationId": "get_session_state_api_v1_playgrounds_generate_session__session_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "session_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Session Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlaygroundSessionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Current state of the playground generation session."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Session not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get playground generation session state",
|
|
"tags": [
|
|
"playgrounds",
|
|
"playgrounds-generator"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/generate/start": {
|
|
"post": {
|
|
"description": "Start a new Playground AI generation session with a server-sent events stream. Deducts AI credits and requires update permission on the target playground.",
|
|
"operationId": "start_playground_session_api_v1_playgrounds_generate_start_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StartPlaygroundSession"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
},
|
|
"text/event-stream": {}
|
|
},
|
|
"description": "Server-sent events stream of generated playground content."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to generate content"
|
|
},
|
|
"404": {
|
|
"description": "Playground or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Start a playground generation session",
|
|
"tags": [
|
|
"playgrounds",
|
|
"playgrounds-generator"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/org/{org_id}": {
|
|
"get": {
|
|
"description": "List all playgrounds in the given organization that the current user is allowed to see.",
|
|
"operationId": "api_list_org_playgrounds_api_v1_playgrounds_org__org_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PlaygroundRead"
|
|
},
|
|
"title": "Response 200 Api List Org Playgrounds Api V1 Playgrounds Org Org Id Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of playgrounds accessible to the current user."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Access denied to this organization"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List playgrounds for an organization",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/{playground_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a playground by UUID. The current user must have delete permission on the playground.",
|
|
"operationId": "api_delete_playground_api_v1_playgrounds__playground_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "playground_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Delete Playground Api V1 Playgrounds Playground Uuid Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Playground deleted successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to delete playground"
|
|
},
|
|
"404": {
|
|
"description": "Playground not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a playground",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Retrieve a single playground by its UUID. The current user must have access to the playground.",
|
|
"operationId": "api_get_playground_api_v1_playgrounds__playground_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "playground_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlaygroundRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "The requested playground."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Access denied to this playground"
|
|
},
|
|
"404": {
|
|
"description": "Playground not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get a playground by UUID",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update a playground's fields. The current user must have update permission on the playground.",
|
|
"operationId": "api_update_playground_api_v1_playgrounds__playground_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "playground_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlaygroundUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlaygroundRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Playground updated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to update playground"
|
|
},
|
|
"404": {
|
|
"description": "Playground not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a playground",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/{playground_uuid}/duplicate": {
|
|
"post": {
|
|
"description": "Create a copy of an existing playground. The current user must have permission to create playgrounds in the source org.",
|
|
"operationId": "api_duplicate_playground_api_v1_playgrounds__playground_uuid__duplicate_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "playground_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlaygroundRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Playground duplicated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to create playgrounds"
|
|
},
|
|
"404": {
|
|
"description": "Playground not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Duplicate a playground",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/{playground_uuid}/reactions": {
|
|
"get": {
|
|
"description": "Return reaction counts and the current user's reactions for a playground. Supports anonymous viewers.",
|
|
"operationId": "api_get_playground_reactions_api_v1_playgrounds__playground_uuid__reactions_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "playground_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PlaygroundReactionSummary"
|
|
},
|
|
"title": "Response 200 Api Get Playground Reactions Api V1 Playgrounds Playground Uuid Reactions Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Aggregated reaction summary for the playground."
|
|
},
|
|
"404": {
|
|
"description": "Playground not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List reactions on a playground",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Toggle the current user's reaction (emoji) on a playground. Adds the reaction if missing or removes it if already present.",
|
|
"operationId": "api_toggle_playground_reaction_api_v1_playgrounds__playground_uuid__reactions_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "playground_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Reaction",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Toggle Playground Reaction Api V1 Playgrounds Playground Uuid Reactions Post",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Reaction toggled successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Playground not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Toggle a reaction on a playground",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/{playground_uuid}/thumbnail": {
|
|
"post": {
|
|
"description": "Upload or replace the thumbnail image for a playground. The current user must have update permission on the playground.",
|
|
"operationId": "api_update_playground_thumbnail_api_v1_playgrounds__playground_uuid__thumbnail_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "playground_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_playground_thumbnail_api_v1_playgrounds__playground_uuid__thumbnail_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlaygroundRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Thumbnail uploaded and playground updated."
|
|
},
|
|
"400": {
|
|
"description": "No thumbnail file provided"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to update playground"
|
|
},
|
|
"404": {
|
|
"description": "Playground or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload a playground thumbnail",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/{playground_uuid}/usergroups": {
|
|
"get": {
|
|
"description": "Return the list of usergroups that have access to a given playground.",
|
|
"operationId": "api_get_playground_usergroups_api_v1_playgrounds__playground_uuid__usergroups_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "playground_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Response Api Get Playground Usergroups Api V1 Playgrounds Playground Uuid Usergroups Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of usergroups associated with the playground."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Access denied to this playground"
|
|
},
|
|
"404": {
|
|
"description": "Playground not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List usergroups attached to a playground",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/playgrounds/{playground_uuid}/usergroups/{usergroup_uuid}": {
|
|
"delete": {
|
|
"description": "Remove a usergroup's access to a playground. The current user must have update permission on the playground.",
|
|
"operationId": "api_remove_usergroup_from_playground_api_v1_playgrounds__playground_uuid__usergroups__usergroup_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "playground_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Remove Usergroup From Playground Api V1 Playgrounds Playground Uuid Usergroups Usergroup Uuid Delete",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Usergroup removed from playground."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Playground, user group, or association not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Revoke a usergroup from a playground",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Associate a usergroup with a playground so its members can access it. The current user must have update permission on the playground.",
|
|
"operationId": "api_add_usergroup_to_playground_api_v1_playgrounds__playground_uuid__usergroups__usergroup_uuid__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "playground_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Playground Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"title": "Response Api Add Usergroup To Playground Api V1 Playgrounds Playground Uuid Usergroups Usergroup Uuid Post",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Usergroup granted access to playground."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Playground or user group not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Grant a usergroup access to a playground",
|
|
"tags": [
|
|
"playgrounds"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/": {
|
|
"post": {
|
|
"description": "Create a new podcast within an organization. Accepts multipart form data with optional thumbnail upload.",
|
|
"operationId": "api_create_podcast_api_v1_podcasts__post",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_podcast_api_v1_podcasts__post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Podcast created successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create podcasts in this organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create a podcast",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/episodes/{episode_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a podcast episode and its associated files. This operation cannot be undone.",
|
|
"operationId": "api_delete_episode_api_v1_podcasts_episodes__episode_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "episode_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Episode Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Episode deleted successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this episode"
|
|
},
|
|
"404": {
|
|
"description": "Episode not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a podcast episode",
|
|
"tags": [
|
|
"podcasts",
|
|
"episodes"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Fetch a podcast episode by its UUID.",
|
|
"operationId": "api_get_episode_api_v1_podcasts_episodes__episode_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "episode_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Episode Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastEpisodeRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Episode details."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to read this episode"
|
|
},
|
|
"404": {
|
|
"description": "Episode not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get a podcast episode",
|
|
"tags": [
|
|
"podcasts",
|
|
"episodes"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update an episode's metadata. The caller must have write access to the parent podcast.",
|
|
"operationId": "api_update_episode_api_v1_podcasts_episodes__episode_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "episode_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Episode Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastEpisodeUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastEpisodeRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Episode updated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update this episode"
|
|
},
|
|
"404": {
|
|
"description": "Episode not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a podcast episode",
|
|
"tags": [
|
|
"podcasts",
|
|
"episodes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/episodes/{episode_uuid}/audio": {
|
|
"put": {
|
|
"description": "Upload or replace the audio file for a podcast episode.",
|
|
"operationId": "api_upload_episode_audio_api_v1_podcasts_episodes__episode_uuid__audio_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "episode_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Episode Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_upload_episode_audio_api_v1_podcasts_episodes__episode_uuid__audio_put"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastEpisodeRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Audio uploaded and episode updated."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update this episode"
|
|
},
|
|
"404": {
|
|
"description": "Episode not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload episode audio",
|
|
"tags": [
|
|
"podcasts",
|
|
"episodes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/episodes/{episode_uuid}/thumbnail": {
|
|
"put": {
|
|
"description": "Upload or replace the thumbnail image for a podcast episode.",
|
|
"operationId": "api_upload_episode_thumbnail_api_v1_podcasts_episodes__episode_uuid__thumbnail_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "episode_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Episode Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_upload_episode_thumbnail_api_v1_podcasts_episodes__episode_uuid__thumbnail_put"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastEpisodeRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Thumbnail uploaded and episode updated."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update this episode"
|
|
},
|
|
"404": {
|
|
"description": "Episode not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Upload episode thumbnail",
|
|
"tags": [
|
|
"podcasts",
|
|
"episodes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/org_slug/{org_slug}/count": {
|
|
"get": {
|
|
"description": "Return the total number of podcasts belonging to an organization.",
|
|
"operationId": "api_get_podcasts_count_orgslug_api_v1_podcasts_org_slug__org_slug__count_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Object with the total podcast count."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to list podcasts in this organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Count podcasts for an organization",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/org_slug/{org_slug}/page/{page}/limit/{limit}": {
|
|
"get": {
|
|
"description": "Return a paginated list of podcasts belonging to an organization, with episode counts. Set `include_unpublished=true` to include unpublished podcasts (requires appropriate permissions).",
|
|
"operationId": "api_get_podcasts_orgslug_api_v1_podcasts_org_slug__org_slug__page__page__limit__limit__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "page",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "limit",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "include_unpublished",
|
|
"required": false,
|
|
"schema": {
|
|
"default": false,
|
|
"title": "Include Unpublished",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PodcastReadWithEpisodeCount"
|
|
},
|
|
"title": "Response 200 Api Get Podcasts Orgslug Api V1 Podcasts Org Slug Org Slug Page Page Limit Limit Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Paginated list of podcasts with episode counts."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to list podcasts in this organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List podcasts for an organization",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/{podcast_uuid}": {
|
|
"delete": {
|
|
"description": "Delete a podcast and its associated episodes. This operation cannot be undone.",
|
|
"operationId": "api_delete_podcast_api_v1_podcasts__podcast_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Podcast deleted successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this podcast"
|
|
},
|
|
"404": {
|
|
"description": "Podcast not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a podcast",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Fetch a podcast by its UUID. The caller must have read access to the podcast.",
|
|
"operationId": "api_get_podcast_api_v1_podcasts__podcast_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Podcast details."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to read this podcast"
|
|
},
|
|
"404": {
|
|
"description": "Podcast not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get a podcast",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update a podcast's metadata. The caller must have write access to the podcast.",
|
|
"operationId": "api_update_podcast_api_v1_podcasts__podcast_uuid__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Podcast updated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update this podcast"
|
|
},
|
|
"404": {
|
|
"description": "Podcast not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a podcast",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/{podcast_uuid}/episodes": {
|
|
"get": {
|
|
"description": "Return all episodes for a podcast. Set `include_unpublished=true` to include unpublished episodes (requires appropriate permissions).",
|
|
"operationId": "api_get_podcast_episodes_api_v1_podcasts__podcast_uuid__episodes_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "include_unpublished",
|
|
"required": false,
|
|
"schema": {
|
|
"default": false,
|
|
"title": "Include Unpublished",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PodcastEpisodeRead"
|
|
},
|
|
"title": "Response 200 Api Get Podcast Episodes Api V1 Podcasts Podcast Uuid Episodes Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of episodes for the podcast."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to read this podcast"
|
|
},
|
|
"404": {
|
|
"description": "Podcast not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List podcast episodes",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Create a new episode for a podcast. Accepts multipart form data with optional audio file and thumbnail upload.",
|
|
"operationId": "api_create_episode_api_v1_podcasts__podcast_uuid__episodes_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_create_episode_api_v1_podcasts__podcast_uuid__episodes_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastEpisodeRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Episode created successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create episodes in this podcast"
|
|
},
|
|
"404": {
|
|
"description": "Podcast not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create a podcast episode",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/{podcast_uuid}/episodes/reorder": {
|
|
"put": {
|
|
"description": "Reorder the episodes of a podcast by providing a list of episode ordering objects.",
|
|
"operationId": "api_reorder_episodes_api_v1_podcasts__podcast_uuid__episodes_reorder_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"title": "Episode Orders",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Episodes reordered successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to reorder episodes in this podcast"
|
|
},
|
|
"404": {
|
|
"description": "Podcast not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Reorder podcast episodes",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/{podcast_uuid}/meta": {
|
|
"get": {
|
|
"description": "Fetch a podcast along with its episodes and related metadata.",
|
|
"operationId": "api_get_podcast_meta_api_v1_podcasts__podcast_uuid__meta_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Podcast metadata with episodes."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to read this podcast"
|
|
},
|
|
"404": {
|
|
"description": "Podcast not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get podcast metadata",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/{podcast_uuid}/rights": {
|
|
"get": {
|
|
"description": "Return the current user's rights (read, update, delete) on a given podcast.",
|
|
"operationId": "api_get_podcast_rights_api_v1_podcasts__podcast_uuid__rights_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "User rights for the podcast."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Podcast not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get podcast user rights",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/podcasts/{podcast_uuid}/thumbnail": {
|
|
"put": {
|
|
"description": "Upload or replace the thumbnail image for a podcast.",
|
|
"operationId": "api_update_podcast_thumbnail_api_v1_podcasts__podcast_uuid__thumbnail_put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_podcast_thumbnail_api_v1_podcasts__podcast_uuid__thumbnail_put"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PodcastRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Thumbnail uploaded and podcast updated."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update this podcast"
|
|
},
|
|
"404": {
|
|
"description": "Podcast not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update podcast thumbnail",
|
|
"tags": [
|
|
"podcasts"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/roles/org/{org_id}": {
|
|
"get": {
|
|
"description": "Get all roles for a specific organization, including global roles available to every org.",
|
|
"operationId": "api_get_roles_by_organization_api_v1_roles_org__org_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RoleRead"
|
|
},
|
|
"title": "Response Api Get Roles By Organization Api V1 Roles Org Org Id Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "List of roles (custom + global) available to the organization."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List roles for organization",
|
|
"tags": [
|
|
"roles"
|
|
]
|
|
},
|
|
"post": {
|
|
"description": "Create a new role for a specific organization. Requires the Pro plan feature flag.",
|
|
"operationId": "api_create_role_api_v1_roles_org__org_id__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RoleCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RoleRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Role created successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "Plan does not permit creating roles, or caller lacks permission"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create role",
|
|
"tags": [
|
|
"roles"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/roles/{role_id}": {
|
|
"delete": {
|
|
"description": "Delete a role by its role_id. Deletion is permanent.",
|
|
"operationId": "api_delete_role_api_v1_roles__role_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "role_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Role Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Role deleted successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete role",
|
|
"tags": [
|
|
"roles"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Get a single role by its role_id.",
|
|
"operationId": "api_get_role_api_v1_roles__role_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "role_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Role Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RoleRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Role details."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get role",
|
|
"tags": [
|
|
"roles"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update a role by its role_id. The role_id path parameter must be numeric.",
|
|
"operationId": "api_update_role_api_v1_roles__role_id__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "role_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Role Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RoleUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RoleRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Role updated successfully."
|
|
},
|
|
"400": {
|
|
"description": "Invalid role ID format (must be numeric)"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update role",
|
|
"tags": [
|
|
"roles"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/search/org_slug/{org_slug}": {
|
|
"get": {
|
|
"description": "Performs a paginated search across courses, collections, and users within the given organization. Query length and page size are capped to prevent data dumping. Requires authentication.",
|
|
"operationId": "api_search_across_org_api_v1_search_org_slug__org_slug__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Slug",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Search query",
|
|
"in": "query",
|
|
"name": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Search query",
|
|
"maxLength": 200,
|
|
"minLength": 3,
|
|
"title": "Query",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Page number",
|
|
"in": "query",
|
|
"name": "page",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"description": "Items per page (max 50)",
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 10,
|
|
"description": "Items per page (max 50)",
|
|
"maximum": 50,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SearchResult"
|
|
}
|
|
}
|
|
},
|
|
"description": "Search results grouped by resource type"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to search this organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Search within an organization",
|
|
"tags": [
|
|
"search"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/stream/audio/{org_uuid}/{podcast_uuid}/{episode_uuid}/{filename}": {
|
|
"get": {
|
|
"description": "Streams a podcast episode audio file with HTTP Range request support. Validates user read access to the podcast via RBAC before serving the file.",
|
|
"operationId": "stream_podcast_audio_api_v1_stream_audio__org_uuid___podcast_uuid___episode_uuid___filename__get",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization UUID",
|
|
"in": "path",
|
|
"name": "org_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization UUID",
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Podcast UUID",
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Podcast UUID",
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Episode UUID",
|
|
"in": "path",
|
|
"name": "episode_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Episode UUID",
|
|
"title": "Episode Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Audio filename",
|
|
"in": "path",
|
|
"name": "filename",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Audio filename",
|
|
"title": "Filename",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Full audio streamed successfully"
|
|
},
|
|
"206": {
|
|
"description": "Partial audio content returned for a Range request"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to read this podcast"
|
|
},
|
|
"404": {
|
|
"description": "Podcast, episode, or audio file not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Stream a podcast episode audio",
|
|
"tags": [
|
|
"stream"
|
|
]
|
|
},
|
|
"head": {
|
|
"description": "Returns metadata for a podcast episode audio file without the body. Used by audio players to probe file size and Range support before playback.",
|
|
"operationId": "head_podcast_audio_api_v1_stream_audio__org_uuid___podcast_uuid___episode_uuid___filename__head",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization UUID",
|
|
"in": "path",
|
|
"name": "org_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization UUID",
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Podcast UUID",
|
|
"in": "path",
|
|
"name": "podcast_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Podcast UUID",
|
|
"title": "Podcast Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Episode UUID",
|
|
"in": "path",
|
|
"name": "episode_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Episode UUID",
|
|
"title": "Episode Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Audio filename",
|
|
"in": "path",
|
|
"name": "filename",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Audio filename",
|
|
"title": "Filename",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Audio metadata returned via response headers"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to read this podcast"
|
|
},
|
|
"404": {
|
|
"description": "Podcast, episode, or audio file not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get podcast audio metadata",
|
|
"tags": [
|
|
"stream"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/stream/block/audio/{org_uuid}/{course_uuid}/{activity_uuid}/{block_uuid}/{filename}": {
|
|
"get": {
|
|
"description": "Streams an audio file attached to an audio block within an activity, with HTTP Range request support. Validates user read access to the parent course via RBAC.",
|
|
"operationId": "stream_block_audio_api_v1_stream_block_audio__org_uuid___course_uuid___activity_uuid___block_uuid___filename__get",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization UUID",
|
|
"in": "path",
|
|
"name": "org_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization UUID",
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Course UUID",
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Course UUID",
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Activity UUID",
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Activity UUID",
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Block UUID",
|
|
"in": "path",
|
|
"name": "block_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Block UUID",
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Audio filename",
|
|
"in": "path",
|
|
"name": "filename",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Audio filename",
|
|
"title": "Filename",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Full audio streamed successfully"
|
|
},
|
|
"206": {
|
|
"description": "Partial audio content returned for a Range request"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to read this course"
|
|
},
|
|
"404": {
|
|
"description": "Activity, course, or audio file not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Stream an audio block file",
|
|
"tags": [
|
|
"stream"
|
|
]
|
|
},
|
|
"head": {
|
|
"description": "Returns metadata for an audio block file without the body. Used by audio players to probe file size and MIME type before playback.",
|
|
"operationId": "head_block_audio_api_v1_stream_block_audio__org_uuid___course_uuid___activity_uuid___block_uuid___filename__head",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization UUID",
|
|
"in": "path",
|
|
"name": "org_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization UUID",
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Course UUID",
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Course UUID",
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Activity UUID",
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Activity UUID",
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Block UUID",
|
|
"in": "path",
|
|
"name": "block_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Block UUID",
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Audio filename",
|
|
"in": "path",
|
|
"name": "filename",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Audio filename",
|
|
"title": "Filename",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Audio metadata returned via response headers"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to read this course"
|
|
},
|
|
"404": {
|
|
"description": "Activity, course, or audio file not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get audio block file metadata",
|
|
"tags": [
|
|
"stream"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/stream/block/{org_uuid}/{course_uuid}/{activity_uuid}/{block_uuid}/{filename}": {
|
|
"get": {
|
|
"description": "Streams a video file attached to a video block within an activity, with HTTP Range request support. Validates user read access to the parent course via RBAC.",
|
|
"operationId": "stream_block_video_api_v1_stream_block__org_uuid___course_uuid___activity_uuid___block_uuid___filename__get",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization UUID",
|
|
"in": "path",
|
|
"name": "org_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization UUID",
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Course UUID",
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Course UUID",
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Activity UUID",
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Activity UUID",
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Block UUID",
|
|
"in": "path",
|
|
"name": "block_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Block UUID",
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Video filename",
|
|
"in": "path",
|
|
"name": "filename",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Video filename",
|
|
"title": "Filename",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Full video streamed successfully"
|
|
},
|
|
"206": {
|
|
"description": "Partial video content returned for a Range request"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to read this course"
|
|
},
|
|
"404": {
|
|
"description": "Activity, course, or video file not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Stream a video block file",
|
|
"tags": [
|
|
"stream"
|
|
]
|
|
},
|
|
"head": {
|
|
"description": "Returns metadata for a video block file without the body. Used by video players to probe file size and Range support before playback.",
|
|
"operationId": "head_block_video_api_v1_stream_block__org_uuid___course_uuid___activity_uuid___block_uuid___filename__head",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization UUID",
|
|
"in": "path",
|
|
"name": "org_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization UUID",
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Course UUID",
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Course UUID",
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Activity UUID",
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Activity UUID",
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Block UUID",
|
|
"in": "path",
|
|
"name": "block_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Block UUID",
|
|
"title": "Block Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Video filename",
|
|
"in": "path",
|
|
"name": "filename",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Video filename",
|
|
"title": "Filename",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Video metadata returned via response headers"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to read this course"
|
|
},
|
|
"404": {
|
|
"description": "Activity, course, or video file not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get video block file metadata",
|
|
"tags": [
|
|
"stream"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/stream/video/{org_uuid}/{course_uuid}/{activity_uuid}/{filename}": {
|
|
"get": {
|
|
"description": "Streams a video file for a course activity with HTTP Range request support. Validates user read access via RBAC before serving the file.",
|
|
"operationId": "stream_activity_video_api_v1_stream_video__org_uuid___course_uuid___activity_uuid___filename__get",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization UUID",
|
|
"in": "path",
|
|
"name": "org_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization UUID",
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Course UUID",
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Course UUID",
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Activity UUID",
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Activity UUID",
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Video filename",
|
|
"in": "path",
|
|
"name": "filename",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Video filename",
|
|
"title": "Filename",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Full video streamed successfully"
|
|
},
|
|
"206": {
|
|
"description": "Partial video content returned for a Range request"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to read this course"
|
|
},
|
|
"404": {
|
|
"description": "Activity, course, or video file not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Stream an activity video",
|
|
"tags": [
|
|
"stream"
|
|
]
|
|
},
|
|
"head": {
|
|
"description": "Returns metadata for an activity video without the body. Used by video players to probe file size and Range support before playback.",
|
|
"operationId": "head_activity_video_api_v1_stream_video__org_uuid___course_uuid___activity_uuid___filename__head",
|
|
"parameters": [
|
|
{
|
|
"description": "Organization UUID",
|
|
"in": "path",
|
|
"name": "org_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Organization UUID",
|
|
"title": "Org Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Course UUID",
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Course UUID",
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Activity UUID",
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Activity UUID",
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "Video filename",
|
|
"in": "path",
|
|
"name": "filename",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "Video filename",
|
|
"title": "Filename",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Video metadata returned via response headers"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to read this course"
|
|
},
|
|
"404": {
|
|
"description": "Activity, course, or video file not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get activity video metadata",
|
|
"tags": [
|
|
"stream"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/trail/": {
|
|
"get": {
|
|
"description": "Retrieve the learning trails associated with the currently authenticated user.",
|
|
"operationId": "api_get_user_trail_api_v1_trail__get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrailRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "User trails retrieved."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"404": {
|
|
"description": "Trail not found for user"
|
|
}
|
|
},
|
|
"summary": "Get current user's trails",
|
|
"tags": [
|
|
"trail"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/trail/add_activity/{activity_uuid}": {
|
|
"post": {
|
|
"description": "Attach an activity to the current user's learning trail, marking it as started.",
|
|
"operationId": "api_add_activity_to_trail_api_v1_trail_add_activity__activity_uuid__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrailRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Activity added to trail."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this activity"
|
|
},
|
|
"404": {
|
|
"description": "Activity or trail not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Add activity to trail",
|
|
"tags": [
|
|
"trail"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/trail/add_course/{course_uuid}": {
|
|
"post": {
|
|
"description": "Attach a course to the current user's learning trail.",
|
|
"operationId": "api_add_course_to_trail_api_v1_trail_add_course__course_uuid__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrailRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course added to trail."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this course"
|
|
},
|
|
"404": {
|
|
"description": "Course or trail not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Add course to trail",
|
|
"tags": [
|
|
"trail"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/trail/org/{org_id}/trail": {
|
|
"get": {
|
|
"description": "Retrieve the current user's learning trail scoped to a specific organization.",
|
|
"operationId": "api_get_trail_by_org_id_api_v1_trail_org__org_id__trail_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrailRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "User trail for the organization."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have access to this organization's trail"
|
|
},
|
|
"404": {
|
|
"description": "Trail or organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get user trail by organization",
|
|
"tags": [
|
|
"trail"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/trail/remove_activity/{activity_uuid}": {
|
|
"delete": {
|
|
"description": "Detach an activity from the current user's learning trail.",
|
|
"operationId": "api_remove_activity_from_trail_api_v1_trail_remove_activity__activity_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "activity_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Activity Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrailRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Activity removed from trail."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have permission to modify this trail"
|
|
},
|
|
"404": {
|
|
"description": "Activity or trail not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove activity from trail",
|
|
"tags": [
|
|
"trail"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/trail/remove_course/{course_uuid}": {
|
|
"delete": {
|
|
"description": "Detach a course from the current user's learning trail.",
|
|
"operationId": "api_remove_course_to_trail_api_v1_trail_remove_course__course_uuid__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "course_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Course Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrailRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Course removed from trail."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have permission to modify this trail"
|
|
},
|
|
"404": {
|
|
"description": "Course or trail not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove course from trail",
|
|
"tags": [
|
|
"trail"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/trail/start": {
|
|
"post": {
|
|
"description": "Create a new learning trail for the current user within an organization.",
|
|
"operationId": "api_start_trail_api_v1_trail_start_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrailCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Trail"
|
|
}
|
|
}
|
|
},
|
|
"description": "Trail created successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User does not have permission to create a trail"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Start a trail",
|
|
"tags": [
|
|
"trail"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/usergroups/": {
|
|
"post": {
|
|
"description": "Create a new usergroup within an organization. Requires admin/maintainer permissions on the organization.",
|
|
"operationId": "api_create_usergroup_api_v1_usergroups__post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserGroupCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserGroupRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Usergroup created successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to create usergroups"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create a usergroup",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/usergroups/org/{org_id}": {
|
|
"get": {
|
|
"description": "Retrieve every usergroup that belongs to a given organization.",
|
|
"operationId": "api_get_usergroups_api_v1_usergroups_org__org_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/UserGroupRead"
|
|
},
|
|
"title": "Response 200 Api Get Usergroups Api V1 Usergroups Org Org Id Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Usergroups for the organization."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view usergroups for this organization"
|
|
},
|
|
"404": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List usergroups for an organization",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/usergroups/resource/{resource_uuid}": {
|
|
"get": {
|
|
"description": "Retrieve every usergroup that is linked to a given resource UUID.",
|
|
"operationId": "api_get_usergroupsby_resource_api_v1_usergroups_resource__resource_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "resource_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Resource Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/UserGroupRead"
|
|
},
|
|
"title": "Response 200 Api Get Usergroupsby Resource Api V1 Usergroups Resource Resource Uuid Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Usergroups linked to the resource."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view usergroups for this resource"
|
|
},
|
|
"404": {
|
|
"description": "Resource not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List usergroups linked to a resource",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/usergroups/{usergroup_id}": {
|
|
"delete": {
|
|
"description": "Permanently delete a usergroup along with its user and resource links.",
|
|
"operationId": "api_delete_usergroup_api_v1_usergroups__usergroup_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"title": "Response Api Delete Usergroup Api V1 Usergroups Usergroup Id Delete",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Usergroup deleted successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to delete this usergroup"
|
|
},
|
|
"404": {
|
|
"description": "Usergroup not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete a usergroup",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Retrieve a usergroup by its numeric identifier.",
|
|
"operationId": "api_get_usergroup_api_v1_usergroups__usergroup_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserGroupRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Usergroup retrieved."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this usergroup"
|
|
},
|
|
"404": {
|
|
"description": "Usergroup not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get a usergroup",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Update the name, description, or other attributes of a usergroup.",
|
|
"operationId": "api_update_usergroup_api_v1_usergroups__usergroup_id__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserGroupUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserGroupRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Usergroup updated successfully."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to update this usergroup"
|
|
},
|
|
"404": {
|
|
"description": "Usergroup not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update a usergroup",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/usergroups/{usergroup_id}/add_resources": {
|
|
"post": {
|
|
"description": "Link one or more resources (courses, collections, etc.) to a usergroup. Resource UUIDs should be provided as a comma-separated string.",
|
|
"operationId": "api_add_resources_to_usergroup_api_v1_usergroups__usergroup_id__add_resources_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "resource_uuids",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Resource Uuids",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"title": "Response Api Add Resources To Usergroup Api V1 Usergroups Usergroup Id Add Resources Post",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Resources linked to the usergroup."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to modify this usergroup"
|
|
},
|
|
"404": {
|
|
"description": "Usergroup or resource not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Add resources to a usergroup",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/usergroups/{usergroup_id}/add_users": {
|
|
"post": {
|
|
"description": "Add one or more users to a usergroup. User IDs should be provided as a comma-separated string.",
|
|
"operationId": "api_add_users_to_usergroup_api_v1_usergroups__usergroup_id__add_users_post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "user_ids",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Ids",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"title": "Response Api Add Users To Usergroup Api V1 Usergroups Usergroup Id Add Users Post",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Users added to the usergroup."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to modify this usergroup"
|
|
},
|
|
"404": {
|
|
"description": "Usergroup or user not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Add users to a usergroup",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/usergroups/{usergroup_id}/remove_resources": {
|
|
"delete": {
|
|
"description": "Unlink one or more resources from a usergroup. Resource UUIDs should be provided as a comma-separated string.",
|
|
"operationId": "api_delete_resources_from_usergroup_api_v1_usergroups__usergroup_id__remove_resources_delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "resource_uuids",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Resource Uuids",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"title": "Response Api Delete Resources From Usergroup Api V1 Usergroups Usergroup Id Remove Resources Delete",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Resources unlinked from the usergroup."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to modify this usergroup"
|
|
},
|
|
"404": {
|
|
"description": "Usergroup or resource not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove resources from a usergroup",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/usergroups/{usergroup_id}/remove_users": {
|
|
"delete": {
|
|
"description": "Remove one or more users from a usergroup. User IDs should be provided as a comma-separated string.",
|
|
"operationId": "api_delete_users_from_usergroup_api_v1_usergroups__usergroup_id__remove_users_delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "user_ids",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Ids",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"title": "Response Api Delete Users From Usergroup Api V1 Usergroups Usergroup Id Remove Users Delete",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Users removed from the usergroup."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to modify this usergroup"
|
|
},
|
|
"404": {
|
|
"description": "Usergroup or user not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Remove users from a usergroup",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/usergroups/{usergroup_id}/resources": {
|
|
"get": {
|
|
"description": "Return the UUIDs of resources (courses, collections, etc.) that are linked to a usergroup.",
|
|
"operationId": "api_get_resources_linked_to_usergroup_api_v1_usergroups__usergroup_id__resources_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Response 200 Api Get Resources Linked To Usergroup Api V1 Usergroups Usergroup Id Resources Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Resource UUIDs linked to the usergroup."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view this usergroup"
|
|
},
|
|
"404": {
|
|
"description": "Usergroup not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List resources linked to a usergroup",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/usergroups/{usergroup_id}/users": {
|
|
"get": {
|
|
"description": "Retrieve the list of users that belong to a specific usergroup.",
|
|
"operationId": "api_get_users_linked_to_usergroup_api_v1_usergroups__usergroup_id__users_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "usergroup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Usergroup Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
},
|
|
"title": "Response 200 Api Get Users Linked To Usergroup Api V1 Usergroups Usergroup Id Users Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Users linked to the usergroup."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"403": {
|
|
"description": "User lacks permission to view usergroup members"
|
|
},
|
|
"404": {
|
|
"description": "Usergroup not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List users in a usergroup",
|
|
"tags": [
|
|
"usergroups",
|
|
"usergroups"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/": {
|
|
"post": {
|
|
"description": "Create a user account that is not attached to any organization at creation time.",
|
|
"operationId": "api_create_user_without_org_api_v1_users__post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "User account created."
|
|
},
|
|
"400": {
|
|
"description": "Password fails validation, email already registered, or username taken"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create user without organization",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/authorize/ressource/{ressource_uuid}/action/{action}": {
|
|
"get": {
|
|
"description": "Check whether the current user is authorized to perform the given action (create/read/update/delete) on a specific resource.",
|
|
"operationId": "api_get_authorization_status_api_v1_users_authorize_ressource__ressource_uuid__action__action__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "ressource_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Ressource Uuid",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "action",
|
|
"required": true,
|
|
"schema": {
|
|
"enum": [
|
|
"create",
|
|
"read",
|
|
"update",
|
|
"delete"
|
|
],
|
|
"title": "Action",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Authorization decision for the requested resource and action."
|
|
},
|
|
"404": {
|
|
"description": "Resource not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Check authorization for resource action",
|
|
"tags": [
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/change_password/{user_id}": {
|
|
"put": {
|
|
"description": "Update a user's password. The authenticated user must either be the target user or otherwise authorized by the service layer.",
|
|
"operationId": "api_update_user_password_api_v1_users_change_password__user_id__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserUpdatePassword"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Password changed successfully."
|
|
},
|
|
"400": {
|
|
"description": "New password fails validation"
|
|
},
|
|
"401": {
|
|
"description": "Wrong current password"
|
|
},
|
|
"403": {
|
|
"description": "Caller cannot change this user's password"
|
|
},
|
|
"404": {
|
|
"description": "User not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Change user password",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/id/{user_id}": {
|
|
"get": {
|
|
"description": "Get a user by numeric ID. Requires authentication to prevent user enumeration attacks. Sensitive fields (`is_superadmin`, `signup_method`) are excluded.",
|
|
"operationId": "api_get_user_by_id_api_v1_users_id__user_id__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserReadPublic"
|
|
}
|
|
}
|
|
},
|
|
"description": "Public view of the user."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get user by ID",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/profile": {
|
|
"get": {
|
|
"description": "Return the currently authenticated user, or an anonymous user object if no session is present.",
|
|
"operationId": "api_get_current_user_api_v1_users_profile_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Current user profile (public or anonymous)."
|
|
}
|
|
},
|
|
"summary": "Get current user profile",
|
|
"tags": [
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/reset_password/change_password": {
|
|
"post": {
|
|
"description": "Change a user's password using a reset code. Email, reset code and new password are all supplied in the request body so they never appear in server logs or browser history.",
|
|
"operationId": "api_change_password_with_reset_code_v2_api_v1_users_reset_password_change_password_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResetPasswordRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Password updated successfully using the reset code."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Too many password reset attempts for this email"
|
|
}
|
|
},
|
|
"summary": "Change password with reset code",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/reset_password/change_password/{email}": {
|
|
"post": {
|
|
"deprecated": true,
|
|
"description": "Deprecated: use /reset_password/change_password with email in the body. This path variant leaks the email into server access logs and exists only for backward compatibility.",
|
|
"operationId": "api_change_password_with_reset_code_api_v1_users_reset_password_change_password__email__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "email",
|
|
"required": true,
|
|
"schema": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResetPasswordRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Password updated successfully using the reset code."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Too many password reset attempts for this email"
|
|
}
|
|
},
|
|
"summary": "Change password with reset code (legacy path)",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/reset_password/platform/change_password": {
|
|
"post": {
|
|
"description": "Change a user's password at the platform level (email + reset code + new password all supplied in the body so none of them appear in server access logs).",
|
|
"operationId": "api_change_password_with_reset_code_platform_v2_api_v1_users_reset_password_platform_change_password_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlatformResetPasswordRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Password updated successfully using the reset code."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Too many password reset attempts for this email"
|
|
}
|
|
},
|
|
"summary": "Change platform password with reset code",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/reset_password/platform/change_password/{email}": {
|
|
"post": {
|
|
"deprecated": true,
|
|
"description": "Deprecated: use /reset_password/platform/change_password with email in the body.",
|
|
"operationId": "api_change_password_with_reset_code_platform_api_v1_users_reset_password_platform_change_password__email__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "email",
|
|
"required": true,
|
|
"schema": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlatformResetPasswordRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Password updated successfully using the reset code."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Too many password reset attempts for this email"
|
|
}
|
|
},
|
|
"summary": "Change platform password with reset code (legacy path)",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/reset_password/platform/send_reset_code": {
|
|
"post": {
|
|
"description": "Dispatch a platform-level password reset code (email supplied in body so it does not appear in access logs). Subject to rate limiting per email.",
|
|
"operationId": "api_send_password_reset_email_platform_v2_api_v1_users_reset_password_platform_send_reset_code_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendPlatformResetCodeRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Reset code email dispatch requested."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Too many password reset attempts for this email"
|
|
}
|
|
},
|
|
"summary": "Send platform password reset code",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/reset_password/platform/send_reset_code/{email}": {
|
|
"post": {
|
|
"deprecated": true,
|
|
"description": "Deprecated: use /reset_password/platform/send_reset_code with email in the body.",
|
|
"operationId": "api_send_password_reset_email_platform_api_v1_users_reset_password_platform_send_reset_code__email__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "email",
|
|
"required": true,
|
|
"schema": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Reset code email dispatch requested."
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"429": {
|
|
"description": "Too many password reset attempts for this email"
|
|
}
|
|
},
|
|
"summary": "Send platform password reset code (legacy path)",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/reset_password/send_reset_code": {
|
|
"post": {
|
|
"description": "Dispatch an org-scoped password reset code to the given email address (email supplied in body so it never appears in access logs). Returns a generic response regardless of whether the email exists to avoid user enumeration.",
|
|
"operationId": "api_send_password_reset_email_v2_api_v1_users_reset_password_send_reset_code_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendResetCodeRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Reset code email dispatch requested."
|
|
},
|
|
"400": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Send password reset code",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/reset_password/send_reset_code/{email}": {
|
|
"post": {
|
|
"deprecated": true,
|
|
"description": "Deprecated: use /reset_password/send_reset_code with email in the body.",
|
|
"operationId": "api_send_password_reset_email_api_v1_users_reset_password_send_reset_code__email__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "email",
|
|
"required": true,
|
|
"schema": {
|
|
"format": "email",
|
|
"title": "Email",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Reset code email dispatch requested."
|
|
},
|
|
"400": {
|
|
"description": "Organization not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Send password reset code (legacy path)",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/session": {
|
|
"get": {
|
|
"description": "Return the full session for the current user, including org memberships and roles. Cached in Redis for up to 10 minutes per user.",
|
|
"operationId": "api_get_current_user_session_api_v1_users_session_get",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserSession"
|
|
}
|
|
}
|
|
},
|
|
"description": "Full session info for the current user."
|
|
}
|
|
},
|
|
"summary": "Get current user session",
|
|
"tags": [
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/update_avatar/{user_id}": {
|
|
"put": {
|
|
"description": "Upload a new avatar image for a user. Users can only update their own avatar (the `user_id` in the URL must match the authenticated user's ID).",
|
|
"operationId": "api_update_avatar_user_api_v1_users_update_avatar__user_id__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_api_update_avatar_user_api_v1_users_update_avatar__user_id__put"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "Avatar updated; cached session is invalidated so subsequent reads return the new image."
|
|
},
|
|
"403": {
|
|
"description": "Attempted to update another user's avatar"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update user avatar",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/user_id/{user_id}": {
|
|
"delete": {
|
|
"description": "Delete a user by ID. Invalidates the user's cached session so stale session data is not served.",
|
|
"operationId": "api_delete_user_api_v1_users_user_id__user_id__delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "User deleted successfully."
|
|
},
|
|
"403": {
|
|
"description": "Caller cannot delete this user"
|
|
},
|
|
"404": {
|
|
"description": "User not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Delete user",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/username/{username}": {
|
|
"get": {
|
|
"description": "Get a user by username. Requires authentication to prevent username enumeration attacks. Sensitive fields (`is_superadmin`, `signup_method`) are excluded.",
|
|
"operationId": "api_get_user_by_username_api_v1_users_username__username__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "username",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserReadPublic"
|
|
}
|
|
}
|
|
},
|
|
"description": "Public view of the user."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get user by username",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/uuid/{user_uuid}": {
|
|
"get": {
|
|
"description": "Get a user by UUID. Requires authentication to prevent user enumeration attacks. Sensitive fields (`is_superadmin`, `signup_method`) are excluded.",
|
|
"operationId": "api_get_user_by_uuid_api_v1_users_uuid__user_uuid__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_uuid",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Uuid",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserReadPublic"
|
|
}
|
|
}
|
|
},
|
|
"description": "Public view of the user."
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Get user by UUID",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/{org_id}": {
|
|
"post": {
|
|
"description": "Create a user and attach them to the given organization. Rejected if the organization is invite-only \u2014 use the invite-code endpoint instead.",
|
|
"operationId": "api_create_user_with_orgid_api_v1_users__org_id__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "User created and attached to the organization."
|
|
},
|
|
"403": {
|
|
"description": "Organization is invite-only; an invite code is required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create user in organization",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/{org_id}/invite/{invite_code}": {
|
|
"post": {
|
|
"description": "Create a user and attach them to the given organization using an invite code. Only valid when the organization is configured as invite-only.",
|
|
"operationId": "api_create_user_with_orgid_and_invite_api_v1_users__org_id__invite__invite_code__post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "invite_code",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Invite Code",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "org_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "Org Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "User created and attached via invite code."
|
|
},
|
|
"403": {
|
|
"description": "Organization does not require an invite code"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Create user with invite code",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/{user_id}": {
|
|
"put": {
|
|
"description": "Update a user's profile fields. Invalidates the user's cached session so subsequent session reads reflect the change.",
|
|
"operationId": "api_update_user_api_v1_users__user_id__put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserUpdate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserRead"
|
|
}
|
|
}
|
|
},
|
|
"description": "User updated successfully."
|
|
},
|
|
"400": {
|
|
"description": "Validation failed (duplicate email/username, invalid fields)"
|
|
},
|
|
"403": {
|
|
"description": "Caller lacks permission to update this user"
|
|
},
|
|
"404": {
|
|
"description": "User not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Update user",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/users/{user_id}/courses": {
|
|
"get": {
|
|
"description": "List courses authored or contributed to by a user. Paginated; the maximum page size is 50 to prevent bulk data extraction.",
|
|
"operationId": "api_get_user_courses_api_v1_users__user_id__courses_get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "User Id",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"description": "Page number",
|
|
"in": "query",
|
|
"name": "page",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"description": "Items per page (max 50)",
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 10,
|
|
"description": "Items per page (max 50)",
|
|
"maximum": 50,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/CourseRead"
|
|
},
|
|
"title": "Response Api Get User Courses Api V1 Users User Id Courses Get",
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": "Paginated list of the user's courses (max 50 per page)."
|
|
},
|
|
"404": {
|
|
"description": "User not found"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "List courses for user",
|
|
"tags": [
|
|
"users",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/utils/link-preview": {
|
|
"get": {
|
|
"description": "Fetches OpenGraph-style preview metadata (title, description, image) for a given URL. Requires an authenticated user.",
|
|
"operationId": "link_preview_api_v1_utils_link_preview_get",
|
|
"parameters": [
|
|
{
|
|
"description": "URL to preview",
|
|
"in": "query",
|
|
"name": "url",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "URL to preview",
|
|
"title": "Url",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "Link preview metadata fetched successfully"
|
|
},
|
|
"400": {
|
|
"description": "Failed to fetch or parse link preview"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"summary": "Fetch link preview metadata",
|
|
"tags": [
|
|
"utils"
|
|
]
|
|
}
|
|
},
|
|
"/content/{file_path}": {
|
|
"get": {
|
|
"description": "Streams a content file (videos, PDFs, images, etc.) from S3 storage. Supports HTTP Range requests for video/audio seeking. Access is enforced based on the path prefix: activity and podcast episode content require authentication and org membership for non-public resources, while course metadata and org branding are public.",
|
|
"operationId": "serve_content_file_content__file_path__get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "file_path",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "File Path",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "File streamed successfully"
|
|
},
|
|
"206": {
|
|
"description": "Partial content returned for a Range request"
|
|
},
|
|
"400": {
|
|
"description": "Invalid or unsafe file path"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required to access this file"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to access this file"
|
|
},
|
|
"404": {
|
|
"description": "File not found in storage"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"500": {
|
|
"description": "Storage backend is not configured"
|
|
}
|
|
},
|
|
"summary": "Serve a content file"
|
|
},
|
|
"head": {
|
|
"description": "Returns metadata for a content file without the body. Used by clients to probe file size, MIME type, and Range support before issuing a GET.",
|
|
"operationId": "head_content_file_content__file_path__head",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "file_path",
|
|
"required": true,
|
|
"schema": {
|
|
"title": "File Path",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
},
|
|
"description": "File metadata returned via response headers"
|
|
},
|
|
"400": {
|
|
"description": "Invalid or unsafe file path"
|
|
},
|
|
"401": {
|
|
"description": "Authentication required to access this file"
|
|
},
|
|
"403": {
|
|
"description": "User is not permitted to access this file"
|
|
},
|
|
"404": {
|
|
"description": "File not found in storage"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
},
|
|
"500": {
|
|
"description": "Storage backend is not configured"
|
|
}
|
|
},
|
|
"summary": "Get content file metadata"
|
|
}
|
|
}
|
|
}
|
|
}
|