{"openapi":"3.0.0","info":{"title":"Fiotech DAO API Documentation","version":"2.0.0","description":"Enterprise Governance, Voting, Treasury & Admin REST API for Fiotech DAO on FTCChain","contact":{"name":"Fiotech DAO Team","url":"https://www.fiotech.org","email":"governance@fiotech.org"}},"servers":[{"url":"/","description":"Default API Server"}],"paths":{"/api/proposals":{"get":{"summary":"Get all governance proposals","tags":["Proposals"],"parameters":[{"name":"status","in":"query","schema":{"type":"string"},"description":"Filter by proposal status (active, pending, executed, defeated, cancelled)"}],"responses":{"200":{"description":"List of DAO governance proposals","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"proposer":{"type":"string"},"status":{"type":"string"},"category":{"type":"string"},"votesFor":{"type":"integer"},"votesAgainst":{"type":"integer"},"votesAbstain":{"type":"integer"},"quorumRequired":{"type":"integer"},"createdAt":{"type":"string"}}}}}}}}},"post":{"summary":"Create a new governance proposal","tags":["Proposals"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","description","proposer"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"proposer":{"type":"string"},"category":{"type":"string","default":"governance"},"votingDelay":{"type":"integer","default":1},"votingPeriod":{"type":"integer","default":7}}}}}},"responses":{"201":{"description":"Proposal successfully created"},"400":{"description":"Invalid proposal payload"}}}},"/api/proposals/{id}":{"get":{"summary":"Get proposal details by ID","tags":["Proposals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Proposal detailed data"},"404":{"description":"Proposal not found"}}}},"/api/proposals/{id}/votes":{"get":{"summary":"Get all votes for a specific proposal","tags":["Votes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"List of votes recorded on this proposal"}}}},"/api/votes":{"post":{"summary":"Cast a vote on a proposal","tags":["Votes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["proposalId","voter","support","votingPower"],"properties":{"proposalId":{"type":"integer"},"voter":{"type":"string"},"support":{"type":"integer","description":"0=Against, 1=For, 2=Abstain"},"votingPower":{"type":"integer"},"reason":{"type":"string"}}}}}},"responses":{"201":{"description":"Vote registered successfully"},"400":{"description":"Invalid vote payload or already voted"}}}},"/api/dao/stats":{"get":{"summary":"Get DAO overall metrics, treasury & participation stats","tags":["DAO Stats"],"responses":{"200":{"description":"DAO Aggregate statistics"}}}},"/api/settings":{"get":{"summary":"Get public DAO platform parameters","tags":["Settings"],"responses":{"200":{"description":"Platform settings"}}}},"/api/auth/login":{"post":{"summary":"Admin login authentication","tags":["Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"Login successful"},"401":{"description":"Invalid credentials"}}}},"/api/admin/users":{"get":{"summary":"Get all DAO members and admin accounts","tags":["Admin"],"responses":{"200":{"description":"User list"}}}},"/api/admin/notifications":{"get":{"summary":"Get admin notification alerts","tags":["Admin"],"responses":{"200":{"description":"Notification list"}}}},"/api/admin/system/status":{"get":{"summary":"Get PostgreSQL, Upstash Redis & Blockchain RPC health status","tags":["Admin System"],"responses":{"200":{"description":"System health check"}}}},"/api/health":{"get":{"summary":"Global service health check","tags":["System"],"responses":{"200":{"description":"Healthy"}}}}}}