ContentService ve VaultService API Referansı
CONTENT SERVICE (/api/content)
Admin Content Controller — /api/content/admin
Sites
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 1 | GET | /api/content/admin/sites | SystemAdmin | Site listesi |
| 2 | GET | /api/content/admin/sites/{id:guid} | SystemAdmin | Site detayı |
| 3 | POST | /api/content/admin/sites | SystemAdmin | Yeni site oluşturma |
| 4 | PUT | /api/content/admin/sites/{id:guid} | SystemAdmin | Site güncelleme |
| 5 | DELETE | /api/content/admin/sites/{id:guid} | SystemAdmin | Site silme |
POST/PUT Sites Request Body:
{
"tenantId": "Guid (required)",
"domain": "string (required)",
"isMaster": "boolean (required)",
"defaultLocale": "string (required)",
"themeConfig": "object | string (required, ThemeConfig JSON)",
"metadata": "object | string (required)",
"isActive": "boolean (required)"
}
Response (201 Created): { "id": "Guid" }
Site Theme
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 6 | GET | /api/content/admin/sites/{siteId}/theme | SystemAdmin | Tema config al |
| 7 | PUT | /api/content/admin/sites/{siteId}/theme | SystemAdmin | Tema güncelle |
| 8 | POST | /api/content/admin/sites/{siteId}/theme/preset | SystemAdmin | Preset uygula |
PUT Theme Body:
{
"primaryColor": "string",
"secondaryColor": "string",
"fontFamily": "string"
}
Pages
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 9 | GET | /api/content/admin/sites/{siteId}/pages | SystemAdmin | Sayfa ağacı |
| 10 | GET | /api/content/admin/sites/{siteId}/pages/validate-slug?slug=X&excludePageId=Y | SystemAdmin | Slug validasyonu |
| 11 | GET | /api/content/admin/sites/{siteId}/pages/{id:guid} | SystemAdmin | Sayfa detayı |
| 12 | POST | /api/content/admin/sites/{siteId}/pages | SystemAdmin | Yeni sayfa |
| 13 | PUT | /api/content/admin/sites/{siteId}/pages/{id:guid} | SystemAdmin | Sayfa güncelle |
| 14 | PATCH | /api/content/admin/sites/{siteId}/pages/{id:guid}/publish | SystemAdmin | Yayın durumunu toggle |
| 15 | DELETE | /api/content/admin/sites/{siteId}/pages/{id:guid} | SystemAdmin | Sayfa sil |
POST/PUT Pages Request Body:
{
"slug": "string (required)",
"pageType": "PageType enum (required)",
"parentId": "Guid | null",
"sortOrder": "int (required)",
"isPublished": "boolean (required)",
"settings": "string (required, JSON)"
}
Page Translations
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 16 | PUT | /api/content/admin/pages/{pageId}/translations/{locale} | SystemAdmin | Çeviri oluştur/güncelle |
| 17 | POST | /api/content/admin/pages/{pageId}/preview-token | SystemAdmin | Preview token |
PUT Translation Body:
{
"title": "string (required)",
"metaTitle": "string | null",
"metaDescription": "string | null",
"ogImageUrl": "string | null",
"contentBlocks": "string (required, JSON)"
}
Blog Posts
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 18 | POST | /api/content/admin/sites/{siteId}/blog | SystemAdmin | Yeni blog yazısı |
| 19 | GET | /api/content/admin/sites/{siteId}/blog?page=1&pageSize=20&category=X&tag=Y&isPublished=Z | SystemAdmin | Blog listesi (pagination) |
| 20 | GET | /api/content/admin/sites/{siteId}/blog/{postId:guid} | SystemAdmin | Blog detayı |
| 21 | PUT | /api/content/admin/sites/{siteId}/blog/{postId:guid} | SystemAdmin | Blog güncelle |
| 22 | DELETE | /api/content/admin/sites/{siteId}/blog/{postId:guid} | SystemAdmin | Blog sil |
POST/PUT Blog Body:
{
"slug": "string (required)",
"authorName": "string (required)",
"authorAvatarUrl": "string | null",
"featuredImageUrl": "string | null",
"category": "string (required)",
"tags": ["string[] (required)"],
"isPublished": "boolean (required)",
"publishedAt": "DateTimeOffset | null"
}
Blog Translations
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 23 | PUT | /api/content/admin/blog/{postId}/translations/{locale} | SystemAdmin | Blog çeviri oluştur/güncelle |
PUT Blog Translation Body:
{
"title": "string (required)",
"excerpt": "string | null",
"bodyHtml": "string (required)",
"bodyMarkdown": "string | null",
"metaTitle": "string | null",
"metaDescription": "string | null"
}
Forms
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 24 | GET | /api/content/admin/sites/{siteId}/forms?status=X&formType=Y&page=1&pageSize=20 | SystemAdmin | Form submissions listesi |
| 25 | GET | /api/content/admin/forms/{id:guid} | SystemAdmin | Tek form detayı |
| 26 | PATCH | /api/content/admin/forms/{id:guid}/status | SystemAdmin | Form durumu güncelle |
PATCH Form Status Body:
{
"status": "FormSubmissionStatus enum (required)",
"internalNotes": "string | null"
}
Media
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 27 | POST | /api/content/admin/sites/{siteId}/media/upload?folder=general | SystemAdmin | Medya yükle (multipart, max 10MB) |
| 28 | GET | /api/content/admin/sites/{siteId}/media?folder=X&page=1&pageSize=20 | SystemAdmin | Medya listesi |
| 29 | DELETE | /api/content/admin/media/{id:guid} | SystemAdmin | Medya sil |
| 30 | GET | /api/content/admin/media/{id:guid}/presigned?expiryMinutes=X | SystemAdmin | Presigned URL al |
POST Media (multipart):
File: IFormFile (required)Folder: string (optional, default "general")
Response: { "id": "Guid", "url": "string" }
Navigation & Cache
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 31 | GET | /api/content/admin/sites/{siteId}/navigation | SystemAdmin | Navigasyon menüleri (header/footer/sidebar) |
| 32 | PUT | /api/content/admin/sites/{siteId}/navigation/{location} | SystemAdmin | Navigasyon oluştur/güncelle |
| 33 | POST | /api/content/admin/cache/invalidate | SystemAdmin | Cache invalidasyonu |
Public Content Controller — /api/content/sites
| # | Method | Route | Auth | Cached | Description |
|---|---|---|---|---|---|
| 34 | GET | /api/content/sites/resolve?domain=X | None | 5min | Domain'den site çözme |
| 35 | GET | /api/content/sites/{siteId}/theme.css | None | 5min | Tema CSS (text/css) |
| 36 | GET | /api/content/sites/{siteId}/pages?locale=tr&parentSlug=X | None | 2min | Yayınlanmış sayfalar |
| 37 | GET | /api/content/sites/{siteId}/pages/{slug}?locale=tr&preview_token=X | None | 2min | Slug'dan sayfa detayı |
| 38 | GET | /api/content/sites/{siteId}/blog?locale=tr&page=1&pageSize=10&category=X&tag=Y | None | 2min | Yayınlanmış blog yazıları |
| 39 | GET | /api/content/sites/{siteId}/blog/{slug}?locale=tr | None | 2min | Tek blog yazısı detayı |
| 40 | POST | /api/content/sites/{siteId}/forms/submit | None (rate-limited) | - | Form submit |
VAULT SERVICE (/api/secrets)
SecretsQueryController
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 1 | GET | /api/secrets/{environment}/{key} | InternalAPI Key | Secret değeri al (şifrelenmiş değil, plain value) |
| 2 | GET | /api/secrets/{environment} | InternalAPI Key | Tüm secrets listesi (masked: ***) |
SecretsWriteController
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 3 | PUT | /api/secrets/{environment}/{key} | InternalAPI Key | Secret oluştur/güncelle |
PUT Body:
{ "value": "string (required)" }
SecretsDeleteController
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 4 | DELETE | /api/secrets/{environment}/{key} | InternalAPI Key + SystemAdmin | Secret sil (değer "__deleted__" olarak işaretlenir) |
SecretsSyncController
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 5 | POST | /api/secrets/sync/{environment} | InternalAPI Key + SystemAdmin | Env'den sync başlat (asenkron) |
Response: 202 Accepted