{"openapi":"3.0.4","info":{"title":"ABT.Store – Management API","description":"Management API for management and maintenance purposes.","version":"v1"},"paths":{"/api/management/blacklist/count":{"get":{"tags":["Blacklist"],"summary":"Returns the total count of blacklisted mediums.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"integer","format":"int64"}},"application/json":{"schema":{"type":"integer","format":"int64"}},"text/json":{"schema":{"type":"integer","format":"int64"}}}}}}},"/api/management/blacklist":{"get":{"tags":["Blacklist"],"summary":"Returns all blacklisted mediums.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BlacklistedMediumDto"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BlacklistedMediumDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BlacklistedMediumDto"}}}}}}},"post":{"tags":["Blacklist"],"summary":"Adds a medium to the blacklist.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddToBlacklistDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/AddToBlacklistDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/AddToBlacklistDto"}}}},"responses":{"201":{"description":"Medium successfully blacklisted."},"409":{"description":"Medium is already blacklisted.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/management/blacklist/{mediumId}":{"get":{"tags":["Blacklist"],"summary":"Checks whether a medium is blacklisted.","parameters":[{"name":"mediumId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Medium is blacklisted – returns the blacklist entry.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/BlacklistedMediumDto"}},"application/json":{"schema":{"$ref":"#/components/schemas/BlacklistedMediumDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/BlacklistedMediumDto"}}}},"404":{"description":"Medium is not blacklisted.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Blacklist"],"summary":"Removes a medium from the blacklist.","parameters":[{"name":"mediumId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/management/blacklist/{mediumId}/comment":{"patch":{"tags":["Blacklist"],"summary":"Updates the comment of a blacklist entry.","parameters":[{"name":"mediumId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBlacklistCommentDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateBlacklistCommentDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateBlacklistCommentDto"}}}},"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/management/configuration":{"get":{"tags":["Configuration"],"summary":"Returns all configuration entries.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StoreConfig"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StoreConfig"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StoreConfig"}}}}}}}},"/api/management/configuration/{key}":{"get":{"tags":["Configuration"],"summary":"Returns a single configuration entry by key.","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/StoreConfig"}},"application/json":{"schema":{"$ref":"#/components/schemas/StoreConfig"}},"text/json":{"schema":{"$ref":"#/components/schemas/StoreConfig"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"patch":{"tags":["Configuration"],"summary":"Updates an existing configuration entry.","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}},"application/*+json":{"schema":{"type":"string"}}}},"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/management/entitlements/count":{"get":{"tags":["Entitlements"],"summary":"Returns the total count of entitlements.","parameters":[{"name":"From","in":"query","description":"Filter entitlements whose `StatusTime` is on or after this timestamp (inclusive).","schema":{"type":"string","format":"date-time"}},{"name":"To","in":"query","description":"Filter entitlements whose `StatusTime` is on or before this timestamp (inclusive).","schema":{"type":"string","format":"date-time"}},{"name":"ProductType","in":"query","description":"Filter by product type.","schema":{"type":"integer","format":"int32"}},{"name":"Status","in":"query","description":"Filter by entitlement status.","schema":{"$ref":"#/components/schemas/EntitlementStatus"}},{"name":"CcpOrgId","in":"query","description":"Filter by CCP organisation ID.","schema":{"type":"integer","format":"int32"}},{"name":"ExpiredOnly","in":"query","description":"If `true`, returns only entitlements whose `ExpirationTime` is in the past.\nIf `false`, returns only entitlements whose `ExpirationTime` is in the future or equal to now.\nIf `null`, no expiration filter is applied.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"integer","format":"int64"}},"application/json":{"schema":{"type":"integer","format":"int64"}},"text/json":{"schema":{"type":"integer","format":"int64"}}}}}}},"/api/management/entitlements":{"get":{"tags":["Entitlements"],"summary":"Get all entitlements with optional filters.","description":"Filterable by: status time range (from/to), product type, entitlement status, CCP org ID, expiration.\n\n\nFilter in the frontend instead: product number, registration authority ID, subject role/number.","parameters":[{"name":"From","in":"query","description":"Filter entitlements whose `StatusTime` is on or after this timestamp (inclusive).","schema":{"type":"string","format":"date-time"}},{"name":"To","in":"query","description":"Filter entitlements whose `StatusTime` is on or before this timestamp (inclusive).","schema":{"type":"string","format":"date-time"}},{"name":"ProductType","in":"query","description":"Filter by product type.","schema":{"type":"integer","format":"int32"}},{"name":"Status","in":"query","description":"Filter by entitlement status.","schema":{"$ref":"#/components/schemas/EntitlementStatus"}},{"name":"CcpOrgId","in":"query","description":"Filter by CCP organisation ID.","schema":{"type":"integer","format":"int32"}},{"name":"ExpiredOnly","in":"query","description":"If `true`, returns only entitlements whose `ExpirationTime` is in the past.\nIf `false`, returns only entitlements whose `ExpirationTime` is in the future or equal to now.\nIf `null`, no expiration filter is applied.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntitlementDto"}}}}}}}},"/api/management/inspections/count":{"get":{"tags":["Inspections"],"summary":"Returns the total count of inspections.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"integer","format":"int64"}},"application/json":{"schema":{"type":"integer","format":"int64"}},"text/json":{"schema":{"type":"integer","format":"int64"}}}}}}},"/api/management/inspections":{"get":{"tags":["Inspections"],"summary":"Get all inspections with optional filters.","description":"Filterable by: action timestamp range (from/to), inspection result.\n\n\nFilter in the frontend instead: terminal number, location number, operator ID.","parameters":[{"name":"From","in":"query","description":"Filter inspections whose `ActionTimeStamp` is on or after this timestamp (inclusive).","schema":{"type":"string","format":"date-time"}},{"name":"To","in":"query","description":"Filter inspections whose `ActionTimeStamp` is on or before this timestamp (inclusive).","schema":{"type":"string","format":"date-time"}},{"name":"Result","in":"query","description":"Filter by inspection result.","schema":{"$ref":"#/components/schemas/InspectionResult"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InspectionDto"}}}}}}}},"/api/management/mediums/count":{"get":{"tags":["Mediums"],"summary":"Returns the total count of mediums.","parameters":[{"name":"From","in":"query","description":"Filter mediums created/registered on or after this timestamp (inclusive).\nBased on `Medium.Time`.","schema":{"type":"string","format":"date-time"}},{"name":"To","in":"query","description":"Filter mediums created/registered on or before this timestamp (inclusive).\nBased on `Medium.Time`.","schema":{"type":"string","format":"date-time"}},{"name":"Type","in":"query","description":"Filter by medium type.","schema":{"type":"integer","format":"int32"}},{"name":"Status","in":"query","description":"Filter by medium status.","schema":{"$ref":"#/components/schemas/MediumStatus"}},{"name":"ExpiredOnly","in":"query","description":"If `true`, returns only mediums whose `ExpirationTime` is in the past.\nIf `false`, returns only mediums whose `ExpirationTime` is in the future or equal to now.\nIf `null`, no expiration filter is applied.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"integer","format":"int64"}},"application/json":{"schema":{"type":"integer","format":"int64"}},"text/json":{"schema":{"type":"integer","format":"int64"}}}}}}},"/api/management/mediums":{"get":{"tags":["Mediums"],"summary":"Get all mediums with optional filters.","description":"Filterable by: registration time range (from/to), medium type, medium status, expiration.\n\n\nFilter in the frontend instead: medium number, CcpOrgId (use the per-medium route).","parameters":[{"name":"From","in":"query","description":"Filter mediums created/registered on or after this timestamp (inclusive).\nBased on `Medium.Time`.","schema":{"type":"string","format":"date-time"}},{"name":"To","in":"query","description":"Filter mediums created/registered on or before this timestamp (inclusive).\nBased on `Medium.Time`.","schema":{"type":"string","format":"date-time"}},{"name":"Type","in":"query","description":"Filter by medium type.","schema":{"type":"integer","format":"int32"}},{"name":"Status","in":"query","description":"Filter by medium status.","schema":{"$ref":"#/components/schemas/MediumStatus"}},{"name":"ExpiredOnly","in":"query","description":"If `true`, returns only mediums whose `ExpirationTime` is in the past.\nIf `false`, returns only mediums whose `ExpirationTime` is in the future or equal to now.\nIf `null`, no expiration filter is applied.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MediumDto"}}}}}}}}},"components":{"schemas":{"AddToBlacklistDto":{"required":["mediumId","reason"],"type":"object","properties":{"mediumId":{"type":"string","nullable":true},"reason":{"$ref":"#/components/schemas/BlacklistReason"},"comment":{"type":"string","nullable":true}},"additionalProperties":false},"BlacklistReason":{"enum":[1,2,3,99],"type":"integer","format":"int32"},"BlacklistedMediumDto":{"required":["blacklistedAt","mediumExists","mediumId","reason"],"type":"object","properties":{"mediumId":{"type":"string","nullable":true},"reason":{"$ref":"#/components/schemas/BlacklistReason"},"comment":{"type":"string","nullable":true},"blacklistedAt":{"type":"string","format":"date-time"},"mediumExists":{"type":"boolean"}},"additionalProperties":false},"EntitlementDto":{"required":["areaOfValidity","entitlementEffectiveTime","entitlementExpirationTime","entitlementID","entitlementStatus","entitlementStatusTime","infoText","productID"],"type":"object","properties":{"entitlementID":{"$ref":"#/components/schemas/EntitlementIdDto"},"entitlementStatus":{"$ref":"#/components/schemas/EntitlementStatus"},"entitlementStatusTime":{"type":"integer","format":"int64"},"productID":{"$ref":"#/components/schemas/EntitlementProductIdDto"},"entitlementEffectiveTime":{"type":"integer","format":"int64"},"entitlementExpirationTime":{"type":"integer","format":"int64"},"areaOfValidity":{"type":"string","nullable":true},"infoText":{"type":"string","nullable":true}},"additionalProperties":false},"EntitlementIdDto":{"required":["ccpOrgID","entitlementIssuerCounter","samID"],"type":"object","properties":{"ccpOrgID":{"type":"integer","format":"int32"},"samID":{"$ref":"#/components/schemas/EntitlementSamIdDto"},"entitlementIssuerCounter":{"type":"integer","format":"int32"}},"additionalProperties":false},"EntitlementProductIdDto":{"required":["productNumber","productOwnerID","productType"],"type":"object","properties":{"productOwnerID":{"type":"integer","format":"int32"},"productType":{"type":"integer","format":"int32"},"productNumber":{"type":"integer","format":"int32"}},"additionalProperties":false},"EntitlementSamIdDto":{"required":["registrationAuthorityID","subjectNumber","subjectRole"],"type":"object","properties":{"registrationAuthorityID":{"type":"integer","format":"int32"},"subjectRole":{"type":"string","nullable":true},"subjectNumber":{"type":"string","nullable":true}},"additionalProperties":false},"EntitlementStatus":{"enum":[5,7,19],"type":"integer","format":"int32"},"InspectionDto":{"required":["actionOperatorId","actionTimeStamp","inspectionResult","location","operatorID","terminalID"],"type":"object","properties":{"actionOperatorId":{"type":"integer","format":"int32"},"terminalID":{"$ref":"#/components/schemas/InspectionTerminalIdDto"},"actionTimeStamp":{"type":"integer","format":"int64"},"location":{"$ref":"#/components/schemas/InspectionLocationDto"},"inspectionResult":{"$ref":"#/components/schemas/InspectionResult"},"operatorID":{"type":"integer","format":"int32"}},"additionalProperties":false},"InspectionLocationDto":{"required":["locationNumber","locationTypeCode","orgID"],"type":"object","properties":{"orgID":{"type":"integer","format":"int32"},"locationTypeCode":{"type":"integer","format":"int32"},"locationNumber":{"type":"integer","format":"int32"}},"additionalProperties":false},"InspectionResult":{"enum":[1,2,3],"type":"integer","format":"int32"},"InspectionTerminalIdDto":{"required":["deviceType","orgID","terminalNumber"],"type":"object","properties":{"orgID":{"type":"integer","format":"int32"},"deviceType":{"type":"integer","format":"int32"},"terminalNumber":{"type":"integer","format":"int32"}},"additionalProperties":false},"MediumDto":{"required":["mediumEffectiveTime","mediumExpirationTime","mediumID","mediumStatus","mediumStatusTime","mediumTime","mediumType"],"type":"object","properties":{"mediumID":{"$ref":"#/components/schemas/MediumIdDto"},"mediumStatus":{"$ref":"#/components/schemas/MediumStatus"},"mediumStatusTime":{"type":"string","format":"date-time"},"mediumType":{"type":"integer","format":"int32"},"mediumTime":{"type":"integer","format":"int64"},"mediumEffectiveTime":{"type":"integer","format":"int64"},"mediumExpirationTime":{"type":"integer","format":"int64"}},"additionalProperties":false},"MediumIdDto":{"required":["ccpOrgID","mediumNumber"],"type":"object","properties":{"ccpOrgID":{"type":"integer","format":"int32"},"mediumNumber":{"type":"integer","format":"int32"}},"additionalProperties":false},"MediumStatus":{"enum":[5,7,19,88],"type":"integer","format":"int32"},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}},"StoreConfig":{"required":["key","value"],"type":"object","properties":{"key":{"maxLength":128,"type":"string","nullable":true},"value":{"maxLength":512,"type":"string","nullable":true}},"additionalProperties":false,"description":"A key-value store for runtime-configurable application settings."},"UpdateBlacklistCommentDto":{"type":"object","properties":{"comment":{"type":"string","nullable":true}},"additionalProperties":false}}}}