openapi: 3.0.3 info: title: Crawlab API description: API for Crawlab, an open-source distributed web crawler admin platform version: 0.7.0 servers: - url: "{scheme}://{host}:{port}/api" description: Default API server variables: scheme: enum: - http - https default: http host: default: localhost port: default: 8080 components: schemas: Error: type: object properties: code: type: integer format: int32 message: type: string error: type: string Success: type: object properties: code: type: integer format: int32 message: type: string SuccessWithData: type: object properties: code: type: integer format: int32 message: type: string data: type: object SuccessWithList: type: object properties: code: type: integer format: int32 message: type: string data: type: object properties: list: type: array items: type: object total: type: integer format: int64 Pagination: type: object properties: page: type: integer format: int32 default: 1 size: type: integer format: int32 default: 10 ObjectId: type: string pattern: '^[0-9a-fA-F]{24}$' description: MongoDB ObjectId represented as a hexadecimal string User: type: object properties: _id: $ref: '#/components/schemas/ObjectId' username: type: string password: type: string writeOnly: true email: type: string format: email role: type: string role_id: $ref: '#/components/schemas/ObjectId' root_admin_role: type: boolean created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' Token: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string token: type: string created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' Node: type: object properties: _id: $ref: '#/components/schemas/ObjectId' key: type: string description: Unique key for the node name: type: string ip: type: string mac: type: string hostname: type: string description: type: string is_master: type: boolean description: Whether this node is the master node status: type: string enabled: type: boolean active: type: boolean description: Whether this node is currently active active_at: type: string format: date-time description: When this node was last active current_runners: type: integer description: Number of tasks currently running on this node max_runners: type: integer description: Maximum number of tasks that can run on this node created_at: type: string format: date-time updated_at: type: string format: date-time Project: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string description: type: string spiders: type: integer description: Number of spiders in this project created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' Spider: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string description: type: string cmd: type: string description: Command to run the spider param: type: string description: Default task parameters priority: type: integer format: int32 project_id: $ref: '#/components/schemas/ObjectId' col_id: $ref: '#/components/schemas/ObjectId' description: Data collection ID col_name: type: string description: Data collection name db_name: type: string description: Database name data_source_id: $ref: '#/components/schemas/ObjectId' description: Data source ID data_source: $ref: '#/components/schemas/Database' description: Data source details mode: type: string description: Default task mode node_ids: type: array items: $ref: '#/components/schemas/ObjectId' description: Default node IDs for tasks git_id: $ref: '#/components/schemas/ObjectId' description: Git repository ID git_root_path: type: string description: Root path in the Git repository git: $ref: '#/components/schemas/Git' description: Git repository information stat: $ref: '#/components/schemas/SpiderStat' description: Spider statistics created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' SpiderStat: type: object properties: _id: $ref: '#/components/schemas/ObjectId' last_task_id: $ref: '#/components/schemas/ObjectId' description: ID of the last task run for this spider last_task: $ref: '#/components/schemas/Task' description: Details of the last task tasks: type: integer description: Total number of tasks for this spider results: type: integer description: Total number of results from all tasks wait_duration: type: integer format: int64 description: Total wait duration in seconds runtime_duration: type: integer format: int64 description: Total runtime duration in seconds total_duration: type: integer format: int64 description: Total duration in seconds average_wait_duration: type: integer format: int64 description: Average wait duration in seconds average_runtime_duration: type: integer format: int64 description: Average runtime duration in seconds average_total_duration: type: integer format: int64 description: Average total duration in seconds created_at: type: string format: date-time updated_at: type: string format: date-time Task: type: object properties: _id: $ref: '#/components/schemas/ObjectId' spider_id: $ref: '#/components/schemas/ObjectId' status: type: string enum: [pending, running, finished, error, cancelled] node_id: $ref: '#/components/schemas/ObjectId' cmd: type: string description: Command to run the task param: type: string description: Task parameters error: type: string description: Error message if task failed pid: type: integer description: Process ID of the running task schedule_id: $ref: '#/components/schemas/ObjectId' description: Schedule ID if task was created by a schedule type: type: string description: Type of task mode: type: string description: Execution mode priority: type: integer format: int32 description: Task priority node_ids: type: array items: $ref: '#/components/schemas/ObjectId' description: List of node IDs for task execution stat: $ref: '#/components/schemas/TaskStat' description: Task statistics spider: $ref: '#/components/schemas/Spider' description: Spider details schedule: $ref: '#/components/schemas/Schedule' description: Schedule details node: $ref: '#/components/schemas/Node' description: Node details result_count: type: integer format: int64 error_count: type: integer format: int64 error_message: type: string created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' TaskStat: type: object properties: _id: $ref: '#/components/schemas/ObjectId' start_ts: type: string format: date-time description: When the task started end_ts: type: string format: date-time description: When the task ended wait_duration: type: integer format: int64 description: Wait duration in milliseconds runtime_duration: type: integer format: int64 description: Runtime duration in milliseconds total_duration: type: integer format: int64 description: Total duration in milliseconds result_count: type: integer format: int64 description: Number of results from the task created_at: type: string format: date-time updated_at: type: string format: date-time Schedule: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string spider_id: $ref: '#/components/schemas/ObjectId' cron: type: string description: Cron expression for schedule param: type: object description: Schedule parameters enabled: type: boolean created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' DependencyConfig: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string description: Name of the dependency configuration type: type: string enum: [python, node] description: Type of dependencies (programming language) path: type: string description: Path to the dependency file file_name: type: string description: Name of the dependency file (e.g., requirements.txt, package.json) created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' DependencyRepo: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string description: Name of the dependency repository url: type: string description: URL of the dependency repository type: type: string enum: [python, node] description: Type of repository auth_required: type: boolean description: Whether authentication is required username: type: string description: Username for repository authentication password: type: string writeOnly: true description: Password or token for repository authentication created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' NotificationSetting: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string description: Name of the notification setting description: type: string description: Description of the notification setting enabled: type: boolean description: Whether this notification setting is enabled title: type: string description: Title of the notification template: type: string description: Message template for the notification template_mode: type: string description: Mode of the template (e.g., markdown, rich text) template_markdown: type: string description: Markdown template content template_rich_text: type: string description: Rich text template content template_rich_text_json: type: string description: JSON representation of rich text template template_theme: type: string description: Theme for the template task_trigger: type: string description: Task-related trigger for notification trigger: type: string description: General trigger for notification sender_email: type: string description: Email address of the sender use_custom_sender_email: type: boolean description: Whether to use a custom sender email sender_name: type: string description: Name of the sender mail_to: type: array items: type: string description: List of recipient email addresses mail_cc: type: array items: type: string description: List of CC email addresses mail_bcc: type: array items: type: string description: List of BCC email addresses channel_ids: type: array items: $ref: '#/components/schemas/ObjectId' description: IDs of notification channels to use channels: type: array items: $ref: '#/components/schemas/NotificationChannel' description: Notification channels (populated field, not stored) alert_id: $ref: '#/components/schemas/ObjectId' description: ID of associated alert created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' NotificationRequest: type: object properties: _id: $ref: '#/components/schemas/ObjectId' status: type: string description: Status of the notification request error: type: string description: Error message if the notification failed title: type: string description: Title of the notification content: type: string description: Content of the notification sender_email: type: string description: Email address of the sender sender_name: type: string description: Name of the sender mail_to: type: array items: type: string description: List of recipient email addresses mail_cc: type: array items: type: string description: List of CC email addresses mail_bcc: type: array items: type: string description: List of BCC email addresses setting_id: $ref: '#/components/schemas/ObjectId' description: ID of the associated notification setting channel_id: $ref: '#/components/schemas/ObjectId' description: ID of the notification channel used test: type: boolean description: Whether this is a test notification created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' NotificationAlert: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string description: Name of the notification alert description: type: string description: Description of the notification alert enabled: type: boolean description: Whether this notification alert is enabled has_metric_target: type: boolean description: Whether this alert has a metric target metric_target_id: $ref: '#/components/schemas/ObjectId' description: ID of the metric target metric_name: type: string description: Name of the metric to monitor operator: type: string description: Comparison operator for the alert condition lasting_seconds: type: integer description: Duration in seconds the condition must be true target_value: type: number format: float description: Target value for comparison level: type: string description: Alert severity level template_key: type: string description: Key for the notification template created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' NotificationChannel: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string description: Name of the notification channel description: type: string description: Description of the notification channel type: type: string enum: [mail, im] description: Type of notification channel (mail or im) provider: type: string enum: [gmail, outlook, yahoo, icloud, aol, zoho, qq, 163, exmail, slack, telegram, discord, ms_teams, wechat_work, dingtalk, lark] description: Provider of the notification channel (mail providers like gmail, outlook, etc. or IM providers like slack, telegram, etc.) smtp_server: type: string description: SMTP server for email notifications smtp_port: type: integer description: SMTP port for email notifications smtp_username: type: string description: SMTP username for email notifications smtp_password: type: string description: SMTP password for email notifications webhook_url: type: string description: Webhook URL for webhook notifications telegram_bot_token: type: string description: Telegram bot token for Telegram notifications telegram_chat_id: type: string description: Telegram chat ID for Telegram notifications google_oauth2_json: type: string description: Google OAuth2 JSON for Google-based notifications created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' Role: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string description: Name of the role description: type: string description: Description of the role permissions: type: array items: type: object properties: resource: type: string description: Resource name actions: type: array items: type: string enum: [create, read, update, delete, execute] description: Permissions granted to this role created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' DataCollection: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string fields: type: array items: $ref: '#/components/schemas/DataField' dedup: type: object properties: enabled: type: boolean keys: type: array items: type: string type: type: string created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' DataField: type: object properties: name: type: string type: type: string description: type: string Database: type: object properties: _id: $ref: '#/components/schemas/ObjectId' name: type: string description: type: string data_source: type: string description: Type of database (mongodb, mysql, etc.) host: type: string port: type: integer uri: type: string database: type: string username: type: string password: type: string writeOnly: true status: type: string error: type: string active: type: boolean active_at: type: string format: date-time is_default: type: boolean mongo_params: type: object properties: auth_source: type: string auth_mechanism: type: string postgres_params: type: object properties: ssl_mode: type: string snowflake_params: type: object properties: account: type: string schema: type: string warehouse: type: string role: type: string cassandra_params: type: object properties: keyspace: type: string hive_params: type: object properties: auth: type: string redis_params: type: object properties: db: type: integer created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' Environment: type: object properties: _id: $ref: '#/components/schemas/ObjectId' key: type: string description: Environment variable key value: type: string description: Environment variable value created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' Git: type: object properties: _id: $ref: '#/components/schemas/ObjectId' url: type: string description: Git repository URL name: type: string description: Git repository name auth_type: type: string description: Authentication type (e.g., http, ssh) username: type: string description: Git username for authentication password: type: string writeOnly: true description: Git password or token for authentication current_branch: type: string description: Current branch of the repository status: type: string description: Status of the repository (e.g., cloning, pulling, error) error: type: string description: Error message if any refs: type: array items: $ref: '#/components/schemas/GitRef' description: Git references (branches, tags) refs_updated_at: type: string format: date-time description: When refs were last updated clone_logs: type: array items: type: string description: Logs from the clone operation auto_pull: type: boolean description: Whether to automatically pull before running tasks created_at: type: string format: date-time updated_at: type: string format: date-time created_by: $ref: '#/components/schemas/ObjectId' updated_by: $ref: '#/components/schemas/ObjectId' GitRef: type: object properties: name: type: string description: Reference name type: type: string description: Reference type (branch, tag) hash: type: string description: Git commit hash MetricTrend: type: object properties: key: type: string description: Unique key for the metric name: type: string description: Display name of the metric max: type: number format: double description: Maximum value in the trend min: type: number format: double description: Minimum value in the trend avg: type: number format: double description: Average value in the trend data: type: array items: type: number format: double description: Series of data points securitySchemes: BearerAuth: type: http scheme: bearer parameters: PageParam: name: page in: query schema: type: integer default: 1 description: Page number for pagination SizeParam: name: size in: query schema: type: integer default: 10 description: Number of items per page AllParam: name: all in: query schema: type: boolean default: false description: Return all items without pagination StatsParam: name: stats in: query schema: type: boolean default: false description: Include statistics in response IdParam: name: id in: path required: true schema: $ref: '#/components/schemas/ObjectId' description: Object ID security: - BearerAuth: [] paths: /login: post: tags: - Authentication summary: Login to get authentication token security: [] requestBody: required: true content: application/json: schema: type: object required: - username - password properties: username: type: string default: admin password: type: string default: admin responses: '200': description: Successful login content: application/json: schema: allOf: - $ref: '#/components/schemas/Success' - type: object properties: data: type: string description: Authentication token '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /tokens: get: tags: - Authentication summary: Get list of API tokens parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' responses: '200': description: List of tokens content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithList' - type: object properties: data: type: object properties: list: type: array items: $ref: '#/components/schemas/Token' post: tags: - Authentication summary: Create a new API token requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string responses: '200': description: Token created successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Token' /users: get: tags: - Users summary: Get list of users parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - $ref: '#/components/parameters/AllParam' responses: '200': description: List of users content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithList' - type: object properties: data: type: object properties: list: type: array items: $ref: '#/components/schemas/User' post: tags: - Users summary: Create a new user requestBody: required: true content: application/json: schema: type: object required: - username - password properties: username: type: string password: type: string email: type: string format: email role: type: string role_id: $ref: '#/components/schemas/ObjectId' responses: '200': description: User created successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/User' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - Users summary: Delete multiple users requestBody: required: true content: application/json: schema: type: object required: - ids properties: ids: type: array items: type: string responses: '200': description: Users deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' /users/{id}: get: tags: - Users summary: Get user by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: User details content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/User' '404': description: User not found content: application/json: schema: $ref: '#/components/schemas/Error' put: tags: - Users summary: Update user by ID parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/User' responses: '200': description: User updated successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/User' '404': description: User not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - Users summary: Delete user by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: User deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' '404': description: User not found content: application/json: schema: $ref: '#/components/schemas/Error' /users/{id}/change-password: post: tags: - Users summary: Change user password parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - password properties: password: type: string responses: '200': description: Password changed successfully content: application/json: schema: $ref: '#/components/schemas/Success' /users/me: get: tags: - Users summary: Get current user information responses: '200': description: Current user details content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/User' /users/me/change-password: post: tags: - Users summary: Change current user password requestBody: required: true content: application/json: schema: type: object required: - old_password - new_password properties: old_password: type: string new_password: type: string responses: '200': description: Password changed successfully content: application/json: schema: $ref: '#/components/schemas/Success' /nodes: get: tags: - Nodes summary: Get list of nodes parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - $ref: '#/components/parameters/AllParam' responses: '200': description: List of nodes content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithList' - type: object properties: data: type: array items: $ref: '#/components/schemas/Node' /nodes/{id}: get: tags: - Nodes summary: Get node by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Node details content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Node' /spiders: get: tags: - Spiders summary: Get list of spiders parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - $ref: '#/components/parameters/AllParam' - $ref: '#/components/parameters/StatsParam' responses: '200': description: List of spiders content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithList' - type: object properties: data: type: object properties: list: type: array items: $ref: '#/components/schemas/Spider' post: tags: - Spiders summary: Create a new spider requestBody: required: true content: application/json: schema: type: object required: - name - project_id properties: name: type: string description: type: string project_id: $ref: '#/components/schemas/ObjectId' cmd: type: string priority: type: integer format: int32 col_id: $ref: '#/components/schemas/ObjectId' git_id: $ref: '#/components/schemas/ObjectId' responses: '200': description: Spider created successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Spider' delete: tags: - Spiders summary: Delete multiple spiders requestBody: required: true content: application/json: schema: type: object required: - ids properties: ids: type: array items: type: string responses: '200': description: Spiders deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}: get: tags: - Spiders summary: Get spider by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Spider details content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Spider' '404': description: Spider not found content: application/json: schema: $ref: '#/components/schemas/Error' put: tags: - Spiders summary: Update spider by ID parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Spider' responses: '200': description: Spider updated successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Spider' '404': description: Spider not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - Spiders summary: Delete spider by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Spider deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' '404': description: Spider not found content: application/json: schema: $ref: '#/components/schemas/Error' /spiders/{id}/run: post: tags: - Spiders summary: Run a spider parameters: - $ref: '#/components/parameters/IdParam' requestBody: content: application/json: schema: type: object properties: priority: type: integer format: int32 param: type: object additionalProperties: true responses: '200': description: Spider started successfully content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}/files/list: get: tags: - Spiders summary: List spider files parameters: - $ref: '#/components/parameters/IdParam' - name: path in: query schema: type: string description: Path in the spider directory responses: '200': description: List of files content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}/files/get: get: tags: - Spiders summary: Get content of a spider file parameters: - $ref: '#/components/parameters/IdParam' - name: path in: query required: true schema: type: string description: Path to the file responses: '200': description: File content content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}/files/save: post: tags: - Spiders summary: Save content to a spider file parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - path - content properties: path: type: string content: type: string responses: '200': description: File saved successfully content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}/results: get: tags: - Spiders summary: Get spider results parameters: - $ref: '#/components/parameters/IdParam' - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' responses: '200': description: Spider results content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' /spiders/{id}/files/info: get: tags: - Spiders summary: Get spider file info description: Get metadata information about a spider file parameters: - $ref: '#/components/parameters/IdParam' - name: path in: query required: true description: File path schema: type: string responses: '200': description: File information content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}/files/save/batch: post: tags: - Spiders summary: Save multiple spider files description: Save content to multiple spider files parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: files: type: array items: type: object properties: path: type: string content: type: string responses: '200': description: Files saved content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}/files/save/dir: post: tags: - Spiders summary: Save spider directory description: Save all files in a spider directory parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: path: type: string files: type: array items: type: object properties: path: type: string content: type: string responses: '200': description: Directory saved content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}/files/rename: post: tags: - Spiders summary: Rename spider file description: Rename a file in the spider directory parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: path: type: string new_path: type: string responses: '200': description: File renamed content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}/files/copy: post: tags: - Spiders summary: Copy spider file description: Copy a file in the spider directory parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: path: type: string new_path: type: string responses: '200': description: File copied content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}/files/export: post: tags: - Spiders - Export summary: Export spider files description: Export spider files to a downloadable file parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Files exported content: application/json: schema: $ref: '#/components/schemas/Success' /spiders/{id}/files/delete: post: tags: - Spiders summary: Delete spider file description: Delete a file in the spider directory parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: path: type: string responses: '200': description: File deleted content: application/json: schema: $ref: '#/components/schemas/Success' /projects: get: tags: - Projects summary: Get list of projects parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - $ref: '#/components/parameters/AllParam' responses: '200': description: List of projects content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithList' - type: object properties: data: type: object properties: list: type: array items: $ref: '#/components/schemas/Project' post: tags: - Projects summary: Create a new project requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string description: type: string responses: '200': description: Project created successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Project' delete: tags: - Projects summary: Delete multiple projects requestBody: required: true content: application/json: schema: type: object required: - ids properties: ids: type: array items: type: string responses: '200': description: Projects deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' /projects/{id}: get: tags: - Projects summary: Get project by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Project details content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Project' '404': description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' put: tags: - Projects summary: Update project by ID parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Project' responses: '200': description: Project updated successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Project' '404': description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - Projects summary: Delete project by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Project deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' '404': description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' /tasks: get: tags: - Tasks summary: Get list of tasks parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - $ref: '#/components/parameters/AllParam' responses: '200': description: List of tasks content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithList' - type: object properties: data: type: object properties: list: type: array items: $ref: '#/components/schemas/Task' delete: tags: - Tasks summary: Delete multiple tasks requestBody: required: true content: application/json: schema: type: object required: - ids properties: ids: type: array items: type: string responses: '200': description: Tasks deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' /tasks/{id}: get: tags: - Tasks summary: Get task by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Task details content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Task' '404': description: Task not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - Tasks summary: Delete task by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Task deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' '404': description: Task not found content: application/json: schema: $ref: '#/components/schemas/Error' /tasks/{id}/restart: post: tags: - Tasks summary: Restart a task parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Task restarted successfully content: application/json: schema: $ref: '#/components/schemas/Success' /tasks/{id}/cancel: post: tags: - Tasks summary: Cancel a running task parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Task cancelled successfully content: application/json: schema: $ref: '#/components/schemas/Success' /tasks/{id}/logs: get: tags: - Tasks summary: Get task logs parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Task logs content: application/json: schema: $ref: '#/components/schemas/Success' /tasks/run: post: tags: - Tasks summary: Run a task directly requestBody: required: true content: application/json: schema: type: object required: - spider_id properties: spider_id: $ref: '#/components/schemas/ObjectId' priority: type: integer format: int32 param: type: object additionalProperties: true responses: '200': description: Task started successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Task' /schedules: get: tags: - Schedules summary: Get list of schedules parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - $ref: '#/components/parameters/AllParam' responses: '200': description: List of schedules content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithList' - type: object properties: data: type: object properties: list: type: array items: $ref: '#/components/schemas/Schedule' post: tags: - Schedules summary: Create a new schedule requestBody: required: true content: application/json: schema: type: object required: - name - spider_id - cron properties: name: type: string spider_id: $ref: '#/components/schemas/ObjectId' cron: type: string param: type: object additionalProperties: true enabled: type: boolean default: true responses: '200': description: Schedule created successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Schedule' delete: tags: - Schedules summary: Delete multiple schedules requestBody: required: true content: application/json: schema: type: object required: - ids properties: ids: type: array items: type: string responses: '200': description: Schedules deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' /schedules/{id}: get: tags: - Schedules summary: Get schedule by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Schedule details content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Schedule' '404': description: Schedule not found content: application/json: schema: $ref: '#/components/schemas/Error' put: tags: - Schedules summary: Update schedule by ID parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Schedule' responses: '200': description: Schedule updated successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Schedule' '404': description: Schedule not found content: application/json: schema: $ref: '#/components/schemas/Error' /roles: get: tags: - Permissions summary: Get roles list description: Get list of all roles parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - $ref: '#/components/parameters/AllParam' responses: '200': description: List of roles content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithList' - type: object properties: data: type: object properties: list: type: array items: $ref: '#/components/schemas/Role' post: tags: - Permissions summary: Create role description: Create a new role requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Role' responses: '200': description: Role created successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Role' /roles/{id}: get: tags: - Permissions summary: Get role by ID description: Get detailed information about a role parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Role details content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Role' '404': description: Role not found content: application/json: schema: $ref: '#/components/schemas/Error' put: tags: - Permissions summary: Update role description: Update a role parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Role' responses: '200': description: Role updated successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Role' '404': description: Role not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - Permissions summary: Delete role description: Delete a role by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Role deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' '404': description: Role not found content: application/json: schema: $ref: '#/components/schemas/Error' /databases: get: tags: - Database summary: Get database list description: Get list of configured databases parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - $ref: '#/components/parameters/AllParam' responses: '200': description: List of databases content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithList' - type: object properties: data: type: object properties: list: type: array items: $ref: '#/components/schemas/Database' post: tags: - Database summary: Create a new database description: Add a new database configuration requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Database' responses: '200': description: Database created successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Database' /databases/{id}: get: tags: - Database summary: Get database by ID description: Get database configuration details by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Database details content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Database' '404': description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' put: tags: - Database summary: Update database by ID description: Update database configuration by ID parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Database' responses: '200': description: Database updated successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Database' '404': description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' /databases/{id}/connection/test: post: tags: - Database summary: Test database connection description: Test connection to a configured database parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Connection test result content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: type: object properties: status: type: string message: type: string '404': description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' /databases/{id}/metadata: get: tags: - Database summary: Get database metadata description: Get metadata for a database parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Database metadata content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: type: object additionalProperties: true '404': description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' /databases/{id}/tables/metadata: get: tags: - Database summary: Get database tables metadata description: Get metadata for all tables in a database parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Table metadata content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: type: array items: type: object additionalProperties: true '404': description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' /databases/{id}/tables/metadata/get: post: tags: - Database summary: Get specific table metadata description: Get metadata for specific tables in a database parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: tables: type: array items: type: string description: List of table names responses: '200': description: Table metadata content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: type: array items: type: object additionalProperties: true '404': description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' /databases/{id}/tables/create: post: tags: - Database summary: Create a new table description: Create a new table in the database parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: Table name columns: type: array items: type: object properties: name: type: string description: Column name type: type: string description: Column data type nullable: type: boolean description: Whether column allows NULL values primary: type: boolean description: Whether column is a primary key default: type: string description: Default value for the column responses: '200': description: Table created successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: type: object properties: name: type: string status: type: string '404': description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' /databases/{id}/tables/modify: post: tags: - Database summary: Modify a table description: Modify an existing table in the database parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: Table name columns: type: array items: type: object properties: name: type: string description: Column name new_name: type: string description: New column name (for rename operations) type: type: string description: Column data type action: type: string enum: [add, modify, drop] description: Action to perform on the column responses: '200': description: Table modified successfully content: application/json: schema: $ref: '#/components/schemas/Success' /databases/{id}/tables/drop: delete: tags: - Database summary: Drop a table description: Delete a table from the database parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: Table name responses: '200': description: Table dropped successfully content: application/json: schema: $ref: '#/components/schemas/Success' /databases/{id}/tables/rename: post: tags: - Database summary: Rename a table description: Rename an existing table in the database parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: Current table name new_name: type: string description: New table name responses: '200': description: Table renamed successfully content: application/json: schema: $ref: '#/components/schemas/Success' /databases/{id}/tables/data: get: tags: - Database summary: Get table data description: Get data from a database table parameters: - $ref: '#/components/parameters/IdParam' - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - name: table in: query required: true schema: type: string description: Table name responses: '200': description: Table data content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' post: tags: - Database summary: Modify table data description: Insert, update, or delete data in a database table parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: table: type: string description: Table name action: type: string enum: [insert, update, delete] description: Action to perform data: type: array items: type: object additionalProperties: true description: Data to insert or update where: type: object additionalProperties: true description: Where condition for update or delete responses: '200': description: Data modified successfully content: application/json: schema: $ref: '#/components/schemas/Success' /databases/{id}/tables/data/get: post: tags: - Database summary: Get filtered table data description: Get data from a database table with filtering parameters: - $ref: '#/components/parameters/IdParam' - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' requestBody: required: true content: application/json: schema: type: object properties: table: type: string description: Table name where: type: object additionalProperties: true description: Where conditions sort: type: object additionalProperties: true description: Sort options responses: '200': description: Filtered table data content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' /databases/{id}/columns/types: get: tags: - Database summary: Get column types description: Get available column data types for a database parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Available column types content: application/json: schema: $ref: '#/components/schemas/Success' /databases/{id}/query: post: tags: - Database summary: Execute a database query description: Execute a custom SQL query on the database parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: query: type: string description: SQL query to execute responses: '200': description: Query results content: application/json: schema: $ref: '#/components/schemas/Success' /databases/metrics: get: tags: - Database summary: Get database metrics description: Get performance metrics for all databases responses: '200': description: Database metrics content: application/json: schema: $ref: '#/components/schemas/Success' /databases/{id}/metrics/time-range: get: tags: - Database summary: Get time-range metrics description: Get performance metrics for a database over a time range parameters: - $ref: '#/components/parameters/IdParam' - name: start in: query schema: type: string format: date-time description: Start time - name: end in: query schema: type: string format: date-time description: End time responses: '200': description: Time-range metrics content: application/json: schema: $ref: '#/components/schemas/Success' /databases/{id}/metrics/current: get: tags: - Database summary: Get current metrics description: Get current performance metrics for a database parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Current metrics content: application/json: schema: $ref: '#/components/schemas/Success' /databases/{id}/export/{type}: post: tags: - Database summary: Export database data description: Export database data to a file parameters: - $ref: '#/components/parameters/IdParam' - name: type in: path required: true schema: type: string enum: [csv, json, sql] description: Export file type requestBody: required: true content: application/json: schema: type: object properties: tables: type: array items: type: string description: Tables to export responses: '200': description: Export started successfully content: application/json: schema: $ref: '#/components/schemas/Success' /databases/{id}/export/{type}/{exportId}: get: tags: - Database summary: Get export status description: Get status of a database export parameters: - $ref: '#/components/parameters/IdParam' - name: type in: path required: true schema: type: string description: Export file type - name: exportId in: path required: true schema: type: string description: Export ID responses: '200': description: Export status content: application/json: schema: $ref: '#/components/schemas/Success' /databases/{id}/export/{type}/{exportId}/download: get: tags: - Database summary: Download export description: Download an exported database file parameters: - $ref: '#/components/parameters/IdParam' - name: type in: path required: true schema: type: string description: Export file type - name: exportId in: path required: true schema: type: string description: Export ID responses: '200': description: File download content: application/octet-stream: schema: type: string format: binary /nodes/{id}/metrics/time-range: get: tags: - Nodes summary: Get time-range metrics for a node description: Get performance metrics for a node over a time range parameters: - $ref: '#/components/parameters/IdParam' - name: start in: query schema: type: string format: date-time description: Start time - name: end in: query schema: type: string format: date-time description: End time responses: '200': description: Time-range metrics content: application/json: schema: $ref: '#/components/schemas/Success' /nodes/{id}/metrics/current: get: tags: - Nodes summary: Get current metrics for a node description: Get current performance metrics for a node parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Current metrics content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/settings/{id}/test: post: tags: - Notifications summary: Test notification setting description: Test a notification setting by sending a test notification parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Test notification sent content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/channels/{id}/test: post: tags: - Notifications summary: Test notification channel description: Test a notification channel by sending a test notification parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: message: type: string description: Test message to send responses: '200': description: Test notification sent content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/alerts: get: tags: - Notifications summary: Get notification alerts description: Get a list of notification alerts parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' responses: '200': description: List of notification alerts content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' post: tags: - Notifications summary: Create notification alert description: Create a new notification alert requestBody: required: true content: application/json: schema: type: object responses: '200': description: Notification alert created content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/alerts/{id}: get: tags: - Notifications summary: Get notification alert by ID description: Get a specific notification alert by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Notification alert details content: application/json: schema: $ref: '#/components/schemas/Success' put: tags: - Notifications summary: Update notification alert description: Update a notification alert parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object responses: '200': description: Notification alert updated content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: - Notifications summary: Delete notification alert description: Delete a notification alert parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Notification alert deleted content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/settings: get: tags: - Notifications summary: Get notification settings description: Get a list of notification settings parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' responses: '200': description: List of notification settings content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' post: tags: - Notifications summary: Create notification setting description: Create a new notification setting requestBody: required: true content: application/json: schema: type: object responses: '200': description: Notification setting created content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/settings/{id}: get: tags: - Notifications summary: Get notification setting by ID description: Get a specific notification setting by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Notification setting details content: application/json: schema: $ref: '#/components/schemas/Success' put: tags: - Notifications summary: Update notification setting description: Update a notification setting parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object responses: '200': description: Notification setting updated content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: - Notifications summary: Delete notification setting description: Delete a notification setting parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Notification setting deleted content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/settings/{id}/enable: post: tags: - Notifications summary: Enable notification setting description: Enable a notification setting parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Notification setting enabled content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/settings/{id}/disable: post: tags: - Notifications summary: Disable notification setting description: Disable a notification setting parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Notification setting disabled content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/settings/{id}/requests: get: tags: - Notifications summary: Get notification requests for a setting description: Get notification requests associated with a specific notification setting parameters: - $ref: '#/components/parameters/IdParam' - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' responses: '200': description: List of notification requests content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' /notifications/channels: get: tags: - Notifications summary: Get notification channels description: Get a list of notification channels parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' responses: '200': description: List of notification channels content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' post: tags: - Notifications summary: Create notification channel description: Create a new notification channel requestBody: required: true content: application/json: schema: type: object responses: '200': description: Notification channel created content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/channels/{id}: get: tags: - Notifications summary: Get notification channel by ID description: Get a specific notification channel by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Notification channel details content: application/json: schema: $ref: '#/components/schemas/Success' put: tags: - Notifications summary: Update notification channel description: Update a notification channel parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object responses: '200': description: Notification channel updated content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: - Notifications summary: Delete notification channel description: Delete a notification channel parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Notification channel deleted content: application/json: schema: $ref: '#/components/schemas/Success' /notifications/requests: get: tags: - Notifications summary: Get notification requests description: Get a list of notification requests parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' responses: '200': description: List of notification requests content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' /dependencies/settings: get: tags: - Dependencies summary: Get dependency settings description: Get dependency settings responses: '200': description: Dependency settings content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' post: tags: - Dependencies summary: Create dependency setting description: Create a new dependency setting requestBody: required: true content: application/json: schema: type: object responses: '200': description: Dependency setting created content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/settings/{id}: get: tags: - Dependencies summary: Get dependency setting by ID description: Get a specific dependency setting by ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Dependency setting details content: application/json: schema: $ref: '#/components/schemas/Success' put: tags: - Dependencies summary: Update dependency setting description: Update a dependency setting parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object responses: '200': description: Dependency setting updated content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: - Dependencies summary: Delete dependency setting description: Delete a dependency setting parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Dependency setting deleted content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/configs/{language}: get: tags: - Dependencies summary: Get dependency configs for a language description: Get dependency configurations for a specific language parameters: - name: language in: path required: true description: Programming language (python, node, etc.) schema: type: string responses: '200': description: Dependency configurations content: application/json: schema: $ref: '#/components/schemas/Success' put: tags: - Dependencies summary: Update dependency configs for a language description: Update dependency configurations for a specific language parameters: - name: language in: path required: true description: Programming language (python, node, etc.) schema: type: string requestBody: required: true content: application/json: schema: type: object responses: '200': description: Dependency configurations updated content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/configs/{language}/versions: get: tags: - Dependencies summary: Get dependency config versions for a language description: Get available versions of dependency configurations for a specific language parameters: - name: language in: path required: true description: Programming language (python, node, etc.) schema: type: string responses: '200': description: Dependency configuration versions content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/configs/{language}/setups: get: tags: - Dependencies summary: Get dependency setup list for a language description: Get list of dependency setups for a specific language parameters: - name: language in: path required: true description: Programming language (python, node, etc.) schema: type: string responses: '200': description: Dependency setup list content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/configs/{language}/setups/install: post: tags: - Dependencies summary: Install dependency setup for a language description: Install a dependency setup for a specific language parameters: - name: language in: path required: true description: Programming language (python, node, etc.) schema: type: string requestBody: required: true content: application/json: schema: type: object responses: '200': description: Dependency setup installed content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/configs/{language}/setups/uninstall: post: tags: - Dependencies summary: Uninstall dependency setup for a language description: Uninstall a dependency setup for a specific language parameters: - name: language in: path required: true description: Programming language (python, node, etc.) schema: type: string requestBody: required: true content: application/json: schema: type: object responses: '200': description: Dependency setup uninstalled content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/repos: get: tags: - Dependencies summary: Get dependency repository list description: Get a list of dependency repositories parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' responses: '200': description: List of dependency repositories content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' /dependencies/repos/search: get: tags: - Dependencies summary: Search dependency repositories description: Search for dependency repositories parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - name: q in: query required: false description: Search query schema: type: string responses: '200': description: Search results for dependency repositories content: application/json: schema: $ref: '#/components/schemas/SuccessWithList' /dependencies/repos/versions: get: tags: - Dependencies summary: Get dependency repository versions description: Get versions for a dependency repository parameters: - name: name in: query required: true description: Repository name schema: type: string responses: '200': description: Dependency repository versions content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/repos/update: post: tags: - Dependencies summary: Update dependency repositories description: Update the list of dependency repositories responses: '200': description: Dependency repositories updated content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/repos/install: post: tags: - Dependencies summary: Install dependency description: Install a dependency from a repository requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: Dependency name version: type: string description: Dependency version responses: '200': description: Dependency installed content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/repos/uninstall: post: tags: - Dependencies summary: Uninstall dependency description: Uninstall a dependency requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: Dependency name responses: '200': description: Dependency uninstalled content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/{id}/logs: get: tags: - Dependencies summary: Get dependency logs description: Get logs for a dependency operation parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Dependency logs content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/spiders/{id}: get: tags: - Dependencies summary: Get spider dependencies description: Get dependencies for a specific spider parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Spider dependencies content: application/json: schema: $ref: '#/components/schemas/Success' /dependencies/spiders/{id}/install: post: tags: - Dependencies summary: Install spider dependency description: Install a dependency for a specific spider parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: Dependency name version: type: string description: Dependency version responses: '200': description: Spider dependency installed content: application/json: schema: $ref: '#/components/schemas/Success' /gits: get: tags: - Git summary: Get list of Git repositories description: Lists all Git repositories configured in the system parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/SizeParam' - $ref: '#/components/parameters/AllParam' responses: '200': description: List of Git repositories content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithList' - type: object properties: list: type: array items: $ref: '#/components/schemas/Git' post: tags: - Git summary: Create a new Git repository description: Add a new Git repository to the system requestBody: required: true content: application/json: schema: type: object required: - name - url properties: name: type: string description: Name of the Git repository url: type: string description: URL of the Git repository auth_type: type: string enum: [none, http, ssh] description: Authentication type for the Git repository username: type: string description: Username for HTTP authentication password: type: string description: Password/token for HTTP authentication ssh_key: type: string description: SSH private key for SSH authentication ssh_password: type: string description: SSH key password if the key is password-protected responses: '200': description: Git repository created successfully content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: - Git summary: Delete multiple Git repositories description: Delete multiple Git repositories by IDs requestBody: required: true content: application/json: schema: type: object required: - ids properties: ids: type: array items: $ref: '#/components/schemas/ObjectId' responses: '200': description: Git repositories deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}: get: tags: - Git summary: Get Git repository by ID description: Get detailed information about a Git repository parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Git repository details content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: $ref: '#/components/schemas/Git' delete: tags: - Git summary: Delete Git repository by ID description: Delete a Git repository by its ID parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Git repository deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/clone: post: tags: - Git summary: Clone a Git repository description: Clone a remote Git repository to local storage parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Repository cloned successfully content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/branches: get: tags: - Git summary: Get Git branches description: Get all branches in a Git repository parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: List of branches content: application/json: schema: $ref: '#/components/schemas/Success' post: tags: - Git summary: Create a new branch description: Create a new branch in the Git repository parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string responses: '200': description: Branch created successfully content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: - Git summary: Delete a branch description: Delete a branch in the Git repository parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string responses: '200': description: Branch deleted successfully content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/branches/current: get: tags: - Git summary: Get current Git branch description: Get the current active branch in the Git repository parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Current branch content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/branches/remote: get: tags: - Git summary: Get remote Git branches description: Get all remote branches in the Git repository parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: List of remote branches content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/branches/checkout: post: tags: - Git summary: Checkout a branch description: Checkout an existing branch in the Git repository parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string responses: '200': description: Branch checked out successfully content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/branches/checkout/remote: post: tags: - Git summary: Checkout a remote branch description: Checkout a remote branch in the Git repository parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string responses: '200': description: Remote branch checked out successfully content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/changes: get: tags: - Git summary: Get Git changes description: Get all changes in the Git repository working directory parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: List of changes content: application/json: schema: $ref: '#/components/schemas/Success' post: tags: - Git summary: Stage Git changes description: Stage changes in the Git repository parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - paths properties: paths: type: array items: type: string responses: '200': description: Changes staged successfully content: application/json: schema: $ref: '#/components/schemas/Success' delete: tags: - Git summary: Discard Git changes description: Discard changes in the Git repository parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - paths properties: paths: type: array items: type: string responses: '200': description: Changes discarded successfully content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/pull: post: tags: - Git summary: Pull from remote description: Pull changes from the remote Git repository parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Pull successful content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/pull/ws: get: tags: - Git summary: WebSocket for Git pull description: WebSocket endpoint for streaming Git pull operations parameters: - $ref: '#/components/parameters/IdParam' responses: '101': description: WebSocket connection established /gits/{id}/push/ws: get: tags: - Git summary: WebSocket for Git push description: WebSocket endpoint for streaming Git push operations parameters: - $ref: '#/components/parameters/IdParam' responses: '101': description: WebSocket connection established /gits/{id}/files/diff: get: tags: - Git summary: Get file differences description: Get differences between current file and previous versions parameters: - $ref: '#/components/parameters/IdParam' - name: path in: query required: true schema: type: string description: Path to the file responses: '200': description: File differences content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/commit: post: tags: - Git summary: Commit changes description: Commit staged changes to the Git repository parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - message properties: message: type: string responses: '200': description: Commit successful content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/push: post: tags: - Git summary: Push to remote description: Push commits to the remote Git repository parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: Push successful content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/logs: get: tags: - Git summary: Get Git logs description: Get commit history logs from the Git repository parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: List of logs content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/files/list: get: tags: - Git summary: List Git files description: List files in the Git repository parameters: - $ref: '#/components/parameters/IdParam' - name: path in: query schema: type: string description: Path in the repository responses: '200': description: List of files content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/files/get: get: tags: - Git summary: Get Git file content description: Get content of a file in the Git repository parameters: - $ref: '#/components/parameters/IdParam' - name: path in: query required: true schema: type: string description: Path to the file responses: '200': description: File content content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/files/save: post: tags: - Git summary: Save Git file description: Save content to a file in the Git repository parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - path - content properties: path: type: string content: type: string responses: '200': description: File saved successfully content: application/json: schema: $ref: '#/components/schemas/Success' /gits/{id}/spiders: get: tags: - Git summary: Get spiders in Git repository description: Get list of spiders in a Git repository parameters: - $ref: '#/components/parameters/IdParam' responses: '200': description: List of spiders content: application/json: schema: $ref: '#/components/schemas/Success' post: tags: - Git summary: Create spider from Git repository description: Create a new spider from files in a Git repository parameters: - $ref: '#/components/parameters/IdParam' requestBody: required: true content: application/json: schema: type: object required: - path properties: path: type: string responses: '200': description: Spider created successfully content: application/json: schema: $ref: '#/components/schemas/Success' /export/{type}: post: tags: - Export summary: Export data description: Export data in the specified format parameters: - name: type in: path required: true description: Export type (csv, json, etc.) schema: type: string requestBody: required: true content: application/json: schema: type: object properties: filter: type: object description: Filter to apply to the data fields: type: array items: type: string description: Fields to include in the export responses: '200': description: Export initiated successfully content: application/json: schema: $ref: '#/components/schemas/Success' /export/{type}/{exportId}: get: tags: - Export summary: Get export status description: Get the status of an export operation parameters: - name: type in: path required: true description: Export type (csv, json, etc.) schema: type: string - name: exportId in: path required: true description: Export ID schema: type: string responses: '200': description: Export status content: application/json: schema: $ref: '#/components/schemas/Success' /export/{type}/{exportId}/download: get: tags: - Export summary: Download export file description: Download the exported file parameters: - name: type in: path required: true description: Export type (csv, json, etc.) schema: type: string - name: exportId in: path required: true description: Export ID schema: type: string responses: '200': description: Export file content: application/octet-stream: schema: type: string format: binary /system-info: get: tags: - System summary: Get system information responses: '200': description: System information content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: type: object properties: version: type: string mongo: type: string redis: type: string node: type: object /stats: get: tags: - System summary: Get system statistics responses: '200': description: System statistics content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: type: object properties: nodes: type: integer projects: type: integer spiders: type: integer tasks: type: integer schedules: type: integer users: type: integer /settings: get: tags: - System summary: Get system settings responses: '200': description: System settings content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: type: object additionalProperties: true post: tags: - System summary: Update system settings requestBody: required: true content: application/json: schema: type: object additionalProperties: true responses: '200': description: Settings updated successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessWithData' - type: object properties: data: type: object additionalProperties: true tags: - name: Authentication description: Authentication related operations - name: Nodes description: Node management operations - name: Spiders description: Spider management operations - name: Projects description: Project management operations - name: Tasks description: Task management operations - name: Schedules description: Schedule management operations - name: Git description: Git integration operations - name: Dependencies description: Dependency management operations - name: Notifications description: Notification system operations - name: Database description: Database operations - name: Users description: User management operations - name: Permissions description: Role-based access control operations - name: System description: System management operations