mgr-tenant-entitlements API (v1)

Tenant Entitlement Manager API

entitlement

create

Installs/enables application for tenant. Basic authorization is required to perform request (e.g. Authorization=Basic dXNlcjp1c2Vy).

query Parameters
tenantParameters
string

Parameters for tenant init

ignoreErrors
boolean
Default: false

If ignoreErrors is set to false then the rollback operation is enabled if one or more stages failed. If it set to true - stage rollbacks are disabled. Rollback will return the system to initial state:

  • All installed tenant modules will be uninstalled
  • All created Kong Gateway routes will be deleted for the application
  • All created Keycloak resources will be deleted for the application
async
boolean
Default: false

Enables asynchronous install operation

purgeOnRollback
boolean
Default: false

Defines if module data must be purged on rollback.

header Parameters
x-okapi-token
string

An OKAPI authentication token

Request Body schema: application/json
required
tenantId
required
string <uuid>

Tenant id

applications
required
Array of strings [ 1 .. 50 ] items

List of application ids

Responses

Request samples

Content type
application/json
{
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "applications": [
    ]
}

Response samples

Content type
application/json
{
  • "totalRecords": 0,
  • "flowId": "ccd52024-9c9c-4751-993a-9d75a778bf9d",
  • "entitlements": [
    ]
}

upgrade

Upgrades application (or install/enables) for tenant. Basic authorization is required to perform request (e.g. Authorization=Basic dXNlcjp1c2Vy).

query Parameters
tenantParameters
string

Parameters for tenant init

async
boolean
Default: false

Enables asynchronous install operation

header Parameters
x-okapi-token
string

An OKAPI authentication token

Request Body schema: application/json
required
tenantId
required
string <uuid>

Tenant id

applications
required
Array of strings [ 1 .. 50 ] items

List of application ids

Responses

Request samples

Content type
application/json
{
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "applications": [
    ]
}

Response samples

Content type
application/json
{
  • "totalRecords": 0,
  • "flowId": "ccd52024-9c9c-4751-993a-9d75a778bf9d",
  • "entitlements": [
    ]
}

findByQueryOrTenantName

Retrieves all the entitlement using query tools (CQL query, limit and offset parameters). Basic authorization is required to perform request (e.g. Authorization=Basic dXNlcjp1c2Vy).

query Parameters
query
string

A CQL query string with search conditions.

tenant
string

Tenant name to filter by.

includeModules
boolean
Default: false

Indicates if list of modules should be loaded for each entitlement.

limit
integer [ 0 .. 500 ]
Default: 10

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0

Skip over a number of elements by specifying an offset value for the query.

header Parameters
x-okapi-token
string

An OKAPI authentication token

Responses

Response samples

Content type
application/json
{
  • "totalRecords": 0,
  • "entitlements": [
    ]
}

delete

Delete application installation by id, when making request add basic authorization for an admin user (e.g. Basic YWRtaW46YWRtaW4=).

query Parameters
tenantParameters
string

Parameters for tenant init

ignoreErrors
boolean
Default: false

If ignoreErrors is set to false then the rollback operation is enabled if one or more stages failed. If it set to true - stage rollbacks are disabled. Rollback will return the system to initial state:

  • All installed tenant modules will be uninstalled
  • All created Kong Gateway routes will be deleted for the application
  • All created Keycloak resources will be deleted for the application
purge
boolean
Default: false

Defines if create by entitlement process resources must be purged, including:

  • Keycloak authorization resources (if integration is enabled)
  • Folio modules data (_tenant API request will be performed with parameter: purge=true) Kong routes will be removed in any case.
async
boolean
Default: false

Enables asynchronous install operation

header Parameters
x-okapi-token
string

An OKAPI authentication token

Request Body schema: application/json
required
tenantId
required
string <uuid>

Tenant id

applications
required
Array of strings [ 1 .. 50 ] items

List of application ids

Responses

Request samples

Content type
application/json
{
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "applications": [
    ]
}

Response samples

Content type
application/json
{
  • "totalRecords": 0,
  • "flowId": "ccd52024-9c9c-4751-993a-9d75a778bf9d",
  • "entitlements": [
    ]
}

entitlement-application

findEntitledApplicationsByTenantName

List of application descriptors entitled for the tenant

path Parameters
tenantName
required
string

Tenant name

query Parameters
limit
integer [ 0 .. 500 ]
Default: 10

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0

Skip over a number of elements by specifying an offset value for the query.

header Parameters
x-okapi-token
string

An OKAPI authentication token

x-okapi-tenant
required
string

An OKAPI tenant

