Okapi Core API Facade (v2.0)

Okapi Core API Facade

deployment

deployModuleInstance

Deploy (launch process, start a container, etc) instance of a particular service, according to the deployment descriptor.

Request Body schema: application/json
required
srvcId
required
string

The Module ID for the instance

instId
string

Instance ID (at least unique for node)

nodeId
string

Node ID where module is deployed

url
string

URL where module is deployed (not managed by Okapi)

descriptor
object (LaunchDescriptor)

Specifies how a module is deployed and undeployed

Responses

Request samples

Content type
application/json
{
  • "srvcId": "string",
  • "instId": "string",
  • "nodeId": "string",
  • "url": "string",
  • "descriptor": { }
}

Response samples

Content type
application/json
{
  • "srvcId": "string",
  • "instId": "string",
  • "nodeId": "string",
  • "url": "string",
  • "descriptor": { }
}

getAllDeployedModuleInstances

List all deployed instances

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getDeployedModuleInstance

Retrieve deployment descriptor for a particular instance

path Parameters
instance_id
required
string

Responses

Response samples

Content type
application/json
{
  • "srvcId": "string",
  • "instId": "string",
  • "nodeId": "string",
  • "url": "string",
  • "descriptor": { }
}

deleteDeployedModuleInstance

Shutdown instance

path Parameters
instance_id
required
string

Responses

discovery

createDiscovery

Register instance under a specified service id

Request Body schema: application/json
required
srvcId
required
string

The Module ID for the instance

instId
string

Instance ID (at least unique for node)

nodeId
string

Node ID where module is deployed

url
string

URL where module is deployed (not managed by Okapi)

descriptor
object (LaunchDescriptor)

Specifies how a module is deployed and undeployed

Responses

Request samples

Content type
application/json
{
  • "srvcId": "string",
  • "instId": "string",
  • "nodeId": "string",
  • "url": "string",
  • "descriptor": { }
}

Response samples

Content type
application/json
{
  • "srvcId": "string",
  • "instId": "string",
  • "nodeId": "string",
  • "url": "string",
  • "descriptor": { }
}

getAllDiscoveries

Return all instances

Responses

Response samples

Content type
application/json
[
  • {
    }
]

deleteAllDiscoveries

Delete all instances

Responses

getDiscoveriesByService

List all instances for a particular service

path Parameters
service_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

deleteDiscoveriesByService

Remove registration for a given instance

path Parameters
service_id
required
string

Responses

getDiscoveryByInstance

Get registration of a specified instance

path Parameters
instance_id
required
string
service_id
required
string

Responses

Response samples

Content type
application/json
{
  • "srvcId": "string",
  • "instId": "string",
  • "nodeId": "string",
  • "url": "string",
  • "descriptor": { }
}

deleteDiscoveryByInstance

Remove registration for a given instance

path Parameters
instance_id
required
string
service_id
required
string

Responses

getAllDiscoveryHealth

Get health info for all services

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getDiscoveryHealthByService

Health for all instances for a particular service

path Parameters
service_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getDiscoveryHealthByInstance

Get health for a particular instance

path Parameters
instance_id
required
string
service_id
required
string

Responses

Response samples

Content type
application/json
{
  • "srvcId": "string",
  • "instId": "string",
  • "healthMessage": "string",
  • "healthStatus": true
}

getAllDiscoveryNodes

Get list of all nodes

Responses

Response samples

Content type
application/json
[
  • {
    }
]

updateDiscoveryNode

Update descriptor of a particular node, only the name can be changed

path Parameters
node_id
required
string
Request Body schema: application/json
required
nodeId
required
string

Node ID

url
required
string

Host:port for for this node

nodeName
string

Human readable node name

Responses

Request samples

Content type
application/json
{
  • "nodeId": "string",
  • "url": "string",
  • "nodeName": "string"
}

Response samples

Content type
application/json
{
  • "nodeId": "string",
  • "url": "string",
  • "nodeName": "string"
}

getDiscoveryNode

Get info for one node

path Parameters
node_id
required
string

Responses

Response samples

Content type
application/json
{
  • "nodeId": "string",
  • "url": "string",
  • "nodeName": "string"
}

proxy-module

announceModules

Announce a list of new modules to the proxy. Once successful a module can be selected for a specific tenant. To announce only one module you may use /_/proxy/modules.

query Parameters
check
boolean
Default: true

