> For the complete documentation index, see [llms.txt](https://vectis.liesware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vectis.liesware.com/self-test.md).

# Self Test

## GET /self-test/init

> Validate init key material

```json
{"openapi":"3.1.0","info":{"title":"Vectis HTTP API","version":"v1"},"tags":[{"name":"Self Test"}],"servers":[{"url":"http://127.0.0.1:3000","description":"Local default server over HTTP"},{"url":"https://127.0.0.1:3000","description":"Local HTTPS server when VECTIS_MODE=prod"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"KeyValidationOutput":{"type":"object","required":["timestamp","aad","hash","symmetric","eddsa","xecdh","ml-dsa","ml-kem"],"properties":{"timestamp":{"$ref":"#/components/schemas/Timestamp"},"aad":{"$ref":"#/components/schemas/TextField"},"hash":{"type":"object","required":["variant","value_hex"],"properties":{"variant":{"$ref":"#/components/schemas/HashAlgorithm"},"value_hex":{"$ref":"#/components/schemas/HexString"}}},"symmetric":{"$ref":"#/components/schemas/VariantValidation"},"eddsa":{"$ref":"#/components/schemas/VariantValidation"},"xecdh":{"$ref":"#/components/schemas/VariantValidation"},"ml-dsa":{"$ref":"#/components/schemas/VariantValidation"},"ml-kem":{"$ref":"#/components/schemas/VariantValidation"}}},"Timestamp":{"type":"string","pattern":"^[0-9]+$"},"TextField":{"type":"string","minLength":1,"pattern":"^[^\\x00-\\x1F\\x7F-\\x9F]+$"},"HashAlgorithm":{"enum":["BLAKE2b(160)","BLAKE2b(224)","BLAKE2b(256)","BLAKE2b(384)","BLAKE2b(512)","SHA-224","SHA-256","SHA-384","SHA-512","SHA-512-256","SHA-3(224)","SHA-3(256)","SHA-3(384)","SHA-3(512)","Whirlpool"]},"HexString":{"type":"string","pattern":"^[0-9a-fA-F]+$"},"VariantValidation":{"type":"object","required":["variant","valid"],"properties":{"variant":{"$ref":"#/components/schemas/TextField"},"valid":{"type":"boolean"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/TextField"}}}},"responses":{"Error":{"description":"Public error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/self-test/init":{"get":{"tags":["Self Test"],"summary":"Validate init key material","responses":{"200":{"description":"Init key material validation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyValidationOutput"}}}},"default":{"$ref":"#/components/responses/Error"}}}}}}
```

## GET /self-test/keys/{kid}

> Validate an operational key

```json
{"openapi":"3.1.0","info":{"title":"Vectis HTTP API","version":"v1"},"tags":[{"name":"Self Test"}],"servers":[{"url":"http://127.0.0.1:3000","description":"Local default server over HTTP"},{"url":"https://127.0.0.1:3000","description":"Local HTTPS server when VECTIS_MODE=prod"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"}},"parameters":{"Kid":{"name":"kid","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Kid"}}},"schemas":{"Kid":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"},"KeyValidationOutput":{"type":"object","required":["timestamp","aad","hash","symmetric","eddsa","xecdh","ml-dsa","ml-kem"],"properties":{"timestamp":{"$ref":"#/components/schemas/Timestamp"},"aad":{"$ref":"#/components/schemas/TextField"},"hash":{"type":"object","required":["variant","value_hex"],"properties":{"variant":{"$ref":"#/components/schemas/HashAlgorithm"},"value_hex":{"$ref":"#/components/schemas/HexString"}}},"symmetric":{"$ref":"#/components/schemas/VariantValidation"},"eddsa":{"$ref":"#/components/schemas/VariantValidation"},"xecdh":{"$ref":"#/components/schemas/VariantValidation"},"ml-dsa":{"$ref":"#/components/schemas/VariantValidation"},"ml-kem":{"$ref":"#/components/schemas/VariantValidation"}}},"Timestamp":{"type":"string","pattern":"^[0-9]+$"},"TextField":{"type":"string","minLength":1,"pattern":"^[^\\x00-\\x1F\\x7F-\\x9F]+$"},"HashAlgorithm":{"enum":["BLAKE2b(160)","BLAKE2b(224)","BLAKE2b(256)","BLAKE2b(384)","BLAKE2b(512)","SHA-224","SHA-256","SHA-384","SHA-512","SHA-512-256","SHA-3(224)","SHA-3(256)","SHA-3(384)","SHA-3(512)","Whirlpool"]},"HexString":{"type":"string","pattern":"^[0-9a-fA-F]+$"},"VariantValidation":{"type":"object","required":["variant","valid"],"properties":{"variant":{"$ref":"#/components/schemas/TextField"},"valid":{"type":"boolean"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/TextField"}}}},"responses":{"Error":{"description":"Public error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/self-test/keys/{kid}":{"get":{"tags":["Self Test"],"summary":"Validate an operational key","parameters":[{"$ref":"#/components/parameters/Kid"}],"responses":{"200":{"description":"Operational key validation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyValidationOutput"}}}},"default":{"$ref":"#/components/responses/Error"}}}}}}
```
