Skip to content

File Management Endpoints

Alexandar83 edited this page Feb 5, 2025 · 33 revisions

This page outlines the file management system in The Wall API, which provides endpoints for uploading, listing, and deleting wall configuration files.

1. Overview

  • File management is a core functionality in The Wall API, allowing users to perform the following operations on wall configuration files:

    ✔ Upload a new configuration file.
    ✔ List the config_id values of all uploaded configuration files.
    ✔ Delete one or more configuration files.

  • All operations require authentication and are subject to rate limits under the File Management throttle scope.

  • Files are linked to user accounts, ensuring secure and user-specific access to uploaded wall configurations.


2. File Management Endpoints

Action Endpoint Requires Authentication?
Upload File /api/v2/wallconfig-files/upload/ ✅ Yes
List Files /api/v2/wallconfig-files/list/ ✅ Yes
Delete File /api/v2/wallconfig-files/delete/ ✅ Yes

💡 API Access Overview - Full API endpoints breakdown and applied throttling rates.

💡 Uploaded Files - Rules and limitations for uploaded files.

💡 Detailed OpenAPI Documentation - Comprehensive information on each file management endpoint and its parameters.

3. File Management Views

File management in The Wall API is handled by dedicated Django Rest Framework (DRF) views. These views enforce authentication, apply request throttling, and are integrated with DRF Spectacular for API documentation.

3.1 Throttling Controls

  • Request limits are enforced under the wallconfig-files-management throttle scope to prevent excessive API usage.
  • This ensures fair resource distribution and protects the API from abuse.

💡 For more details on throttling, refer to the API Throttling page.

3.2 OpenAPI Schema Documentation

  • File management endpoints are fully documented using DRF Spectacular’s schema extension, ensuring clear and structured API visibility.
  • This documentation provides detailed request and response structures, helping clients integrate with the API efficiently.

💡 For more details on OpenAPI schema generation, see the DRF Spectacular page.

3.3 Key DRF Files

The following files handle file management operations:

  • the_wall_api/views.py – Defines file management views, implemented with the views.APIView class.

  • config/urls.py – Maps file management API endpoints.

  • the_wall_api/serializers.py – Handles request validation and response formatting.

  • config/settings.py – Configures authentication, permissions, and throttling settings for file operations.

    • Global authentication and permission settings are defined under REST_FRAMEWORK:
      REST_FRAMEWORK = {
          'DEFAULT_AUTHENTICATION_CLASSES': [
              'rest_framework.authentication.TokenAuthentication',
          ],
          'DEFAULT_PERMISSION_CLASSES': [
              'rest_framework.permissions.IsAuthenticated',
          ],
      }
      💡 These settings enforce token-based authentication and restrict access to authenticated users for all file management views, unless explicitly overridden in the view configuration.

4. File Management and ORM Representation

4.1 Data Model Overview

4.2 Key Behaviors

  • A WallConfigReference is always created for every uploaded file, ensuring user-specific access.

  • If an identical wall configuration already exists, only a WallConfigReference is created instead of creating a duplicate WallConfig.

  • Each WallConfigReference entry contains a config_id, which is defined by the user at the time of upload. This config_id allows users to manage their own configurations independently, even when referring to the same underlying WallConfig.



Next:   Profiles Endpoints
Back to: Authentication (Djoser)

Return to Top
DTS Index
Home Page


Clone this wiki locally