diff --git a/index.yml b/index.yml index 7be3ab4..19be01c 100644 --- a/index.yml +++ b/index.yml @@ -39,6 +39,10 @@ paths: $ref: "./p-transaction.yml#/paths/~1tag~1{tagId}~1transactions" /api/ping: $ref: "./p-ping.yml#/paths/~1ping" + /api/healthz: + $ref: "./p-healthcheck.yml#/paths/~1healthz" + /api/readyz: + $ref: "./p-healthcheck.yml#/paths/~1readyz" tags: - name: process @@ -75,6 +79,7 @@ x-tagGroups: tags: - process - transaction + - healthcheck - name: Models tags: - status_model diff --git a/p-healthcheck.yml b/p-healthcheck.yml new file mode 100644 index 0000000..f87cc2c --- /dev/null +++ b/p-healthcheck.yml @@ -0,0 +1,62 @@ +openapi: 3.0.3 + +paths: + /healthz: + parameters: + - $ref: "./common.yml#/components/parameters/x-request" + get: + summary: "Server healthcheck" + operationId: healthz + tags: + - healthcheck + responses: + 200: + description: "Device info" + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceInfo" + /readyz: + parameters: + - $ref: "./common.yml#/components/parameters/x-request" + get: + summary: "License healthcheck" + operationId: readyz + tags: + - healthcheck + responses: + 200: + description: "License is valid" + 400: + description: "License is not valid" + +components: + schemas: + DeviceInfo: + type: object + properties: + app: + type: string + licenseId: + type: string + licenseType: + type: string + licenseSerial: + type: string + licenseValidUntil: + type: string + format: date-time + scenarios: + type: array + items: + type: string + version: + type: string + example: + app: "Regula Document Reader Web API" + licenseId: "4D43A2AF-E321-496C-9A4E-5A8F3D26DF0E" + licenseType: "Transactional" + licenseSerial: "OL70786" + licenseValidUntil: "9999-12-31T23:59:59Z" + scenarios: ["Mrz", "Barcode", "Locate"] + version: "7.5.297907.1721" diff --git a/p-ping.yml b/p-ping.yml index 892af54..167aecc 100644 --- a/p-ping.yml +++ b/p-ping.yml @@ -8,8 +8,11 @@ paths: parameters: - $ref: "./common.yml#/components/parameters/x-request" get: + deprecated: true summary: "Server health check" operationId: ping + tags: + - healthcheck responses: 200: description: "Device info" @@ -44,4 +47,4 @@ components: license-id: "4d43a2af-e321-496c-9a4e-5a8f3d26df0e" license-serial: "OL70786" valid-until: "9999-12-31T23:59:59Z" - server-time: "2020-10-16 09:42:08.080713+00:00" + server-time: "2020-10-16 09:42:08.080713+00:00" \ No newline at end of file