Responses

Response samples

Content type
application/json
{
  • "applicationDescriptors": [
    ],
  • "totalRecords": 0
}

entitlement-module

getModuleEntitlements

Retrieve a list of module entitlements

path Parameters
moduleId
required
string

Module id

query Parameters
limit
integer [ 0 .. 500 ]
Default: 10

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{
  • "totalRecords": 0,
  • "entitlements": [
    ]
}

entitlement-validation

validate

Validates an entitlement request against a set of pre-configured validators that are also applied during the entitlement process or a single validator specified as a parameter.

query Parameters
entitlementType
required
string (Tenant Entitlement Type Schema)
Enum: "entitle" "revoke" "upgrade"

Entitlement type

validator
string

Name of entitlement validator to be applied. All existing validators will be applied if none specified

header Parameters
x-okapi-token
string

An OKAPI authentication token

Request Body schema: application/json
required
tenantId
required
string <uuid>

Tenant id

applications
required
Array of strings [ 1 .. 50 ] items

List of application ids

Responses

Request samples

Content type
application/json
{
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "applications": [
    ]
}

Response samples

Content type
application/json
{ }

flow

findFlows

Retrieves flows by CQL query

query Parameters
query
string

A CQL query string with search conditions.

limit
integer [ 0 .. 500 ]
Default: 10

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{
  • "totalRecords": 0,
  • "flows": [
    ]
}

getFlowById

Retrieves a flow by id

path Parameters
flowId
required
string <uuid>

A flow identifier

query Parameters
includeStages
boolean
Default: false

Defines if stages must be included in the response for entitlement/application flows

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "status": "queued",
  • "type": "entitle",
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "stages": [
    ],
  • "applicationFlows": [
    ]
}

findApplicationFlows

Retrieves an application entitlement flows by CQL query

query Parameters
query
string

A CQL query string with search conditions.

limit
integer [ 0 .. 500 ]
Default: 10

Limit the number of elements returned in the response.

offset
integer >= 0
Default: 0

Skip over a number of elements by specifying an offset value for the query.

Responses

Response samples

Content type
application/json
{
  • "totalRecords": 0,
  • "applicationFlows": [
    ]
}

getApplicationFlowById

Retrieves an entitlement flow per applicationId

path Parameters
applicationFlowId
required
string <uuid>

An application flow identifier

query Parameters
includeStages
boolean
Default: false

Defines if stages must be included in the response for entitlement/application flows

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "applicationId": "string",
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "flowId": "ccd52024-9c9c-4751-993a-9d75a778bf9d",
  • "type": "entitle",
  • "status": "queued",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "stages": [
    ]
}

getApplicationFlowStages

Retrieves entitlement stages by application id

path Parameters
applicationFlowId
required
string <uuid>

An application flow identifier

Responses

Response samples

Content type
application/json
{
  • "totalRecords": 0,
  • "stages": [
    ]
}

getApplicationFlowStageByName

Retrieves entitlement stages by application id

path Parameters
applicationFlowId
required
string <uuid>

An application flow identifier

stageName
required
string

An application stage name

Responses

Response samples

Content type
application/json
{
  • "flowId": "ccd52024-9c9c-4751-993a-9d75a778bf9d",
  • "name": "string",
  • "status": "queued",
  • "errorType": "string",
  • "errorMessage": "string",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "retriesCount": 0,
  • "retriesInfo": "string"
}

reinstall

appReinstall

Redo installation of apps' modules for tenant, even if they are already installed.

query Parameters
tenantParameters
string

Parameters for tenant init

header Parameters
x-okapi-token
string

An OKAPI authentication token

Request Body schema: application/json
required
tenantId
required
string <uuid>

Tenant id

applications
required
Array of strings [ 1 .. 25 ] items

List of application ids

Responses

Request samples

Content type
application/json
{
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "applications": [
    ]
}

Response samples

Content type
application/json
{
  • "entitlements": [
    ],
  • "errors": [
    ]
}

moduleReinstall

Redo installation of modules for tenant, even if they are already installed.

query Parameters
tenantParameters
string

Parameters for tenant init

header Parameters
x-okapi-token
string

An OKAPI authentication token

Request Body schema: application/json
required
tenantId
required
string <uuid>

Tenant id

applicationId
required
string

Application id

modules
required
Array of strings [ 1 .. 50 ] items

List of application ids

Responses

Request samples

Content type
application/json
{
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "applicationId": "string",
  • "modules": [
    ]
}

Response samples

Content type
application/json
{
  • "entitlements": [
    ],
  • "errors": [
    ]
}