Whether to check dependencies

preRelease
string
Default: "true"
Enum: "true" "false" "only"

Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.

npmSnapshot
string
Default: "true"
Enum: "true" "false" "only"

Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.

Request Body schema: application/json
required
Array
id
required
string

Module ID with format product-semver

name
string

Short name for module (does not include version)

replaces
Array of strings

List of modules that this replaces

tags
Array of strings

Module tags

requires
Array of objects (InterfaceReference)

Required interfaces

provides
Array of objects (InterfaceDescriptor)

Provided interfaces

optional
Array of objects (InterfaceReference)

Optional interfaces

Array of objects (RoutingEntry)

Provided filters

permissionSets
Array of objects (Permissions Definition Schema)

Module Permission Sets

Array of objects (EnvEntryList)

List of environment variables

metadata
object

Module Metadata (any object)

uiDescriptor
object (UiModuleDescriptor)

UI Module description

launchDescriptor
object (LaunchDescriptor)

Specifies how a module is deployed and undeployed

Responses

Request samples

Content type
application/json
[
  • {
    }
]

cleanupModules

Remove module snapshot modules descriptors that are obsolete. A module is considered obsolete if it is part of a release that is earlier than N latest releases (saveReleases) and not part of the M latest snapshots in that release.

query Parameters
removeDependencies
boolean
Default: false

Force removal of modules that depend on obsolete snapshots

saveReleases
required
integer

The number of latest releases where snapshots are never considered obsolete

saveSnapshots
required
integer

The number of latest snapshots that are never considered obsolete (preserved)

Responses

announceModule

Announce new module to the proxy. Once successful a module can be selected for a specific tenant.

query Parameters
check
boolean
Default: true

Whether to check dependencies

preRelease
string
Default: "true"
Enum: "true" "false" "only"

Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.

npmSnapshot
string
Default: "true"
Enum: "true" "false" "only"

Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.

Request Body schema: application/json
required
id
required
string

Module ID with format product-semver

name
string

Short name for module (does not include version)

replaces
Array of strings

List of modules that this replaces

tags
Array of strings

Module tags

requires
Array of objects (InterfaceReference)

Required interfaces

provides
Array of objects (InterfaceDescriptor)

Provided interfaces

optional
Array of objects (InterfaceReference)

Optional interfaces

Array of objects (RoutingEntry)

Provided filters

Array
methods
Array of strings

List of methods GET, POST,.. * (for all)

pathPattern
string

Path pattern match. * matches any path. {x} matches one or more characters but not slash

path
string

Path prefix match

rewritePath
string

Rewrite path. e.g. have filter rewrite '/' to '/events/'

phase
string

If given, may be auth, pre or post

level
string

Processing level. Default is 50 (handlers)

type
string

Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response

redirectPath
string

If given, path that we internally redirect to

unit
string

Delay unit

delay
string

Delay between calls; a value of zero disables timer

object (RoutingEntrySchedule)

Timer schedule using cron-utils

permissionsRequired
Array of strings

Required permissions for this entry

permissionsDesired
Array of strings

Desired permissions for this entry

modulePermissions
Array of strings

Module permissions for this entry

permissionsRequiredTenant
Array of strings

Required permissions that replace permissionsRequired when the user is authenticated and either the tenant matches each {tenantId} in pathPattern or pathPattern doesn't contain {tenantId}

delegateCORS
boolean

Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant//. No OPTIONS entry in the methods array is needed for this.

permissionSets
Array of objects (Permissions Definition Schema)

Module Permission Sets

Array of objects (EnvEntryList)

List of environment variables

Array
name
required
string

Key

value
string

Value

description
string

Description

metadata
object

Module Metadata (any object)

uiDescriptor
object (UiModuleDescriptor)

UI Module description

launchDescriptor
object (LaunchDescriptor)

Specifies how a module is deployed and undeployed

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "replaces": [
    ],
  • "tags": [
    ],
  • "requires": [
    ],
  • "provides": [
    ],
  • "optional": [
    ],
  • "filters": [
    ],
  • "permissionSets": [
    ],
  • "env": [
    ],
  • "metadata": { },
  • "uiDescriptor": { },
  • "launchDescriptor": { }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "replaces": [
    ],
  • "tags": [
    ],
  • "requires": [
    ],
  • "provides": [
    ],
  • "optional": [
    ],
  • "filters": [
    ],
  • "permissionSets": [
    ],
  • "env": [
    ],
  • "metadata": { },
  • "uiDescriptor": { },
  • "launchDescriptor": { }
}

