Feature Controller

Create New Feature (ROOT Auth Required)

Path: /api/features

Method: POST

Example Http Request

POST /api/features HTTP/1.1
Content-Type: application/json
X-Wallet-Address: 0x1234567890123456789012345678901234567890
X-WAL: 0x1234567890123456789012345678901234567890
X-SIG: 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12
X-MES: VGVzdCBtZXNzYWdlIGZvciBhdXRoZW50aWNhdGlvbg==
Idempotency-Key: test-key-456
Content-Length: 133
Host: localhost:8080

{
  "name" : "new.feature.create",
  "description" : "Can create new features",
  "category" : "creation",
  "channelScoped" : true
}

Example Http Response

HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization, Accept-Language, connection, Cache-Control, Access-Control-Request-Method, Access-Control-Request-Headers, X-SIG, X-WAL, X-MES
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD
Access-Control-Expose-Headers: Access-Control-Allow-Origin, Access-Control-Allow-Credentials
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 372

{
  "id" : "fea_HAA3XMBK10BADPFWWRAB5F1DYS",
  "createdAt" : "2025-12-04T14:43:43.058Z",
  "updatedAt" : "2025-12-04T14:43:43.058Z",
  "version" : 0,
  "createdBy" : null,
  "updatedBy" : null,
  "tenantId" : "t_R9A3XMBK10ZHZQ2GTT6P6M5VR0",
  "name" : "new.feature.create",
  "description" : "Can create new features",
  "category" : "creation",
  "channelScoped" : true
}

Example Curl Request

$ curl 'http://localhost:8080/api/features' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'X-Wallet-Address: 0x1234567890123456789012345678901234567890' \
    -H 'X-WAL: 0x1234567890123456789012345678901234567890' \
    -H 'X-SIG: 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12' \
    -H 'X-MES: VGVzdCBtZXNzYWdlIGZvciBhdXRoZW50aWNhdGlvbg==' \
    -H 'Idempotency-Key: test-key-456' \
    -d '{
  "name" : "new.feature.create",
  "description" : "Can create new features",
  "category" : "creation",
  "channelScoped" : true
}'

Feature Controller