{"openapi":"3.1.0","info":{"title":"Data Universe Validator API","description":"API for on-demand data queries from the Data Universe network","version":"1.0.0"},"paths":{"/api/v1/query_bucket/{source}":{"get":{"summary":"Query Bucket","operationId":"query_bucket_api_v1_query_bucket__source__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},{"name":"start_bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Bucket"}},{"name":"end_bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Bucket"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health":{"get":{"summary":"Health Check","description":"Health check endpoint","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/get_top_labels_by_source/{source}":{"get":{"summary":"Get Label Sizes","description":"Get content size information by label for a specific source","operationId":"get_label_sizes_api_v1_get_top_labels_by_source__source__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LabelSize"},"title":"Response Get Label Sizes Api V1 Get Top Labels By Source  Source  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ages":{"get":{"summary":"Get Age Sizes","description":"Get content size information by age bucket for a specific source from Miner and MinerIndex validator tables","operationId":"get_age_sizes_api_v1_ages_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"source","in":"query","required":true,"schema":{"type":"string","title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgeSize"},"title":"Response Get Age Sizes Api V1 Ages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/set_desirabilities":{"post":{"summary":"Set Desirabilities","operationId":"set_desirabilities_api_v1_set_desirabilities_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesirabilityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/get_desirabilities":{"get":{"summary":"Get Desirability List","description":"If hotkey specified, return the current unscaled json submission for a specific validator hotkey.\nOtherwise, return the current aggregate desirability list.","operationId":"get_desirability_list_api_v1_get_desirabilities_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"hotkey","in":"query","required":false,"schema":{"type":"string","title":"Hotkey"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/get_bytes_by_label":{"get":{"summary":"Get Bytes By Label","description":"Returns the total sum of contentSizeBytes and adjusted bytes for the given label.","operationId":"get_bytes_by_label_api_v1_get_bytes_by_label_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"label","in":"query","required":true,"schema":{"type":"string","title":"Label"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelBytes"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/monitoring/system-status":{"get":{"summary":"System Health Check","description":"Internal health check endpoint for monitoring","operationId":"system_health_check_api_v1_monitoring_system_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/keys":{"get":{"tags":["key management"],"summary":"List Api Keys","description":"List all API keys (requires master key)","operationId":"list_api_keys_api_v1_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]},"post":{"tags":["key management"],"summary":"Create Api Key","description":"Create new API key (requires master key)","operationId":"create_api_key_api_v1_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/keys/{key}/deactivate":{"post":{"tags":["key management"],"summary":"Deactivate Api Key","description":"Deactivate an API key (requires master key)","operationId":"deactivate_api_key_api_v1_keys__key__deactivate_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"APIKeyCreate":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"APIKeyCreate"},"APIKeyResponse":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"}},"type":"object","required":["key","name"],"title":"APIKeyResponse"},"AgeSize":{"properties":{"time_bucket_id":{"type":"integer","title":"Time Bucket Id"},"content_size_bytes":{"type":"integer","title":"Content Size Bytes"},"adj_content_size_bytes":{"type":"integer","title":"Adj Content Size Bytes"}},"type":"object","required":["time_bucket_id","content_size_bytes","adj_content_size_bytes"],"title":"AgeSize","description":"Content size information for a specific time bucket"},"DesirabilityRequest":{"properties":{"desirabilities":{"items":{"type":"object"},"type":"array","title":"Desirabilities","description":"List of source items with label weights"}},"type":"object","required":["desirabilities"],"title":"DesirabilityRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Service status"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"Current UTC timestamp"},"miners_available":{"type":"integer","title":"Miners Available","description":"Number of available miners"},"version":{"type":"string","title":"Version","description":"API version","default":"1.0.0"},"netuid":{"type":"integer","title":"Netuid","description":"Network UID"},"hotkey":{"type":"string","title":"Hotkey","description":"Validator hotkey address"}},"type":"object","required":["status","timestamp","miners_available","netuid","hotkey"],"title":"HealthResponse","description":"Response model for health check"},"LabelBytes":{"properties":{"label":{"type":"string","title":"Label"},"total_bytes":{"type":"integer","title":"Total Bytes"},"adj_total_bytes":{"type":"number","title":"Adj Total Bytes"}},"type":"object","required":["label","total_bytes","adj_total_bytes"],"title":"LabelBytes","description":"Byte size information for a particular label"},"LabelSize":{"properties":{"label_value":{"type":"string","title":"Label Value"},"content_size_bytes":{"type":"integer","title":"Content Size Bytes"},"adj_content_size_bytes":{"type":"integer","title":"Adj Content Size Bytes"}},"type":"object","required":["label_value","content_size_bytes","adj_content_size_bytes"],"title":"LabelSize","description":"Content size information for a specific label"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}