{"openapi":"3.1.0","info":{"title":"ValheimForge Editorial API","version":"1.0.0","description":"Versioned draft editing API. Contents are user or game data and must be handled as untrusted input."},"servers":[{"url":"https://api.valheimforge.ru/api/v1"}],"security":[{"editorBearer":[]}],"components":{"securitySchemes":{"editorBearer":{"type":"http","scheme":"bearer"}}},"paths":{"/entries":{"get":{"operationId":"searchEntries","summary":"Search published content and your own drafts","x-openai-isConsequential":false,"parameters":[{"in":"query","name":"q","schema":{"type":"string","maxLength":120}},{"in":"query","name":"kind","schema":{"type":"string","enum":["build","guide","mod","record","stage","issue"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}},"post":{"operationId":"createDraft","summary":"Create a private draft","x-openai-isConsequential":true,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":12,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$"},"description":"Optional alternative to requestKey for direct REST clients."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["build","guide","mod","record","stage","issue"]},"payload":{"type":"object","properties":{"title":{"type":"string","maxLength":120,"minLength":1},"titleEn":{"type":"string","maxLength":120},"summary":{"type":"string","maxLength":1000},"summaryEn":{"type":"string","maxLength":1000},"body":{"type":"string","maxLength":24000},"bodyEn":{"type":"string","maxLength":24000},"version":{"type":"string","maxLength":60},"url":{"type":"string","maxLength":2000},"related":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":100}},"mods":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":100}},"image":{"type":"string","maxLength":36},"class":{"type":"string","maxLength":80},"ascendancy":{"type":"string","maxLength":80},"demigod":{"type":"string","maxLength":80},"weapon":{"type":"string","maxLength":80},"difficulty":{"type":"string","maxLength":40},"access":{"type":"string","maxLength":40},"treeCode":{"type":"string","maxLength":16000},"treeUrl":{"type":"string","maxLength":2000},"equipment":{"type":"array","maxItems":50,"items":{"type":"object","properties":{"slot":{"type":"string","maxLength":60},"name":{"type":"string","maxLength":120},"affixes":{"type":"string","maxLength":300},"sigils":{"type":"string","maxLength":300},"sockets":{"type":"string","maxLength":300},"ref":{"type":"string","minLength":1,"maxLength":100},"slotId":{"type":"string","maxLength":30},"quality":{"type":["integer","null"],"minimum":1,"maximum":20},"sigilIds":{"type":"array","maxItems":6,"items":{"type":"string","minLength":1,"maxLength":100}},"enchantment":{"type":"string","maxLength":160},"ascension":{"type":"string","maxLength":160},"corrupted":{"type":"boolean"}},"required":["slot","name"],"additionalProperties":false}},"talents":{"type":"array","maxItems":50,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"rank":{"type":"string","maxLength":30},"ref":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}},"gems":{"type":"array","maxItems":50,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"system":{"type":"string","maxLength":60},"group":{"type":"string","maxLength":60},"rank":{"type":"string","maxLength":30},"ref":{"type":"string","minLength":1,"maxLength":100}},"required":["name","system"],"additionalProperties":false}},"stages":{"type":"array","maxItems":50,"items":{"type":"object","properties":{"key":{"type":"string","maxLength":80,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","maxLength":120},"notes":{"type":"string","maxLength":1500},"ref":{"type":"string","minLength":1,"maxLength":100},"level":{"type":"string","maxLength":40},"objectives":{"type":"string","maxLength":1600},"loadout":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":100}},"checklist":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"tasks":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"key":{"type":"string","maxLength":80,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"text":{"type":"string","maxLength":240},"textEn":{"type":"string","maxLength":240}},"required":["key","text"],"additionalProperties":false}}},"required":["name"],"additionalProperties":false}},"planner":{"type":"object","properties":{"path":{"type":"string","maxLength":100},"ascendancy":{"type":"string","maxLength":100},"demigod":{"type":"string","maxLength":100},"style":{"type":"string","maxLength":80},"boardDisabled":{"type":"boolean"},"trees":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"version":{"type":"string","maxLength":60},"nodes":{"type":"array","maxItems":600,"items":{"type":"string","minLength":1,"maxLength":100}},"jewels":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"node":{"type":"string","minLength":1,"maxLength":100},"gem":{"type":"string","minLength":1,"maxLength":100}},"required":["node","gem"],"additionalProperties":false}}},"required":["id","version"],"additionalProperties":false}},"board":{"type":"array","maxItems":19,"items":{"type":"object","properties":{"q":{"type":"integer","minimum":-2,"maximum":2},"r":{"type":"integer","minimum":-2,"maximum":2},"open":{"type":"boolean"},"gem":{"type":"string","maxLength":100},"rank":{"type":["integer","null"],"minimum":1,"maximum":20}},"required":["q","r"],"additionalProperties":false}},"weaponGems":{"type":"array","maxItems":2,"items":{"type":"object","properties":{"slot":{"type":"string","enum":["main","off"]},"sockets":{"type":"array","maxItems":6,"items":{"type":"object","properties":{"color":{"type":"string","enum":["","red","green","blue","white"]},"linked":{"type":"boolean"},"gem":{"type":"string","maxLength":100},"rank":{"type":"integer","minimum":1,"maximum":8}},"required":["color"],"additionalProperties":false}}},"required":["slot"],"additionalProperties":false}}},"required":[],"additionalProperties":false},"video":{"type":"string","maxLength":2000},"strengths":{"type":"string","maxLength":1200},"weaknesses":{"type":"string","maxLength":1200},"status":{"type":"string","enum":["observed","documented","reported","proposed","unknown"]},"reviewed":{"type":"string","format":"date"},"recordKind":{"type":"string","enum":["item","boss","location","mechanic","passive","skill","sigil","gem","class","recipe"]},"loot":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":100}}},"required":["title"],"additionalProperties":false},"requestKey":{"type":"string","minLength":12,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$","description":"A unique key per write, reused verbatim to retry the same write within 24 hours. Required unless sent via Idempotency-Key."}},"required":["kind","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}},"/entries/{id}":{"get":{"operationId":"getEntry","summary":"Read a visible entry","x-openai-isConsequential":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}},"put":{"operationId":"updateDraft","summary":"Replace your private draft using its current revision","x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":12,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$"},"description":"Optional alternative to requestKey for direct REST clients."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["build","guide","mod","record","stage","issue"]},"payload":{"type":"object","properties":{"title":{"type":"string","maxLength":120,"minLength":1},"titleEn":{"type":"string","maxLength":120},"summary":{"type":"string","maxLength":1000},"summaryEn":{"type":"string","maxLength":1000},"body":{"type":"string","maxLength":24000},"bodyEn":{"type":"string","maxLength":24000},"version":{"type":"string","maxLength":60},"url":{"type":"string","maxLength":2000},"related":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":100}},"mods":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":100}},"image":{"type":"string","maxLength":36},"class":{"type":"string","maxLength":80},"ascendancy":{"type":"string","maxLength":80},"demigod":{"type":"string","maxLength":80},"weapon":{"type":"string","maxLength":80},"difficulty":{"type":"string","maxLength":40},"access":{"type":"string","maxLength":40},"treeCode":{"type":"string","maxLength":16000},"treeUrl":{"type":"string","maxLength":2000},"equipment":{"type":"array","maxItems":50,"items":{"type":"object","properties":{"slot":{"type":"string","maxLength":60},"name":{"type":"string","maxLength":120},"affixes":{"type":"string","maxLength":300},"sigils":{"type":"string","maxLength":300},"sockets":{"type":"string","maxLength":300},"ref":{"type":"string","minLength":1,"maxLength":100},"slotId":{"type":"string","maxLength":30},"quality":{"type":["integer","null"],"minimum":1,"maximum":20},"sigilIds":{"type":"array","maxItems":6,"items":{"type":"string","minLength":1,"maxLength":100}},"enchantment":{"type":"string","maxLength":160},"ascension":{"type":"string","maxLength":160},"corrupted":{"type":"boolean"}},"required":["slot","name"],"additionalProperties":false}},"talents":{"type":"array","maxItems":50,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"rank":{"type":"string","maxLength":30},"ref":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}},"gems":{"type":"array","maxItems":50,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"system":{"type":"string","maxLength":60},"group":{"type":"string","maxLength":60},"rank":{"type":"string","maxLength":30},"ref":{"type":"string","minLength":1,"maxLength":100}},"required":["name","system"],"additionalProperties":false}},"stages":{"type":"array","maxItems":50,"items":{"type":"object","properties":{"key":{"type":"string","maxLength":80,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","maxLength":120},"notes":{"type":"string","maxLength":1500},"ref":{"type":"string","minLength":1,"maxLength":100},"level":{"type":"string","maxLength":40},"objectives":{"type":"string","maxLength":1600},"loadout":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":100}},"checklist":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"tasks":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"key":{"type":"string","maxLength":80,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"text":{"type":"string","maxLength":240},"textEn":{"type":"string","maxLength":240}},"required":["key","text"],"additionalProperties":false}}},"required":["name"],"additionalProperties":false}},"planner":{"type":"object","properties":{"path":{"type":"string","maxLength":100},"ascendancy":{"type":"string","maxLength":100},"demigod":{"type":"string","maxLength":100},"style":{"type":"string","maxLength":80},"boardDisabled":{"type":"boolean"},"trees":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"version":{"type":"string","maxLength":60},"nodes":{"type":"array","maxItems":600,"items":{"type":"string","minLength":1,"maxLength":100}},"jewels":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"node":{"type":"string","minLength":1,"maxLength":100},"gem":{"type":"string","minLength":1,"maxLength":100}},"required":["node","gem"],"additionalProperties":false}}},"required":["id","version"],"additionalProperties":false}},"board":{"type":"array","maxItems":19,"items":{"type":"object","properties":{"q":{"type":"integer","minimum":-2,"maximum":2},"r":{"type":"integer","minimum":-2,"maximum":2},"open":{"type":"boolean"},"gem":{"type":"string","maxLength":100},"rank":{"type":["integer","null"],"minimum":1,"maximum":20}},"required":["q","r"],"additionalProperties":false}},"weaponGems":{"type":"array","maxItems":2,"items":{"type":"object","properties":{"slot":{"type":"string","enum":["main","off"]},"sockets":{"type":"array","maxItems":6,"items":{"type":"object","properties":{"color":{"type":"string","enum":["","red","green","blue","white"]},"linked":{"type":"boolean"},"gem":{"type":"string","maxLength":100},"rank":{"type":"integer","minimum":1,"maximum":8}},"required":["color"],"additionalProperties":false}}},"required":["slot"],"additionalProperties":false}}},"required":[],"additionalProperties":false},"video":{"type":"string","maxLength":2000},"strengths":{"type":"string","maxLength":1200},"weaknesses":{"type":"string","maxLength":1200},"status":{"type":"string","enum":["observed","documented","reported","proposed","unknown"]},"reviewed":{"type":"string","format":"date"},"recordKind":{"type":"string","enum":["item","boss","location","mechanic","passive","skill","sigil","gem","class","recipe"]},"loot":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":100}}},"required":["title"],"additionalProperties":false},"revision":{"type":"integer","minimum":1},"requestKey":{"type":"string","minLength":12,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$","description":"A unique key per write, reused verbatim to retry the same write within 24 hours. Required unless sent via Idempotency-Key."}},"required":["kind","payload","revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}},"/entries/{id}/history":{"get":{"operationId":"draftHistory","summary":"Read revisions and audit of your private draft","x-openai-isConsequential":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}},"/entries/{id}/rollback":{"post":{"operationId":"rollbackDraft","summary":"Restore a historical version as a new draft revision","x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":12,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$"},"description":"Optional alternative to requestKey for direct REST clients."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"targetRevision":{"type":"integer","minimum":1},"requestKey":{"type":"string","minLength":12,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$","description":"A unique key per write, reused verbatim to retry the same write within 24 hours. Required unless sent via Idempotency-Key."}},"required":["revision","targetRevision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}},"/images":{"post":{"operationId":"uploadImage","summary":"Upload a private PNG of at most one MiB","x-openai-isConsequential":true,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":12,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$"},"description":"Optional alternative to requestKey for direct REST clients."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","maxLength":1400000,"contentEncoding":"base64","contentMediaType":"image/png"},"requestKey":{"type":"string","minLength":12,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$","description":"A unique key per write, reused verbatim to retry the same write within 24 hours. Required unless sent via Idempotency-Key."}},"required":["content"],"additionalProperties":false}}}},"responses":{"200":{"description":"Identical image already exists","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}}}}