Skip to content

Commit

Permalink
feat(case counters): document new system/information API (#192)
Browse files Browse the repository at this point in the history
Date are now returned (in the new API) as timestamps, which is better that way.

Relates to https://bonitasoft.atlassian.net/browse/BPM-242
  • Loading branch information
educhastenier authored Sep 19, 2024
1 parent 26f8ad3 commit 93ade3f
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 3 deletions.
62 changes: 62 additions & 0 deletions openapi/components/schemas/SystemInformation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
type: object
description: ""
properties:
licenseStartDate:
description: "date in milliseconds timestamp since Epoch - first day (included) of license file validity - Subscription editions only"
type: string
duration:
description: "number of days for license file validity - Subscription editions only"
type: string
licenseExpirationDate:
description: "date in milliseconds timestamp since Epoch - last day (included) of license file validity - Subscription editions only"
type: string
numberOfCPUCores:
description: "number of CPUs allowed by the license, if license mode is CPU-based - Subscription editions only"
type: string
edition:
description: "name of the Bonita edition enabled by the license - Community & Subscription editions"
type: string
subscriptionType:
description: "type of the Subscription the customer has purchased with Bonitasoft - Subscription editions only"
type: string
licenseMode:
description: "available mode enabled by the license - Subscription editions only"
type: string
managedAppsLimit:
description: "number of managed apps provisioned for in a Bonita Central environment - Subscription editions only"
type: integer
format: int64
licensee:
description: "Owner of the license - Subscription editions only"
type: string
contactInfo:
description: "E-mail address of the owner of the license - Subscription editions only"
type: string
expirationDate:
description: "License expiration date in milliseconds timestamp since Epoch - Subscription editions only"
type: integer
format: int64
activeFeatures:
description: "List of active features that the license allow access to (separated by comma) - Subscription editions only"
type: string

requestKey:
description: |
request key to use to generate a new license on the customer portal.
If you have a subscription that specifies case-counter licensing, additional fields are present:
type: string
subscriptionStartPeriod:
description: "date in milliseconds timestamp since Epoch - first day (included) of current period for number of process instances provisioned - Subscription editions only"
type: string
subscriptionEndPeriod:
description: "date in milliseconds timestamp since Epoch - last day (included) of current period for number of process instances provisioned - Subscription editions only"
type: string
caseCounterLimit:
description: "number of maximum process instances that can be started - Community & Subscription editions"
type: integer
format: int64
caseCounter:
description: "number of consumed process instances - Community & Subscription editions"
type: integer
format: int64
8 changes: 8 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ x-tagGroups:
- PlatformTenant
- Tenant
- License
- Information

- name: Portal
tags:
Expand Down Expand Up @@ -274,6 +275,11 @@ tags:
- name: I18ntranslation
x-displayName: I18nTranslation
description: I18nTranslation
- name: Information
x-displayName: Information
description: |
Handle the platform information.
This Web REST API is available since version 10.2 (2024.3). Most of the information returned is only for Subscription editions.
- name: License
x-displayName: License
description: |
Expand Down Expand Up @@ -657,6 +663,8 @@ paths:
$ref: './paths/API@system@tenant@{id}.yaml'
/API/system/maintenance:
$ref: './paths/API@[email protected]'
/API/system/information:
$ref: './paths/API@[email protected]'
/API/system/license/unusedid:
$ref: './paths/API@system@[email protected]'
/APIv2/service/install:
Expand Down
4 changes: 3 additions & 1 deletion openapi/paths/API@[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ get:
tags:
- License
summary: Get the platform License
deprecated: true
description: |
Returns the current platform License.
This requires a platform session. Log in using the platform login service.
Warning: Since Bonita 10.2 (2024.3), this API is deprecated: use the API `GET /system/information` instead.
operationId: getPlatformLicense
responses:
'200':
description: "Success "
description: "Success"
content:
application/json:
schema:
Expand Down
28 changes: 28 additions & 0 deletions openapi/paths/API@[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
get:
tags:
- Information
summary: Get the system information
description: |
Returns system information details of the platform.
Requires to be logged in as a user having the Admin profile.
operationId: getSystemInformation
x-codeSamples:
- lang: "Shell"
label: "Curl"
source: |
curl -b saved_cookies.txt -X GET --url 'http://localhost:8080/bonita/API/system/information'
responses:
'200':
description: "Success"
content:
application/json:
schema:
$ref: '../components/schemas/SystemInformation.yaml'
'401':
$ref: '../components/responses/Unauthorized.yaml'
'403':
$ref: '../components/responses/Forbidden.yaml'
'400':
$ref: '../components/responses/BadRequest.yaml'
'5XX':
$ref: '../components/responses/ServerError.yaml'
5 changes: 3 additions & 2 deletions openapi/paths/API@system@[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ get:
- License
summary: Get the current server license
description: |
Returns license information for the current server
Returns license information for the current server. Requires to be logged in as a tenant technical administrator.
The same information can be retrieved as a user having simply the Admin profile through the API `GET /system/information`.
operationId: getLicense
responses:
'200':
description: "Success "
description: "Success"
content:
application/json:
schema:
Expand Down

0 comments on commit 93ade3f

Please sign in to comment.