{"openapi":"3.1.0","info":{"title":"Sma Das API","version":"1.0.0","description":"Read published research on sma-das.blog. List, fetch, and search public articles. Authentication is optional for GET.","contact":{"name":"Sma Das","email":"hello@sma-das.com","url":"https://sma-das.blog"}},"servers":[{"url":"https://sma-das.blog","description":"Sma Das"}],"tags":[{"name":"research","description":"Published articles"},{"name":"keys","description":"Self-serve API keys"}],"paths":{"/api/v1":{"get":{"tags":["research"],"summary":"API index","operationId":"getApiIndex","responses":{"200":{"description":"Catalog of public endpoints","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/posts":{"get":{"tags":["research"],"summary":"List published research","operationId":"listPosts","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Published posts","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/Post"}}}}}}}}}},"/api/v1/posts/{slug}":{"get":{"tags":["research"],"summary":"Get one published article","operationId":"getPost","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Article metadata and markdown body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostDetail"}}}},"404":{"description":"Unknown slug"}}}},"/api/v1/search":{"get":{"tags":["research"],"summary":"Search published research","operationId":"searchPosts","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Keywords matched against title, tags, and description"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"Ranked matches","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"posts":{"type":"array","items":{"$ref":"#/components/schemas/Post"}}}}}}},"400":{"description":"Missing q"}}}},"/api/v1/keys":{"post":{"tags":["keys"],"summary":"Issue a self-serve API key","operationId":"issueApiKey","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"label":{"type":"string"}}}}}},"responses":{"201":{"description":"API key, shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Optional. Issue a key at POST /api/v1/keys or exchange an anonymous identity_assertion at https://sma-das.blog/oauth2/token. Scopes: research.read, research.search. Resource: https://sma-das.blog/api/v1."}},"schemas":{"Post":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"date":{"type":"string"},"lastModified":{"type":"string"},"author":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"url":{"type":"string","format":"uri"},"markdown_url":{"type":"string","format":"uri"},"image":{"type":"string","format":"uri"}}},"PostDetail":{"allOf":[{"$ref":"#/components/schemas/Post"},{"type":"object","properties":{"markdown":{"type":"string"}}}]},"ApiKey":{"type":"object","properties":{"key":{"type":"string"},"prefix":{"type":"string"},"token_type":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expires_in":{"type":"integer"},"label":{"type":["string","null"]}}}}},"security":[{},{"bearerAuth":[]}]}