Okapi Core API API documentation version 2.0
/_/deployment/modules
Deployment service. This is responsible for starting and stopping modules.
Deploy (launch process, start a container, etc) instance of a particular service, according to the deployment descriptor.
List all deployed instances
post /_/deployment/modules
Deploy (launch process, start a container, etc) instance of a particular service, according to the deployment descriptor.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DeploymentDescriptor",
"description" : "Module deployment information. There are two modes: deployment managed by Okapi (with nodeId specified) and remote module (with url specified).",
"type": "object",
"additionalProperties" : false,
"properties": {
"srvcId": {
"description": "The Module ID for the instance",
"type": "string"
},
"instId": {
"description": "Instance ID (at least unique for node)",
"type": "string"
},
"nodeId": {
"description": "Node ID where module is deployed",
"type": ["string", "null"]
},
"url": {
"description": "URL where module is deployed (not managed by Okapi)",
"type": ["string", "null"]
},
"descriptor" : {
"description": "Deployment details",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["srvcId"]
}
HTTP status code 201
Created
Headers
- Location: required (string)
URI to the descriptor of the deployed instance
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DeploymentDescriptor",
"description" : "Module deployment information. There are two modes: deployment managed by Okapi (with nodeId specified) and remote module (with url specified).",
"type": "object",
"additionalProperties" : false,
"properties": {
"srvcId": {
"description": "The Module ID for the instance",
"type": "string"
},
"instId": {
"description": "Instance ID (at least unique for node)",
"type": "string"
},
"nodeId": {
"description": "Node ID where module is deployed",
"type": ["string", "null"]
},
"url": {
"description": "URL where module is deployed (not managed by Okapi)",
"type": ["string", "null"]
},
"descriptor" : {
"description": "Deployment details",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["srvcId"]
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
get /_/deployment/modules
List all deployed instances
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DeploymentDescriptorList",
"description": "Deployment information list",
"type": "array",
"items": {
"$ref": "DeploymentDescriptor.json"
}
}
Retrieve deployment descriptor for a particular instance
shutdown instance
get /_/deployment/modules/{instance_id}
Retrieve deployment descriptor for a particular instance
URI Parameters
- instance_id: required (string)
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DeploymentDescriptor",
"description" : "Module deployment information. There are two modes: deployment managed by Okapi (with nodeId specified) and remote module (with url specified).",
"type": "object",
"additionalProperties" : false,
"properties": {
"srvcId": {
"description": "The Module ID for the instance",
"type": "string"
},
"instId": {
"description": "Instance ID (at least unique for node)",
"type": "string"
},
"nodeId": {
"description": "Node ID where module is deployed",
"type": ["string", "null"]
},
"url": {
"description": "URL where module is deployed (not managed by Okapi)",
"type": ["string", "null"]
},
"descriptor" : {
"description": "Deployment details",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["srvcId"]
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
/_/discovery/modules
Discovery service. This is responsible for monitoring all instances (deployed) on, possibly many, deployment nodes.
Register instance under a specified service id
Return all instances
delete all instances
post /_/discovery/modules
Register instance under a specified service id
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DeploymentDescriptor",
"description" : "Module deployment information. There are two modes: deployment managed by Okapi (with nodeId specified) and remote module (with url specified).",
"type": "object",
"additionalProperties" : false,
"properties": {
"srvcId": {
"description": "The Module ID for the instance",
"type": "string"
},
"instId": {
"description": "Instance ID (at least unique for node)",
"type": "string"
},
"nodeId": {
"description": "Node ID where module is deployed",
"type": ["string", "null"]
},
"url": {
"description": "URL where module is deployed (not managed by Okapi)",
"type": ["string", "null"]
},
"descriptor" : {
"description": "Deployment details",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["srvcId"]
}
HTTP status code 201
Created
Headers
- Location: required (string)
URI to the registered instance
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DeploymentDescriptor",
"description" : "Module deployment information. There are two modes: deployment managed by Okapi (with nodeId specified) and remote module (with url specified).",
"type": "object",
"additionalProperties" : false,
"properties": {
"srvcId": {
"description": "The Module ID for the instance",
"type": "string"
},
"instId": {
"description": "Instance ID (at least unique for node)",
"type": "string"
},
"nodeId": {
"description": "Node ID where module is deployed",
"type": ["string", "null"]
},
"url": {
"description": "URL where module is deployed (not managed by Okapi)",
"type": ["string", "null"]
},
"descriptor" : {
"description": "Deployment details",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["srvcId"]
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
get /_/discovery/modules
Return all instances
HTTP status code 200
Ok
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DeploymentDescriptorList",
"description": "Deployment information list",
"type": "array",
"items": {
"$ref": "DeploymentDescriptor.json"
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
List all instances for a particular service
Remove registration for a given instance
get /_/discovery/modules/{service_id}
List all instances for a particular service
URI Parameters
- service_id: required (string)
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DeploymentDescriptorList",
"description": "Deployment information list",
"type": "array",
"items": {
"$ref": "DeploymentDescriptor.json"
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
get registration of a specified instance
Remove registration for a given instance
get /_/discovery/modules/{service_id}/{instance_id}
get registration of a specified instance
URI Parameters
- service_id: required (string)
- instance_id: required (string)
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DeploymentDescriptor",
"description" : "Module deployment information. There are two modes: deployment managed by Okapi (with nodeId specified) and remote module (with url specified).",
"type": "object",
"additionalProperties" : false,
"properties": {
"srvcId": {
"description": "The Module ID for the instance",
"type": "string"
},
"instId": {
"description": "Instance ID (at least unique for node)",
"type": "string"
},
"nodeId": {
"description": "Node ID where module is deployed",
"type": ["string", "null"]
},
"url": {
"description": "URL where module is deployed (not managed by Okapi)",
"type": ["string", "null"]
},
"descriptor" : {
"description": "Deployment details",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["srvcId"]
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
delete /_/discovery/modules/{service_id}/{instance_id}
/_/discovery/health
Health service for individual instances
Get health info for all services
get /_/discovery/health
Get health info for all services
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "HealthDescriptorList",
"description": "List of health descriptors",
"type": "array",
"items": {
"$ref": "HealthDescriptor.json"
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
Health for all instances for a particular service
get /_/discovery/health/{service_id}
Health for all instances for a particular service
URI Parameters
- service_id: required (string)
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "HealthDescriptorList",
"description": "List of health descriptors",
"type": "array",
"items": {
"$ref": "HealthDescriptor.json"
}
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
get health for a particular instance
get /_/discovery/health/{service_id}/{instance_id}
get health for a particular instance
URI Parameters
- service_id: required (string)
- instance_id: required (string)
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "HealthDescriptor",
"description": "Health for an instance",
"type": "object",
"additionalProperties" : false,
"properties": {
"srvcId": {
"description": "Service ID, normally same as Module ID",
"type": "string"
},
"instId": {
"description": "Instance ID, unique on node",
"type": "string"
},
"healthMessage": {
"description": "Health message",
"type" : "string"
},
"healthStatus": {
"description": "Whether healthy",
"type" : "boolean"
}
},
"required": ["srvcId", "instId", "healthMessage", "healthStatus"]
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
/_/discovery/nodes
Get information about nodes
Get list of all nodes
get /_/discovery/nodes
Get list of all nodes
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "NodeDescriptorList",
"description": "List of Nodes",
"type": "array",
"items": {
"$ref": "NodeDescriptor.json"
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
Update descriptor of a particular node, only the name can be changed
Get info for one node
put /_/discovery/nodes/{node_id}
Update descriptor of a particular node, only the name can be changed
URI Parameters
- node_id: required (string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "NodeDescriptor",
"description": "Deployment node information",
"type": "object",
"additionalProperties" : false,
"properties": {
"nodeId": {
"description": "Node ID",
"type": "string"
},
"url": {
"description": "Host:port for for this node",
"type": "string"
},
"nodeName": {
"description": "Human readable node name",
"type": "string"
}
},
"required": ["nodeId", "url"]
}
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "NodeDescriptor",
"description": "Deployment node information",
"type": "object",
"additionalProperties" : false,
"properties": {
"nodeId": {
"description": "Node ID",
"type": "string"
},
"url": {
"description": "Host:port for for this node",
"type": "string"
},
"nodeName": {
"description": "Human readable node name",
"type": "string"
}
},
"required": ["nodeId", "url"]
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
get /_/discovery/nodes/{node_id}
Get info for one node
URI Parameters
- node_id: required (string)
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "NodeDescriptor",
"description": "Deployment node information",
"type": "object",
"additionalProperties" : false,
"properties": {
"nodeId": {
"description": "Node ID",
"type": "string"
},
"url": {
"description": "Host:port for for this node",
"type": "string"
},
"nodeName": {
"description": "Human readable node name",
"type": "string"
}
},
"required": ["nodeId", "url"]
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
/_/proxy/modules
Proxy modules service
Announce new module to the proxy. Once successful a module can be selected for a specific tenant.
List all or subset of modules for proxy
post /_/proxy/modules
Announce new module to the proxy. Once successful a module can be selected for a specific tenant.
Query Parameters
- check: (boolean)
Whether to check dependencies
- preRelease: (boolean)
whether to allow pre-release modules in dependency check
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ModuleDescriptor",
"description": "A FOLIO Module",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Module ID with format product-semver",
"type": "string"
},
"name": {
"description": "Short name for module (should not include version)",
"type": "string"
},
"tags" : {
"description": "Module tags",
"type" : ["array", "null"],
"items" : {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": ["array", "null"],
"items": {
"$ref": "InterfaceReference.json"
}
},
"provides": {
"description": "Provided interfaces",
"type": ["array", "null"],
"items": {
"$ref": "InterfaceDescriptor.json"
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$ref": "RoutingEntry.json"
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": ["array", "null"],
"items": {
"$ref": "Permission.json"
}
},
"uiDescriptor": {
"description": "UI module descriptor",
"$ref": "UiModuleDescriptor.json"
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["id"]
}
HTTP status code 201
Created
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
- Location: required (string)
URI to the created module instance
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ModuleDescriptor",
"description": "A FOLIO Module",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Module ID with format product-semver",
"type": "string"
},
"name": {
"description": "Short name for module (should not include version)",
"type": "string"
},
"tags" : {
"description": "Module tags",
"type" : ["array", "null"],
"items" : {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": ["array", "null"],
"items": {
"$ref": "InterfaceReference.json"
}
},
"provides": {
"description": "Provided interfaces",
"type": ["array", "null"],
"items": {
"$ref": "InterfaceDescriptor.json"
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$ref": "RoutingEntry.json"
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": ["array", "null"],
"items": {
"$ref": "Permission.json"
}
},
"uiDescriptor": {
"description": "UI module descriptor",
"$ref": "UiModuleDescriptor.json"
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["id"]
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
get /_/proxy/modules
List all or subset of modules for proxy
Query Parameters
- dot: (boolean)
If true, return Graphviz DOT content as plain text
- filter: (string)
Filter by module ID
- full: (boolean)
whether full or compact MD should be returned
- latest: (integer)
limit to latest N releases (most likely 1 if given)
- orderBy: (string)
Order by field
- order: (one of desc, asc)
Order
- preRelease: (boolean)
whether to include modules with pre-release info (default:true).
- npmSnapshot: (boolean)
whether to include NPM module snapshots (default:true).
- provide: (string)
limit to provided interface
- require: (string)
limit to required interface
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ModuleList",
"description": "List of Module Descriptors",
"type": "array",
"items": {
"$ref": "ModuleDescriptor.json"
}
}
Media type: text/plain
Type: any
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
Retrieve descriptor for a particular module
Update descriptor of a particular module
Remove module descriptor for a particular module, module will no longer be selectable by tenants
get /_/proxy/modules/{module_id}
Retrieve descriptor for a particular module
URI Parameters
- module_id: required (string)
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ModuleDescriptor",
"description": "A FOLIO Module",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Module ID with format product-semver",
"type": "string"
},
"name": {
"description": "Short name for module (should not include version)",
"type": "string"
},
"tags" : {
"description": "Module tags",
"type" : ["array", "null"],
"items" : {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": ["array", "null"],
"items": {
"$ref": "InterfaceReference.json"
}
},
"provides": {
"description": "Provided interfaces",
"type": ["array", "null"],
"items": {
"$ref": "InterfaceDescriptor.json"
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$ref": "RoutingEntry.json"
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": ["array", "null"],
"items": {
"$ref": "Permission.json"
}
},
"uiDescriptor": {
"description": "UI module descriptor",
"$ref": "UiModuleDescriptor.json"
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["id"]
}
put /_/proxy/modules/{module_id}
Update descriptor of a particular module
URI Parameters
- module_id: required (string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ModuleDescriptor",
"description": "A FOLIO Module",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Module ID with format product-semver",
"type": "string"
},
"name": {
"description": "Short name for module (should not include version)",
"type": "string"
},
"tags" : {
"description": "Module tags",
"type" : ["array", "null"],
"items" : {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": ["array", "null"],
"items": {
"$ref": "InterfaceReference.json"
}
},
"provides": {
"description": "Provided interfaces",
"type": ["array", "null"],
"items": {
"$ref": "InterfaceDescriptor.json"
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$ref": "RoutingEntry.json"
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": ["array", "null"],
"items": {
"$ref": "Permission.json"
}
},
"uiDescriptor": {
"description": "UI module descriptor",
"$ref": "UiModuleDescriptor.json"
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["id"]
}
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ModuleDescriptor",
"description": "A FOLIO Module",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Module ID with format product-semver",
"type": "string"
},
"name": {
"description": "Short name for module (should not include version)",
"type": "string"
},
"tags" : {
"description": "Module tags",
"type" : ["array", "null"],
"items" : {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": ["array", "null"],
"items": {
"$ref": "InterfaceReference.json"
}
},
"provides": {
"description": "Provided interfaces",
"type": ["array", "null"],
"items": {
"$ref": "InterfaceDescriptor.json"
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$ref": "RoutingEntry.json"
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": ["array", "null"],
"items": {
"$ref": "Permission.json"
}
},
"uiDescriptor": {
"description": "UI module descriptor",
"$ref": "UiModuleDescriptor.json"
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$ref": "LaunchDescriptor.json"
}
},
"required": ["id"]
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
/_/proxy/tenants
Tenants service
Create a new tenant
List all tenants
post /_/proxy/tenants
Create a new tenant
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Tenant ID",
"type": "string"
},
"name": {
"description": "Tenant name",
"type": "string"
},
"description": {
"description": "Tenant description",
"type": "string"
}
}
}
HTTP status code 201
Tenant has been created
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
- Location: required (string)
URI to the created tenant
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Tenant ID",
"type": "string"
},
"name": {
"description": "Tenant name",
"type": "string"
},
"description": {
"description": "Tenant description",
"type": "string"
}
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
get /_/proxy/tenants
List all tenants
HTTP status code 200
List of tenants in a brief format
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantList",
"description": "List of Tenants",
"type": "array",
"items": {
"$ref": "TenantDescriptor.json"
}
}
Retrieve a tenant
Update a tenant
Remove a tenant
get /_/proxy/tenants/{tenant_id}
Retrieve a tenant
URI Parameters
- tenant_id: required (string)
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Tenant ID",
"type": "string"
},
"name": {
"description": "Tenant name",
"type": "string"
},
"description": {
"description": "Tenant description",
"type": "string"
}
}
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
put /_/proxy/tenants/{tenant_id}
Update a tenant
URI Parameters
- tenant_id: required (string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Tenant ID",
"type": "string"
},
"name": {
"description": "Tenant name",
"type": "string"
},
"description": {
"description": "Tenant description",
"type": "string"
}
}
}
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Tenant ID",
"type": "string"
},
"name": {
"description": "Tenant name",
"type": "string"
},
"description": {
"description": "Tenant description",
"type": "string"
}
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
delete /_/proxy/tenants/{tenant_id}
Remove a tenant
URI Parameters
- tenant_id: required (string)
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.
Get enabled modules for tenant
post /_/proxy/tenants/{tenant_id}/modules
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.
URI Parameters
- tenant_id: required (string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantModuleDescriptor",
"description": "Module transitions",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Module ID (or just product part)",
"type": "string"
},
"from": {
"description": "Original Module ID when transitioning from one module to another",
"type": "string"
},
"action" : {
"description": "Module action",
"type" : "string",
"enum" : [ "enable", "disable", "uptodate", "suggest", "conflict" ]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required" : ["id"]
}
HTTP status code 201
Created
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
- Location: required (string)
URI to the enabled module
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantModuleDescriptor",
"description": "Module transitions",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Module ID (or just product part)",
"type": "string"
},
"from": {
"description": "Original Module ID when transitioning from one module to another",
"type": "string"
},
"action" : {
"description": "Module action",
"type" : "string",
"enum" : [ "enable", "disable", "uptodate", "suggest", "conflict" ]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required" : ["id"]
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server error
Body
Media type: text/plain
Type: any
get /_/proxy/tenants/{tenant_id}/modules
Get enabled modules for tenant
URI Parameters
- tenant_id: required (string)
Query Parameters
- full: (boolean)
whether full or compact MD should be returned
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ModuleList",
"description": "List of Module Descriptors",
"type": "array",
"items": {
"$ref": "ModuleDescriptor.json"
}
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server error
Body
Media type: text/plain
Type: any
CRUD service for getting module and upgrading module for a tenant.
Look up particular module selection
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.
Disable a module for a tenant. This call will eventually be replaced by the 'install' service.
get /_/proxy/tenants/{tenant_id}/modules/{module_id}
Look up particular module selection
URI Parameters
- tenant_id: required (string)
- module_id: required (string)
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantModuleDescriptor",
"description": "Module transitions",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Module ID (or just product part)",
"type": "string"
},
"from": {
"description": "Original Module ID when transitioning from one module to another",
"type": "string"
},
"action" : {
"description": "Module action",
"type" : "string",
"enum" : [ "enable", "disable", "uptodate", "suggest", "conflict" ]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required" : ["id"]
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
post /_/proxy/tenants/{tenant_id}/modules/{module_id}
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.
URI Parameters
- tenant_id: required (string)
- module_id: required (string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantModuleDescriptor",
"description": "Module transitions",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Module ID (or just product part)",
"type": "string"
},
"from": {
"description": "Original Module ID when transitioning from one module to another",
"type": "string"
},
"action" : {
"description": "Module action",
"type" : "string",
"enum" : [ "enable", "disable", "uptodate", "suggest", "conflict" ]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required" : ["id"]
}
HTTP status code 201
Created
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
- Location: required (string)
URI to the enabled module
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantModuleDescriptor",
"description": "Module transitions",
"type": "object",
"additionalProperties" : false,
"properties": {
"id": {
"description": "Module ID (or just product part)",
"type": "string"
},
"from": {
"description": "Original Module ID when transitioning from one module to another",
"type": "string"
},
"action" : {
"description": "Module action",
"type" : "string",
"enum" : [ "enable", "disable", "uptodate", "suggest", "conflict" ]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required" : ["id"]
}
HTTP status code 400
Client Error
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
delete /_/proxy/tenants/{tenant_id}/modules/{module_id}
Disable a module for a tenant. This call will eventually be replaced by the 'install' service.
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 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.
post /_/proxy/tenants/{tenant_id}/install
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 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.
URI Parameters
- tenant_id: required (string)
Query Parameters
- deploy: (boolean)
whether to deploy (or undeploy if disabling)
- simulate: (boolean)
Whether the installation is simulated
- preRelease: (boolean)
Whether pre-releases should be considered for installation.
- npmSnapshot: (boolean)
whether to include NPM module snapshots (default:true).
- purge: (boolean)
Disabled modules will also be purged.
- tenantParameters: (string)
Parameters for Tenant init
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantModuleDescriptorList",
"description": "List of module transitions",
"type": "array",
"items": {
"$ref": "TenantModuleDescriptor.json"
}
}
HTTP status code 200
OK
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantModuleDescriptorList",
"description": "List of module transitions",
"type": "array",
"items": {
"$ref": "TenantModuleDescriptor.json"
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server error
Body
Media type: text/plain
Type: any
Check if newer modules of exist and upgrade for tenant. The response is a list of modules that should be enabled, disabled or upgraded to perform the upgrade.
post /_/proxy/tenants/{tenant_id}/upgrade
Check if newer modules of exist and upgrade for tenant. The response is a list of modules that should be enabled, disabled or upgraded to perform the upgrade.
URI Parameters
- tenant_id: required (string)
Query Parameters
- deploy: (boolean)
whether to deploy (or undeploy if disabling)
- simulate: (boolean)
whether the upgrade is simulated
- preRelease: (boolean)
Whether pre-releases should be considered for installation.
- purge: (boolean)
Disabled modules will also be purged.
- tenantParameters: (string)
Parameters for Tenant init
HTTP status code 200
OK
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantModuleDescriptorList",
"description": "List of module transitions",
"type": "array",
"items": {
"$ref": "TenantModuleDescriptor.json"
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server error
Body
Media type: text/plain
Type: any
Get all interfaces for tenant
get /_/proxy/tenants/{tenant_id}/interfaces
Get all interfaces for tenant
URI Parameters
- tenant_id: required (string)
Query Parameters
- full: (boolean)
whether brief or full interface list
- type: (string)
limit by interfaceType
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "InterfaceList",
"description": "Interface List",
"type": "array",
"items": {
"$ref": "InterfaceDescriptor.json"
}
}
HTTP status code 400
Client Error
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server error
Body
Media type: text/plain
Type: any
Get all modules that provide the specified interface ID
get /_/proxy/tenants/{tenant_id}/interfaces/{interface_id}
Get all modules that provide the specified interface ID
URI Parameters
- tenant_id: required (string)
- interface_id: required (string)
Query Parameters
- type: (string)
limit by interfaceType
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TenantModuleDescriptorList",
"description": "List of module transitions",
"type": "array",
"items": {
"$ref": "TenantModuleDescriptor.json"
}
}
HTTP status code 400
Client Error
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server error
Body
Media type: text/plain
Type: any
/_/proxy/health
Health of modules as seen from proxy
Check health of modules
get /_/proxy/health
Check health of modules
HTTP status code 200
OK
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "HealthStatusList",
"description": "Health for each module as seen from proxy",
"type": "array",
"items": {
"$ref": "HealthStatus.json"
}
}
HTTP status code 500
Server Error
/_/proxy/pull/modules
Pull module descriptors from a remote repository
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.
post /_/proxy/pull/modules
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.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "PullDescriptor",
"description": "Information controlling the pull facility",
"type": "object",
"properties": {
"urls": {
"description": "List of URLs from which Okapi attempts pulling",
"type": "array",
"items" : {
"type" : "string"
}
}
}
}
HTTP status code 200
OK
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ModuleList",
"description": "List of Module Descriptors",
"type": "array",
"items": {
"$ref": "ModuleDescriptor.json"
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
/_/env
Environment service. Environment variables are system variables that allows us to configure modules in a uniform way. They can hold fundamental database configuration, etc.
Add environment entry
Get list of all environment variables
post /_/env
Add environment entry
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "EnvEntry",
"description": "Environment Variable",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "Key",
"type": "string"
},
"value": {
"description": "Value",
"type": "string"
},
"description": {
"description": "Description",
"type": "string"
}
},
"required": ["name"]
}
HTTP status code 201
Created
Headers
- Location: required (string)
URI to the environment entry instance
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "EnvEntry",
"description": "Environment Variable",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "Key",
"type": "string"
},
"value": {
"description": "Value",
"type": "string"
},
"description": {
"description": "Description",
"type": "string"
}
},
"required": ["name"]
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
get /_/env
Get list of all environment variables
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "EnvEntryList",
"description": "List of environment variables",
"type": "array",
"items": {
"$ref": "EnvEntry.json"
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
Get info for one environment variable
Remove environment variable
get /_/env/{id}
Get info for one environment variable
URI Parameters
- id: required (string)
HTTP status code 200
Headers
- X-Okapi-Trace: required (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "EnvEntry",
"description": "Environment Variable",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "Key",
"type": "string"
},
"value": {
"description": "Value",
"type": "string"
},
"description": {
"description": "Description",
"type": "string"
}
},
"required": ["name"]
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
/_/version
Service for getting information about Okapi
get Okapi version
get /_/version
/_/invoke/tenant/{id}
Call module with Tenant ID in path. This service offers support for systems that need to "call-back" Okapi and don't allow setting the Tenant ID in the HTTP header.
Invoke any service (the rest of the path, any method, any response).