getAllModules

List all or subset of modules for proxy

query Parameters
dot
boolean
Default: false

If true, return Graphviz DOT content as plain text

filter
string

Filter by module ID

full
boolean
Default: false

Whether full or compact MD should be returned

latest
integer

Limit to latest N releases (most likely 1 if given)

order
string
Enum: "desc" "asc"

Order

orderBy
string

Order by field

provide
string

Limit to provided interfaces (each interface name separated by comma)

require
string

Limit to required interfaces (each interface name separated by comma)

scope
string

Limit to interface scope (only useful with provide and require)

preRelease
string
Default: "true"
Enum: "true" "false" "only"

Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.

npmSnapshot
string
Default: "true"
Enum: "true" "false" "only"

Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getModule

Retrieve descriptor for a particular module

path Parameters
module_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "replaces": [
    ],
  • "tags": [
    ],
  • "requires": [
    ],
  • "provides": [
    ],
  • "optional": [
    ],
  • "filters": [
    ],
  • "permissionSets": [
    ],
  • "env": [
    ],
  • "metadata": { },
  • "uiDescriptor": { },
  • "launchDescriptor": { }
}

deleteModule

Remove module descriptor for a particular module, module will no longer be selectable by tenants

path Parameters
module_id
required
string

Responses

proxy-tenant

createTenant

Create a new tenant

Request Body schema: application/json
required
id
string

Tenant ID. A new tenant ID created via the POST //proxy/tenants API must match the ^[a-z][a-z0-9]{0,30}$ regexp as required by https://folio-org.atlassian.net/wiki/spaces/TC/pages/5053983/DR-000002+-+Tenant+Id+and+Module+Name+Restrictions Technical Council decision. All other APIs also accept a legacy tenant ID that matches ^[a-z0-9-]+$ regexp and may pose security issues as explained on https://folio-org.atlassian.net/wiki/spaces/DD/pages/1779867/Tenant+Id+and+Module+Name+Restrictions

name
string

Tenant name

description
string

Tenant description

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string"
}

getAllTenants

List all tenants

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getTenant

Retrieve a tenant

path Parameters
tenant_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string"
}

updateTenant

Update a tenant

path Parameters
tenant_id
required
string
Request Body schema: application/json
required
id
string

Tenant ID. A new tenant ID created via the POST //proxy/tenants API must match the ^[a-z][a-z0-9]{0,30}$ regexp as required by https://folio-org.atlassian.net/wiki/spaces/TC/pages/5053983/DR-000002+-+Tenant+Id+and+Module+Name+Restrictions Technical Council decision. All other APIs also accept a legacy tenant ID that matches ^[a-z0-9-]+$ regexp and may pose security issues as explained on https://folio-org.atlassian.net/wiki/spaces/DD/pages/1779867/Tenant+Id+and+Module+Name+Restrictions

name
string

Tenant name

description
string

Tenant description

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string"
}

deleteTenant

Remove a tenant

path Parameters
tenant_id
required
string

Responses

proxy-tenant-module

enableTenantModule

Enable a module for tenant. Only the member 'id' from TenantModuleDescriptor is used in this operation. This call will eventually be replaced by the 'install' service.

path Parameters
tenant_id
required
string
Request Body schema: application/json
required
id
required
string

Module ID (or just product part)

from
string

Original Module ID when transitioning from one module to another

action
string
Enum: "enable" "disable" "uptodate" "suggest" "conflict"

Module action

stage
string
Enum: "pending" "deploy" "invoke" "undeploy" "done"

Stage for the module

message
string

Diagnostic Message

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "from": "string",
  • "action": "enable",
  • "stage": "pending",
  • "message": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "from": "string",
  • "action": "enable",
  • "stage": "pending",
  • "message": "string"
}

getAllTenantModules

Get enabled modules for tenant

path Parameters
tenant_id
required
string
query Parameters
dot
boolean
Default: false

If true, return Graphviz DOT content as plain text

filter
string

Filter by module ID

full
boolean
Default: false

Whether full or compact MD should be returned

latest
integer

Limit to latest N releases (most likely 1 if given)

order
string
Enum: "desc" "asc"

Order

orderBy
string

Order by field

provide
string

Limit to provided interfaces (each interface name separated by comma)

require
string

