{"openapi":"3.1.0","info":{"title":"Source Bilişim Customer API","version":"1.1.0","description":"Müşterilerin yalnız kendi hesap, sunucu, fatura, bildirim ve API istek kayıtlarına kapsam kontrollü erişimi. API anahtarlarını yalnız sunucu tarafında kullanın.","contact":{"name":"Source Bilişim Destek","url":"https://sourcebilisim.com/contact"},"license":{"name":"Proprietary","url":"https://sourcebilisim.com/legal/terms"}},"externalDocs":{"description":"Türkçe ve İngilizce kullanım rehberi","url":"https://sourcebilisim.com/docs/api"},"servers":[{"url":"https://api.sourcebilisim.com/v1","description":"Üretim"}],"tags":[{"name":"Anahtar","description":"Kullanılan anahtar ve hesap bilgileri."},{"name":"İstek kayıtları","description":"Kimliği doğrulanmış API isteklerinin 90 güne veya hesap başına en yeni 100.000 kayda kadar geçmişi."},{"name":"Sunucular","description":"Hesaba ait sunucular ve güvenli güç işlemleri."},{"name":"Faturalar","description":"Hesaba ait salt okunur fatura verileri."},{"name":"Bildirimler","description":"Hesaba ait bildirimler."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sb_live_…","description":"Güvenlik Merkezi’nde oluşturulan müşteri API anahtarı."}},"responses":{"Unauthorized":{"description":"Anahtar geçersiz, süresi dolmuş veya devre dışı.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Anahtar gerekli yetki kapsamına sahip değil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Kayıt bulunamadı veya bu hesaba ait değil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"İstek sınırı aşıldı. Retry-After başlığını izleyin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"Kimlik doğrulama veya bağımlı hizmet geçici olarak kullanılamıyor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["success","error","message"],"properties":{"success":{"type":"boolean","const":false},"error":{"type":"string","example":"INSUFFICIENT_SCOPE"},"message":{"type":"string"},"required_scope":{"type":"string"},"request_id":{"type":["string","null"]}}},"PaginationMeta":{"type":"object","required":["limit","has_more","next_cursor"],"properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","integer","null"]}}},"Key":{"type":"object","required":["id","name","scopes"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["account:read","api-logs:read","servers:read","servers:power","invoices:read","notifications:read","notifications:write"]}}}},"Account":{"type":"object","required":["id","username","email","role","language"],"properties":{"id":{"type":"integer"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string"},"language":{"type":"string","enum":["tr","en"]}}},"Server":{"type":"object","required":["id","name","status","resources","ip_type"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string"},"setup_complete":{"type":"boolean"},"game":{"type":["string","null"]},"plan_code":{"type":["string","null"]},"resources":{"type":"object","properties":{"memory_mb":{"type":["integer","null"]},"cpu_limit":{"type":["integer","null"]},"disk_mb":{"type":["integer","null"]}}},"network_mode":{"type":"boolean"},"ip_type":{"type":"string","enum":["SHARED","DEDICATED"]},"connection":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"integer"},"address":{"type":"string"}}},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Invoice":{"type":"object","properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"},"amount":{"type":"string"},"currency":{"type":"string"},"due_date":{"type":"string","format":"date-time"},"paid_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Notification":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"priority":{"type":"string"},"is_read":{"type":"boolean"},"action_url":{"type":["string","null"]},"icon":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"read_at":{"type":["string","null"],"format":"date-time"}}},"RequestLog":{"type":"object","required":["id","api_key","method","path","status_code","duration_ms","created_at"],"properties":{"id":{"type":"string","pattern":"^[1-9][0-9]*$"},"api_key":{"type":"object","properties":{"id":{"type":["integer","null"]},"name":{"type":"string"},"preview":{"type":"string"}}},"request_id":{"type":["string","null"]},"method":{"type":"string"},"path":{"type":"string"},"status_code":{"type":"integer"},"duration_ms":{"type":"integer"},"ip_address":{"type":["string","null"]},"user_agent":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}}}},"paths":{"/key":{"get":{"operationId":"getApiKey","tags":["Anahtar"],"summary":"Anahtar ve kapsam bilgisi","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Anahtar bilgisi","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Key"},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/me":{"get":{"operationId":"getAccount","tags":["Anahtar"],"summary":"Hesap profili","security":[{"bearerAuth":[]}],"x-required-scope":"account:read","responses":{"200":{"description":"Hesap profili","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Account"},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/request-logs":{"get":{"operationId":"listApiRequestLogs","tags":["İstek kayıtları"],"summary":"API istek geçmişini listele","security":[{"bearerAuth":[]}],"x-required-scope":"api-logs:read","description":"Yalnız bu hesaba ait kimliği doğrulanmış istekler döner. Kayıtlar 90 güne veya hesap başına en yeni 100.000 kayda kadar saklanır.","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Bir sayfadaki en fazla kayıt sayısı."},{"in":"query","name":"before","schema":{"type":"string","pattern":"^[1-9][0-9]*$"},"description":"Önceki yanıttaki meta.next_cursor değeri."},{"in":"query","name":"key_id","schema":{"type":"integer","minimum":1}},{"in":"query","name":"method","schema":{"type":"string","enum":["GET","POST","PATCH","PUT","DELETE","HEAD","OPTIONS"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["success","client_error","server_error"]}},{"in":"query","name":"path","schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"İstek kayıtları","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/RequestLog"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"400":{"description":"Geçersiz filtre","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/servers":{"get":{"operationId":"listServers","tags":["Sunucular"],"summary":"Sunucuları listele","security":[{"bearerAuth":[]}],"x-required-scope":"servers:read","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Bir sayfadaki en fazla kayıt sayısı."},{"in":"query","name":"before","schema":{"type":"string","pattern":"^[1-9][0-9]*$"},"description":"Önceki yanıttaki meta.next_cursor değeri."}],"responses":{"200":{"description":"Sunucu listesi","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Server"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/servers/{serverId}":{"get":{"operationId":"getServer","tags":["Sunucular"],"summary":"Sunucu ayrıntısı","security":[{"bearerAuth":[]}],"x-required-scope":"servers:read","parameters":[{"in":"path","name":"serverId","required":true,"description":"Müşteriye ait sunucu kimliği.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Sunucu ayrıntısı","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Server"},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/servers/{serverId}/status":{"get":{"operationId":"getServerStatus","tags":["Sunucular"],"summary":"Canlı sunucu durumu","security":[{"bearerAuth":[]}],"x-required-scope":"servers:read","parameters":[{"in":"path","name":"serverId","required":true,"description":"Müşteriye ait sunucu kimliği.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Canlı durum","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":true},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/servers/{serverId}/actions":{"post":{"operationId":"performServerPowerAction","tags":["Sunucular"],"summary":"Minecraft güç işlemi","security":[{"bearerAuth":[]}],"x-required-scope":"servers:power","parameters":[{"in":"path","name":"serverId","required":true,"description":"Müşteriye ait sunucu kimliği.","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["action"],"properties":{"action":{"type":"string","enum":["start","stop","restart"]}}},"examples":{"restart":{"value":{"action":"restart"}}}}}},"responses":{"200":{"description":"İşlem tamamlandı","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":true},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"400":{"description":"Desteklenmeyen işlem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Sunucu hazır değil veya başka işlem sürüyor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Sunucu askıda","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/invoices":{"get":{"operationId":"listInvoices","tags":["Faturalar"],"summary":"Faturaları listele","security":[{"bearerAuth":[]}],"x-required-scope":"invoices:read","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Bir sayfadaki en fazla kayıt sayısı."},{"in":"query","name":"before","schema":{"type":"string","pattern":"^[1-9][0-9]*$"},"description":"Önceki yanıttaki meta.next_cursor değeri."}],"responses":{"200":{"description":"Fatura listesi","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/invoices/{invoiceId}":{"get":{"operationId":"getInvoice","tags":["Faturalar"],"summary":"Fatura ayrıntısı","security":[{"bearerAuth":[]}],"x-required-scope":"invoices:read","parameters":[{"in":"path","name":"invoiceId","required":true,"description":"Müşteriye ait fatura kimliği.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Fatura ayrıntısı","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Invoice"},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/notifications":{"get":{"operationId":"listNotifications","tags":["Bildirimler"],"summary":"Bildirimleri listele","security":[{"bearerAuth":[]}],"x-required-scope":"notifications:read","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Bir sayfadaki en fazla kayıt sayısı."},{"in":"query","name":"before","schema":{"type":"string","pattern":"^[1-9][0-9]*$"},"description":"Önceki yanıttaki meta.next_cursor değeri."},{"in":"query","name":"unread","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Bildirim listesi","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/notifications/{notificationId}/read":{"patch":{"operationId":"markNotificationRead","tags":["Bildirimler"],"summary":"Bildirimi okundu işaretle","security":[{"bearerAuth":[]}],"x-required-scope":"notifications:write","parameters":[{"in":"path","name":"notificationId","required":true,"description":"Müşteriye ait bildirim kimliği.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Bildirim güncellendi","content":{"application/json":{"schema":{"type":"object","required":["success","data","request_id"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"integer"},"is_read":{"type":"boolean","const":true}}},"request_id":{"type":["string","null"],"description":"Destek taleplerinde paylaşılabilen istek kimliği."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}},"x-scopes":{"account:read":"Hesap profilini okur.","api-logs:read":"Hesaba ait API istek geçmişini okur.","servers:read":"Sunucuları ve canlı durumlarını okur.","servers:power":"Minecraft sürecini başlatır, durdurur veya yeniden başlatır.","invoices:read":"Hesaba ait faturaları okur.","notifications:read":"Hesaba ait bildirimleri okur.","notifications:write":"Bildirimleri okundu olarak işaretler."},"x-rate-limits":{"per_key":{"reads_per_minute":120,"mutations_per_minute":20},"per_account":{"reads_per_minute":180,"mutations_per_minute":30},"power_actions":{"per_account_per_minute":6,"same_server_cooldown_seconds":10}}}