{"openapi":"3.1.0","info":{"title":"Pseudonym Service","contact":{"url":"https://www.zorgttp.nl"},"version":"1.9.1"},"servers":[{"url":"/","description":"Default current server"},{"url":"http://127.0.0.1:8080/","description":"Local development server"},{"url":"https://zps.test.zorgttp.subsecondsolutions.com/","description":"Test server"}],"paths":{"/api/volatile-pseudonymizations":{"post":{"tags":["volatile-pseudonym-controller"],"summary":"Create volatile pseudonyms","description":"Create volatile pseudonyms from PII","operationId":"createPseudonym","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolatilePseudonymizationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VolatilePseudonymizationResult"}}}}},"security":[{"security_auth":[]}]}},"/api/volatile-pseudonymizations/from-hash":{"post":{"tags":["volatile-pseudonym-controller"],"summary":"Create volatile pseudonyms","description":"Create volatile pseudonyms from hash pseudonyms","operationId":"createPseudonymsFromFirstOrder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolatileFromFirstOrderPseudonymizationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VolatileFromFirstOrderPseudonymizationResult"}}}}},"security":[{"security_auth":[]}]}},"/api/state":{"post":{"tags":["state-controller"],"summary":"Service state information","description":"Show service state","operationId":"show","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceStateRequest"},"examples":{"State request example":{"description":"State request example","value":"{\"canary\"=\"Gele Kanarie\"}"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ServiceStateResult"}}}}},"security":[{"security_auth":[]}]}},"/api/pseudonymizations":{"post":{"tags":["pseudonym-controller"],"summary":"Create pseudonym","description":"Create pseudonym","operationId":"createPseudonym_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PseudonymizationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PseudonymizationResult"}}}}},"security":[{"security_auth":[]}]}},"/api/pseudonymizations/volatile":{"post":{"tags":["pseudonym-controller"],"summary":"Create volatile from definitive pseudonyms","description":"Create volatile from definitive pseudonyms","operationId":"createVolatile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PseudonymToVolatileRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PseudonymToVolatileResult"}}}}},"security":[{"security_auth":[]}]}},"/api/loadkey":{"post":{"tags":["key-controller"],"summary":"Key management","description":"Load key part","operationId":"loadKeyPart","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadKeyPartRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LoadKeyPartResult"}}}}},"security":[{"security_auth":[]}]}},"/api/metrics":{"get":{"tags":["metrics-controller"],"summary":"Service metrics","description":"Show current metric values","operationId":"get","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"security_auth":[]}]}},"/api/metering":{"get":{"tags":["metering-controller"],"summary":"Metering data","description":"Load metering data","operationId":"report","parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"security_auth":[]}]}},"/api/heartbeat":{"get":{"tags":["heartbeat-controller"],"summary":"Service state information","description":"Show service state","operationId":"show_1","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatResult"}}}}},"security":[{"security_auth":[]}]}}},"components":{"schemas":{"VolatilePseudonymizationRequest":{"type":"object","description":"Generate pseudonym","properties":{"pseudonymTypes":{"type":"array","items":{"type":"string"}},"records":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}},"required":["pseudonymTypes","records"]},"PseudonymizationStatistics":{"type":"object","properties":{"pseudonymTotal":{"type":"integer","format":"int32"},"errorTotal":{"type":"integer","format":"int32"},"speed":{"type":"integer","format":"int32"},"runTimeMillis":{"type":"integer","format":"int64","writeOnly":true}}},"ValidationDescription":{"type":"object","properties":{"field":{"type":"string"},"content":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"code":{"type":"integer","format":"int32"},"fatal":{"type":"boolean"},"sourceRef":{"type":"string"},"additionalSourceRef":{"type":"string"},"errorMsg":{"type":"string"}}},"VolatilePseudonymizationResult":{"type":"object","properties":{"statistics":{"$ref":"#/components/schemas/PseudonymizationStatistics"},"records":{"type":"array","items":{"$ref":"#/components/schemas/VolatilePseudonymizationResultRecord"}}},"required":["records","statistics"]},"VolatilePseudonymizationResultRecord":{"type":"object","properties":{"pseudonyms":{"type":"object","additionalProperties":{"type":"string"}},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/ValidationDescription"}}},"required":["diagnostics","pseudonyms"]},"FirstOrderPseudonymRecord":{"type":"object","properties":{"pseudonyms":{"type":"array","items":{"type":"string"}}},"required":["pseudonyms"]},"VolatileFromFirstOrderPseudonymizationRequest":{"type":"object","description":"Generate pseudonym","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/FirstOrderPseudonymRecord"}}},"required":["records"]},"VolatileFromFirstOrderPseudonymizationResult":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/VolatilePseudonymizationResultRecord"}},"statistics":{"$ref":"#/components/schemas/PseudonymizationStatistics"}},"required":["records","statistics"]},"ServiceStateRequest":{"type":"object","description":"Show service state","properties":{"canary":{"type":"string"}}},"HsmEncryptedValue":{"type":"object","properties":{"value":{"type":"string"},"alias":{"type":"string"}}},"ServiceStateResult":{"type":"object","properties":{"keyCompletedAt":{"type":"string","format":"date-time"},"aes":{"type":"string"},"hmac":{"type":"string"},"hsmEncryptedValue":{"$ref":"#/components/schemas/HsmEncryptedValue"},"started":{"type":"string","format":"date-time"},"canaryDigest":{"type":"string"},"secondsRemainingTillKeyLock":{"type":"integer","format":"int64"}}},"PseudonymizationRequest":{"type":"object","description":"Generate definitive pseudonym","properties":{"pseudonyms":{"type":"array","items":{"type":"string"}},"targetDomain":{"type":"string"}},"required":["pseudonyms","targetDomain"]},"PseudonymizationDiagnostic":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"field":{"type":"string"},"errorMsg":{"type":"string"},"content":{"type":"string"}}},"PseudonymizationResult":{"type":"object","properties":{"statistics":{"$ref":"#/components/schemas/PseudonymizationStatistics"},"records":{"type":"array","items":{"$ref":"#/components/schemas/PseudonymizationResultRecord"}}},"required":["records","statistics"]},"PseudonymizationResultRecord":{"type":"object","properties":{"pseudonym":{"type":"string"},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/PseudonymizationDiagnostic"}}}},"PseudonymToVolatileRequest":{"type":"object","description":"Generate volatile from definitive pseudonyms","properties":{"pseudonyms":{"type":"array","items":{"type":"string"}}},"required":["pseudonyms"]},"PseudonymToVolatileRecord":{"type":"object","properties":{"pseudonym":{"type":"string"}},"required":["pseudonym"]},"PseudonymToVolatileResult":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/PseudonymToVolatileRecord"}}}},"LoadKeyPartRequest":{"type":"object","properties":{"total":{"type":"integer","format":"int32","maximum":16,"minimum":1},"part":{"type":"string","maxLength":99,"minLength":1},"encoding":{"type":"string","enum":["UTF8","BASE64"]},"part_nr":{"type":"integer","format":"int32","maximum":16,"minimum":1}},"required":["encoding","part","part_nr","total"]},"LoadKeyPartResult":{"type":"object","properties":{"result":{"type":"string"}},"required":["result"]},"HeartbeatResult":{"type":"object","properties":{"apiVersion":{"type":"string"},"pseudonymTypes":{"type":"array","items":{"type":"string"}},"requestSize":{"$ref":"#/components/schemas/RequestSizeResult"},"endpoints":{"type":"object","additionalProperties":{"type":"boolean"}}},"required":["apiVersion","endpoints","pseudonymTypes","requestSize"]},"RequestSizeResult":{"type":"object","properties":{"volatileCreate":{"type":"integer","format":"int32"},"psCreate":{"type":"integer","format":"int32"}},"required":["psCreate","volatileCreate"]}},"securitySchemes":{"security_auth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}