Limit to required interfaces (each interface name separted by comma)

scope
string

Limit to interface scope (only useful with provide and require)

preRelease
string
Default: "true"
Enum: "true" "false" "only"

Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.

npmSnapshot
string
Default: "true"
Enum: "true" "false" "only"

Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

disableTenantModules

Disable modules for tenant

path Parameters
tenant_id
required
string
query Parameters
invoke
string
Default: "true"

Whether to invoke for tenant init/permissions/purge. Use "true" to invoke, "false" to not invoke. Any other value is a regular expression that is matched against the module ID. If that pattern matches, invoke is performed (same as "true)".

purge
boolean
Default: false

Disabled modules will also be purged.

tenantParameters
string

Parameters for Tenant init

Responses

getTenantModule

Look up particular module selection

path Parameters
module_id
required
string
tenant_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "from": "string",
  • "action": "enable",
  • "stage": "pending",
  • "message": "string"
}

upgradeTenantModule

Upgrade a module for a tenant. Enable new module and disable current module with new module ID in body and existing ID in path. This call will eventually be replaced by the 'install' service.

path Parameters
module_id
required
string
tenant_id
required
string
query Parameters
invoke
string
Default: "true"

Whether to invoke for tenant init/permissions/purge. Use "true" to invoke, "false" to not invoke. Any other value is a regular expression that is matched against the module ID. If that pattern matches, invoke is performed (same as "true)".

purge
boolean
Default: false

Disabled modules will also be purged.

tenantParameters
string

Parameters for Tenant init

Request Body schema: application/json
required
id
required
string

Module ID (or just product part)

from
string

Original Module ID when transitioning from one module to another

action
string
Enum: "enable" "disable" "uptodate" "suggest" "conflict"

Module action

stage
string
Enum: "pending" "deploy" "invoke" "undeploy" "done"

Stage for the module

message
string

Diagnostic Message

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "from": "string",
  • "action": "enable",
  • "stage": "pending",
  • "message": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "from": "string",
  • "action": "enable",
  • "stage": "pending",
  • "message": "string"
}

disableTenantModule

Disable a module for a tenant. This call will eventually be replaced by the 'install' service.

path Parameters
module_id
required
string
tenant_id
required
string
query Parameters
invoke
string
Default: "true"

Whether to invoke for tenant init/permissions/purge. Use "true" to invoke, "false" to not invoke. Any other value is a regular expression that is matched against the module ID. If that pattern matches, invoke is performed (same as "true)".

purge
boolean
Default: false

Disabled modules will also be purged.

tenantParameters
string

Parameters for Tenant init

Responses

proxy-tenant-installation

getAllInstallJobs

Retrieve information about all install/upgrade jobs - including those that are ongoing.

path Parameters
tenant_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

deleteInstallJobs

Delete all completed install jobs

path Parameters
tenant_id
required
string

Responses

createInstallJob

Enable, disable or upgrade one or more modules for tenant. The request body and response body is of the same type TenantModuleDescriptorList. This list includes one or more modules to be enabled, disabled or upgraded. The request is the initial desired changes and the response is the list of changes that must be fulfilled to satisfy dependencies. This service will eventually partially replace /_/proxy/tenants/{tenant}/modules . It also allows enabling multiple modules in one transaction. For simulate=true, the response, can be viewed as a recipe for what must be deployed (optionally) and enabled/disabled by the existing tenants-modules CRUD service.

path Parameters
tenant_id
required
string
query Parameters
preRelease
string
Default: "true"
Enum: "true" "false" "only"

Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.

npmSnapshot
string
Default: "true"
Enum: "true" "false" "only"

Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.

async
boolean
Default: false

Whether to install in the background.

deploy
boolean
Default: false

Whether to deploy (or undeploy if disabling).

ignoreErrors
boolean
Default: false

Okapi 4.2.0 and later, it is possible to ignore errors during the install operation. This is done by supplying parameter ignoreErrors=true. In this case, Okapi will try to upgrade all modules in the modules list, regardless if one of them fails. However, for individual modules, if they fail, their upgrade will not be committed. This is an experimental parameter which was added to be able to inspect all problem(s) with module upgrade(s).

invoke
string
Default: "true"

Whether to invoke for tenant init/permissions/purge. Use "true" to invoke, "false" to not invoke. Any other value is a regular expression that is matched against the module ID. If that pattern matches, invoke is performed (same as "true").

parallel
integer >= 1
Default: 1

Number of parallel calls to tenant interfaces of modules. A value of 1 means calls are happening in sequence. If depCheck=false and parallel>1, the invocation will be rejected.

purge
boolean
Default: false

Disabled modules will also be purged.

reinstall
boolean
Default: false

Whether to install modules even if up-to-update.

simulate
boolean
Default: false

Whether the installation is simulated

tenantParameters
string

Parameters for tenant init

depCheck
boolean
Default: true

Whether to check dependencies of modules before being installed. Modules are installed exactly in the order supplied by the client. If depCheck=false and parallel>1, the invocation will be rejected.

Request Body schema: application/json
required
Array
id
required
string

Module ID (or just product part)

from
string

Original Module ID when transitioning from one module to another

action
string
Enum: "enable" "disable" "uptodate" "suggest" "conflict"

Module action

stage
string
Enum: "pending" "deploy" "invoke" "undeploy" "done"

Stage for the module

message
string

Diagnostic Message

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

getInstallJob

Get install job status

path Parameters
install_id
required
string
tenant_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "complete": true,
  • "startDate": "string",
  • "endDate": "string",
  • "modules": [
    ]
}

