{"openapi":"3.1.0","info":{"title":"DSH Universe API","version":"1.0.0","description":"Read-only dsh indexes and a service health endpoint.","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"}},"servers":[{"url":"https://preview-api.dshuniverse.com"}],"components":{"schemas":{"DshIndexV1":{"type":"object","properties":{"format":{"type":"number","enum":[1]},"title":{"type":"string","minLength":1},"generatedAt":{"type":"string","format":"date-time"},"plugins":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"versions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string","maxLength":256,"pattern":"^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$"},"publishTimestamp":{"type":"integer","minimum":0},"engines":{"type":"object","properties":{"dsh":{"type":"string"}},"required":["dsh"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["npm"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["git"]},"url":{"type":"string","format":"uri"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$/i"},"path":{"type":"string","maxLength":512,"pattern":"^[A-Za-z0-9@._-]+(?:\\/[A-Za-z0-9@._-]+)*$/u"}},"required":["type","url","commit"]}]}},"required":["version","publishTimestamp","source"]},"minItems":1},"x-dshu":{"type":"object","properties":{"id":{"type":"string","minLength":1},"tier":{"type":"string","enum":["listed","scanned","curated","flagged"]},"tierVersion":{"type":"string","minLength":1},"scannedAt":{"type":["string","null"],"format":"date-time"},"url":{"type":"string","format":"uri"},"categories":{"type":"array","items":{"type":"string"}},"capabilities":{"type":["array","null"],"items":{"type":"string","enum":["network","process","env","secret-paths","install-script","dynamic-code"]}}},"required":["id","tier","tierVersion","scannedAt","url","categories","capabilities"]}},"required":["name","versions","x-dshu"]}}},"required":["format","title","generatedAt","plugins"]}},"parameters":{}},"paths":{"/index.json":{"get":{"operationId":"getCuratedIndex","summary":"Get the curated index","description":"Returns the curated distribution index for dsh. Eligible scanned entries may be included according to the site configuration.","tags":["dsh indexes"],"parameters":[{"schema":{"type":"string","description":"The ETag from a previous response."},"required":false,"description":"The ETag from a previous response.","name":"If-None-Match","in":"header"}],"responses":{"200":{"description":"A dsh format 1 plugin index.","headers":{"ETag":{"description":"Validator for this representation of the index.","schema":{"type":"string"}},"Cache-Control":{"description":"The index can be cached for 30 seconds and must then be revalidated.","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"The index can be read from any origin.","schema":{"type":"string","const":"*"}},"Access-Control-Expose-Headers":{"description":"Allows browser clients to read the ETag and data license headers.","schema":{"type":"string"}},"Link":{"description":"The data license link with rel=\"license\".","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DshIndexV1"}}}},"304":{"description":"The index has not changed. No response body.","headers":{"ETag":{"description":"Validator for this representation of the index.","schema":{"type":"string"}},"Cache-Control":{"description":"The index can be cached for 30 seconds and must then be revalidated.","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"The index can be read from any origin.","schema":{"type":"string","const":"*"}},"Access-Control-Expose-Headers":{"description":"Allows browser clients to read the ETag and data license headers.","schema":{"type":"string"}},"Link":{"description":"The data license link with rel=\"license\".","schema":{"type":"string"}}}},"500":{"description":"The index is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/index.all.json":{"get":{"operationId":"getFullIndex","summary":"Get the full index","description":"Returns the full distribution index with public versions across all visible tiers. Check x-dshu.tier and x-dshu.capabilities before installing.","tags":["dsh indexes"],"parameters":[{"schema":{"type":"string","description":"The ETag from a previous response."},"required":false,"description":"The ETag from a previous response.","name":"If-None-Match","in":"header"}],"responses":{"200":{"description":"A dsh format 1 plugin index.","headers":{"ETag":{"description":"Validator for this representation of the index.","schema":{"type":"string"}},"Cache-Control":{"description":"The index can be cached for 30 seconds and must then be revalidated.","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"The index can be read from any origin.","schema":{"type":"string","const":"*"}},"Access-Control-Expose-Headers":{"description":"Allows browser clients to read the ETag and data license headers.","schema":{"type":"string"}},"Link":{"description":"The data license link with rel=\"license\".","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DshIndexV1"}}}},"304":{"description":"The index has not changed. No response body.","headers":{"ETag":{"description":"Validator for this representation of the index.","schema":{"type":"string"}},"Cache-Control":{"description":"The index can be cached for 30 seconds and must then be revalidated.","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"The index can be read from any origin.","schema":{"type":"string","const":"*"}},"Access-Control-Expose-Headers":{"description":"Allows browser clients to read the ETag and data license headers.","schema":{"type":"string"}},"Link":{"description":"The data license link with rel=\"license\".","schema":{"type":"string"}}}},"500":{"description":"The index is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/healthz":{"get":{"operationId":"getHealth","summary":"Check service availability","tags":["Service"],"responses":{"200":{"description":"The API Worker is responding.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"env":{"type":"string","enum":["local","preview","prod"]}},"required":["ok","env"]}}}},"429":{"description":"The per-client request limit has been reached.","headers":{"Retry-After":{"schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"webhooks":{}}