Skip to main content
Version: 🚧 Canary

🏷️ Attribute Blocks

Attribute blocks provide comprehensive functionality for managing attribute groups (key-value set collections) in Nodeblocks applications. These blocks handle creation, updates, retrieval, listing, and deletion with strict validation and clear API contracts.


🎯 Overview

Attribute blocks are designed to:

  • Manage attribute groups with key-value pair structures
  • Enforce validation via JSON Schemas
  • Enable search and filtering capabilities
  • Provide CRUD operations for attribute lifecycle management
  • Support pagination on list endpoints

📦 Block Types

🔍 Schemas

JSON Schema definitions for attribute data validation:

  • attributesSchema: Base attribute group structure (name, items)
  • createAttributesSchema: Attribute group creation validation (requires name, items)
  • updateAttributesSchema: Attribute group update validation (optional name)
  • getAttributeSchema: Single attribute group retrieval (path: attributeId)
  • deleteAttributeSchema: Attribute group deletion (path: attributeId)
  • findAttributesSchema: Attribute groups search (query: name, page, limit)

View Attribute Schema Blocks →

⚙️ Handlers

Core business logic for attribute operations:

  • createAttributeGroup: Create attribute group
  • getAttributeGroupById: Retrieve attribute group by ID
  • findAttributeGroups: Search and list attribute groups
  • updateAttributeGroup: Update attribute group
  • deleteAttributeGroup: Delete attribute group

View Attribute Handler Blocks →

🛣️ Routes

HTTP endpoint definitions for attribute operations:

  • createAttributeRoute: POST /attributes (auth: Bearer + admin)
  • getAttributeRoute: GET /attributes/:attributeId
  • findAttributesRoute: GET /attributes (pagination supported)
  • updateAttributeRoute: PATCH /attributes/:attributeId (auth: Bearer + admin)
  • deleteAttributeRoute: DELETE /attributes/:attributeId (auth: Bearer + admin)

View Attribute Route Blocks →

🚀 Features

Complete attribute management features combining schemas, routes, and handlers:

  • createAttributeFeature: Creation flow with validation and routing
  • getAttributeFeature: Retrieval flow for a single group
  • findAttributesFeature: Listing with optional filtering and pagination
  • updateAttributeFeature: Update flow with validation and access control
  • deleteAttributeFeature: Deletion flow with access control

View Attribute Feature Blocks →