deleteInstallJob

Delete install job

path Parameters
install_id
required
string
tenant_id
required
string

Responses

createUpgradeJob

Upgrade each module to the latest version. The upgrade is rejected if it would violate the interface dependencies of the modules. The response is a list of modules that have been enabled, disabled or upgraded to perform the upgrade.

path Parameters
tenant_id
required
string
query Parameters
preRelease
string
Default: "true"
Enum: "true" "false" "only"

Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.

npmSnapshot
string
Default: "true"
Enum: "true" "false" "only"

Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.

async
boolean
Default: false

Whether to install in the background.

deploy
boolean
Default: false

Whether to deploy (or undeploy if disabling).

ignoreErrors
boolean
Default: false

Okapi 4.2.0 and later, it is possible to ignore errors during the install operation. This is done by supplying parameter ignoreErrors=true. In this case, Okapi will try to upgrade all modules in the modules list, regardless if one of them fails. However, for individual modules, if they fail, their upgrade will not be committed. This is an experimental parameter which was added to be able to inspect all problem(s) with module upgrade(s).

invoke
string
Default: "true"

Whether to invoke for tenant init/permissions/purge. Use "true" to invoke, "false" to not invoke. Any other value is a regular expression that is matched against the module ID. If that pattern matches, invoke is performed (same as "true").

parallel
integer >= 1
Default: 1

Number of parallel calls to tenant interfaces of modules. A value of 1 means calls are happening in sequence. If depCheck=false and parallel>1, the invocation will be rejected.

purge
boolean
Default: false

Disabled modules will also be purged.

reinstall
boolean
Default: false

Whether to install modules even if up-to-update.

simulate
boolean
Default: false

Whether the installation is simulated

tenantParameters
string

Parameters for tenant init

depCheck
boolean
Default: true

Whether to check dependencies of modules before being installed. Modules are installed exactly in the order supplied by the client. If depCheck=false and parallel>1, the invocation will be rejected.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

proxy-tenant-interface

getAllInterfaces

Get all interfaces for tenant

path Parameters
tenant_id
required
string
query Parameters
full
boolean
Default: false

Whether brief or full interface list

type
string

Limit by interfaceType

Responses

Response samples

Content type
application/json
[
  • { }
]

getInterface

Get all modules that provide the specified interface ID. DEPRECATED Use /_/proxy/tenants/{tenant_id}/modules?provide={interface_id} instead.

path Parameters
interface_id
required
string
tenant_id
required
string
query Parameters
type
string

Limit by interfaceType

Responses

Response samples

Content type
application/json
[
  • {
    }
]

proxy-tenant-timer

getAllTimers

Get timers for tenant.

path Parameters
tenant_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

updateTimers

patch timer. Both routingEntry and id must be given. The routingEntry.unit, routingEntry.delay and routingEntry.schedule determines the new schedule for the timer. Using delay=0 disables a timer. Omitting delay, unit and schedule reverts timer back to initial values from module.

path Parameters
tenant_id
required
string
Request Body schema: application/json
required
id
required
string

Timer identifier

modified
boolean

Whether modified

object (RoutingEntry)

Okapi proxy routing entry

methods
Array of strings

List of methods GET, POST,.. * (for all)

pathPattern
string

Path pattern match. * matches any path. {x} matches one or more characters but not slash

path
string

Path prefix match

rewritePath
string

Rewrite path. e.g. have filter rewrite '/' to '/events/'

phase
string

If given, may be auth, pre or post

level
string

Processing level. Default is 50 (handlers)

type
string

Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response

redirectPath
string

If given, path that we internally redirect to

unit
string

Delay unit

delay
string

Delay between calls; a value of zero disables timer

object (RoutingEntrySchedule)

Timer schedule using cron-utils

permissionsRequired
Array of strings

Required permissions for this entry

permissionsDesired
Array of strings

Desired permissions for this entry

modulePermissions
Array of strings

Module permissions for this entry

permissionsRequiredTenant
Array of strings

Required permissions that replace permissionsRequired when the user is authenticated and either the tenant matches each {tenantId} in pathPattern or pathPattern doesn't contain {tenantId}

delegateCORS
boolean

Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant//. No OPTIONS entry in the methods array is needed for this.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "modified": true,
  • "routingEntry": {
    }
}

getTimer

get timer with id given.

path Parameters
timer_id
required
string
tenant_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "modified": true,
  • "routingEntry": {
    }
}

updateTimer

patch timer with routing entry as body. The unit, delay and schedule determines the new schedule for the timer. Using delay=0 disables a timer. Omitting delay, unit and schedule reverts timer back to initial values from module.

path Parameters
timer_id
required
string
tenant_id
required
string
Request Body schema: application/json
required
methods
Array of strings

List of methods GET, POST,.. * (for all)

pathPattern
string

Path pattern match. * matches any path. {x} matches one or more characters but not slash

path
string

Path prefix match

rewritePath
string

Rewrite path. e.g. have filter rewrite '/' to '/events/'

phase
string

If given, may be auth, pre or post

level
string

Processing level. Default is 50 (handlers)

type
string

Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response

redirectPath
string

If given, path that we internally redirect to

unit
string

Delay unit

delay
string

Delay between calls; a value of zero disables timer

object (RoutingEntrySchedule)

Timer schedule using cron-utils

cron
string

crontab specification

zone
permissionsRequired
Array of strings

Required permissions for this entry

permissionsDesired
Array of strings

Desired permissions for this entry

modulePermissions
Array of strings

Module permissions for this entry

permissionsRequiredTenant
Array of strings

Required permissions that replace permissionsRequired when the user is authenticated and either the tenant matches each {tenantId} in pathPattern or pathPattern doesn't contain {tenantId}

delegateCORS
boolean

Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant//. No OPTIONS entry in the methods array is needed for this.

Responses

Request samples

Content type
application/json
{
  • "methods": [
    ],
  • "pathPattern": "string",
  • "path": "string",
  • "rewritePath": "string",
  • "phase": "string",
  • "level": "string",
  • "type": "string",
  • "redirectPath": "string",
  • "unit": "string",
  • "delay": "string",
  • "schedule": {
    },
  • "permissionsRequired": [
    ],
  • "permissionsDesired": [
    ],
  • "modulePermissions": [
    ],
  • "permissionsRequiredTenant": [
    ],
  • "delegateCORS": true
}

proxy-health

getHealthStatus

Check health of modules

Responses

Response samples

Content type
application/json
[
  • {
    }
]

proxy-descriptor

pullDescriptors

Pull modules (i.e. Module Descriptors) from a remote repository. The PullDescriptor includes one or more URLs. And the operation will try all URLs in order until one succeeds. Hence, the URLs should be pointing to identical remote repositories.

Request Body schema: application/json
required
urls
Array of strings

List of URLs from which Okapi attempts pulling

Responses

Request samples

Content type
application/json
{
  • "urls": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

environment

createEnvironmentEntry

Add environment entry

Request Body schema: application/json
required
name
required
string

Key

value
string

Value

description
string

Description

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "value": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "value": "string",
  • "description": "string"
}

getAllEnvironmentEntries

Get list of all environment variables

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getEnvironmentEntry

Get info for one environment variable

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "value": "string",
  • "description": "string"
}

deleteEnvironmentEntry

Remove environment variable

path Parameters
id
required
string

Responses

version

getVersion

Get Okapi version

Responses

invoke-service

invoke

Invoke any service (the rest of the path, any method, any response).

path Parameters
id
required
string

Responses