Okapi Core API 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#",
"id": "DeploymentDescriptor.json",
"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). Must not end with a slash unless a slash should be added. Examples with url and where a request for /foo will be proxied to: http://example.com results in http://example.com/foo, and http://example.com/ results in http://example.com//foo, and http://example.com/xyz results in http://example.com/xyz/foo, and http://example.com/xyz/ results in http://example.com/xyz//foo.",
"type": [
"string",
"null"
]
},
"descriptor": {
"description": "Deployment details",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"required": [
"srvcId"
]
}
HTTP status code 201
Created
Headers
- Location: required(string)
URI to the descriptor of the deployed instance
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "DeploymentDescriptor.json",
"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). Must not end with a slash unless a slash should be added. Examples with url and where a request for /foo will be proxied to: http://example.com results in http://example.com/foo, and http://example.com/ results in http://example.com//foo, and http://example.com/xyz results in http://example.com/xyz/foo, and http://example.com/xyz/ results in http://example.com/xyz//foo.",
"type": [
"string",
"null"
]
},
"descriptor": {
"description": "Deployment details",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "DeploymentDescriptorList.json",
"title": "DeploymentDescriptorList",
"description": "Deployment information list",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "DeploymentDescriptor.json",
"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). Must not end with a slash unless a slash should be added. Examples with url and where a request for /foo will be proxied to: http://example.com results in http://example.com/foo, and http://example.com/ results in http://example.com//foo, and http://example.com/xyz results in http://example.com/xyz/foo, and http://example.com/xyz/ results in http://example.com/xyz//foo.",
"type": [
"string",
"null"
]
},
"descriptor": {
"description": "Deployment details",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"required": [
"srvcId"
]
}
}
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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "DeploymentDescriptor.json",
"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). Must not end with a slash unless a slash should be added. Examples with url and where a request for /foo will be proxied to: http://example.com results in http://example.com/foo, and http://example.com/ results in http://example.com//foo, and http://example.com/xyz results in http://example.com/xyz/foo, and http://example.com/xyz/ results in http://example.com/xyz//foo.",
"type": [
"string",
"null"
]
},
"descriptor": {
"description": "Deployment details",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"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#",
"id": "DeploymentDescriptor.json",
"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). Must not end with a slash unless a slash should be added. Examples with url and where a request for /foo will be proxied to: http://example.com results in http://example.com/foo, and http://example.com/ results in http://example.com//foo, and http://example.com/xyz results in http://example.com/xyz/foo, and http://example.com/xyz/ results in http://example.com/xyz//foo.",
"type": [
"string",
"null"
]
},
"descriptor": {
"description": "Deployment details",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"required": [
"srvcId"
]
}
HTTP status code 201
Created
Headers
- Location: required(string)
URI to the registered instance
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "DeploymentDescriptor.json",
"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). Must not end with a slash unless a slash should be added. Examples with url and where a request for /foo will be proxied to: http://example.com results in http://example.com/foo, and http://example.com/ results in http://example.com//foo, and http://example.com/xyz results in http://example.com/xyz/foo, and http://example.com/xyz/ results in http://example.com/xyz//foo.",
"type": [
"string",
"null"
]
},
"descriptor": {
"description": "Deployment details",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "DeploymentDescriptorList.json",
"title": "DeploymentDescriptorList",
"description": "Deployment information list",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "DeploymentDescriptor.json",
"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). Must not end with a slash unless a slash should be added. Examples with url and where a request for /foo will be proxied to: http://example.com results in http://example.com/foo, and http://example.com/ results in http://example.com//foo, and http://example.com/xyz results in http://example.com/xyz/foo, and http://example.com/xyz/ results in http://example.com/xyz//foo.",
"type": [
"string",
"null"
]
},
"descriptor": {
"description": "Deployment details",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"required": [
"srvcId"
]
}
}
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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "DeploymentDescriptorList.json",
"title": "DeploymentDescriptorList",
"description": "Deployment information list",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "DeploymentDescriptor.json",
"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). Must not end with a slash unless a slash should be added. Examples with url and where a request for /foo will be proxied to: http://example.com results in http://example.com/foo, and http://example.com/ results in http://example.com//foo, and http://example.com/xyz results in http://example.com/xyz/foo, and http://example.com/xyz/ results in http://example.com/xyz//foo.",
"type": [
"string",
"null"
]
},
"descriptor": {
"description": "Deployment details",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"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 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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "DeploymentDescriptor.json",
"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). Must not end with a slash unless a slash should be added. Examples with url and where a request for /foo will be proxied to: http://example.com results in http://example.com/foo, and http://example.com/ results in http://example.com//foo, and http://example.com/xyz results in http://example.com/xyz/foo, and http://example.com/xyz/ results in http://example.com/xyz//foo.",
"type": [
"string",
"null"
]
},
"descriptor": {
"description": "Deployment details",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "HealthDescriptorList.json",
"title": "HealthDescriptorList",
"description": "List of health descriptors",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "HealthDescriptor.json",
"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 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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "HealthDescriptorList.json",
"title": "HealthDescriptorList",
"description": "List of health descriptors",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "HealthDescriptor.json",
"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
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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "HealthDescriptor.json",
"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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "NodeDescriptorList.json",
"title": "NodeDescriptorList",
"description": "List of Nodes",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "NodeDescriptor.json",
"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 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#",
"id": "NodeDescriptor.json",
"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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "NodeDescriptor.json",
"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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "NodeDescriptor.json",
"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/import/modules
Proxy modules service, list import
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.
post /_/proxy/import/modules
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: (one of true, false, only - default: true)
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
- npmSnapshot: (one of true, false, only - default: true)
Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "ModuleList.json",
"title": "ModuleList",
"description": "List of Module Descriptors",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "ModuleDescriptor.json",
"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 (does not include version)",
"type": "string"
},
"replaces": {
"description": "List of modules that this replaces",
"type": "array",
"items": {
"description": "Module name - without semantic version",
"type": "string"
}
},
"tags": {
"description": "Module tags",
"type": [
"array",
"null"
],
"items": {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"provides": {
"description": "Provided interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceDescriptor.json",
"title": "InterfaceDescriptor",
"description": "An interface that a module can provide",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "Interface version in major.minor format",
"type": "string"
},
"interfaceType": {
"description": "Type: proxy (default), system, internal, multiple",
"type": [
"string",
"null"
]
},
"handlers": {
"description": "Handler entries for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Permissions for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"scope": {
"description": "Interface scope",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"version"
]
}
},
"optional": {
"description": "Optional interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"env": {
"description": "Supported environment variables",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
},
"metadata": {
"description": "Module Metadata (any object)",
"type": "object"
},
"uiDescriptor": {
"description": "UI module descriptor",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "UiModuleDescriptor.json",
"title": "UiModuleDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"npm": {
"description": "NPM module",
"type": [
"string",
"null"
]
},
"url": {
"description": "URL",
"type": [
"string",
"null"
]
},
"local": {
"description": "Local",
"type": [
"string",
"null"
]
},
"args": {
"description": "Arguments",
"type": [
"string",
"null"
]
}
}
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"required": [
"id"
]
}
}
/_/proxy/cleanup/modules
Proxy modules service, clean up obsolete snapshot modules
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.
post /_/proxy/cleanup/modules
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)
/_/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 - default: true)
Whether to check dependencies
- preRelease: (one of true, false, only - default: true)
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
- npmSnapshot: (one of true, false, only - default: true)
Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "ModuleDescriptor.json",
"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 (does not include version)",
"type": "string"
},
"replaces": {
"description": "List of modules that this replaces",
"type": "array",
"items": {
"description": "Module name - without semantic version",
"type": "string"
}
},
"tags": {
"description": "Module tags",
"type": [
"array",
"null"
],
"items": {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"provides": {
"description": "Provided interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceDescriptor.json",
"title": "InterfaceDescriptor",
"description": "An interface that a module can provide",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "Interface version in major.minor format",
"type": "string"
},
"interfaceType": {
"description": "Type: proxy (default), system, internal, multiple",
"type": [
"string",
"null"
]
},
"handlers": {
"description": "Handler entries for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Permissions for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"scope": {
"description": "Interface scope",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"version"
]
}
},
"optional": {
"description": "Optional interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"env": {
"description": "Supported environment variables",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
},
"metadata": {
"description": "Module Metadata (any object)",
"type": "object"
},
"uiDescriptor": {
"description": "UI module descriptor",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "UiModuleDescriptor.json",
"title": "UiModuleDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"npm": {
"description": "NPM module",
"type": [
"string",
"null"
]
},
"url": {
"description": "URL",
"type": [
"string",
"null"
]
},
"local": {
"description": "Local",
"type": [
"string",
"null"
]
},
"args": {
"description": "Arguments",
"type": [
"string",
"null"
]
}
}
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"required": [
"id"
]
}
HTTP status code 201
Created
Headers
- X-Okapi-Trace: (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#",
"id": "ModuleDescriptor.json",
"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 (does not include version)",
"type": "string"
},
"replaces": {
"description": "List of modules that this replaces",
"type": "array",
"items": {
"description": "Module name - without semantic version",
"type": "string"
}
},
"tags": {
"description": "Module tags",
"type": [
"array",
"null"
],
"items": {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"provides": {
"description": "Provided interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceDescriptor.json",
"title": "InterfaceDescriptor",
"description": "An interface that a module can provide",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "Interface version in major.minor format",
"type": "string"
},
"interfaceType": {
"description": "Type: proxy (default), system, internal, multiple",
"type": [
"string",
"null"
]
},
"handlers": {
"description": "Handler entries for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Permissions for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"scope": {
"description": "Interface scope",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"version"
]
}
},
"optional": {
"description": "Optional interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"env": {
"description": "Supported environment variables",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
},
"metadata": {
"description": "Module Metadata (any object)",
"type": "object"
},
"uiDescriptor": {
"description": "UI module descriptor",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "UiModuleDescriptor.json",
"title": "UiModuleDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"npm": {
"description": "NPM module",
"type": [
"string",
"null"
]
},
"url": {
"description": "URL",
"type": [
"string",
"null"
]
},
"local": {
"description": "Local",
"type": [
"string",
"null"
]
},
"args": {
"description": "Arguments",
"type": [
"string",
"null"
]
}
}
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"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 - 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: (one of 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: (one of true, false, only - default: true)
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
- npmSnapshot: (one of true, false, only - default: true)
Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.
HTTP status code 200
Headers
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "ModuleList.json",
"title": "ModuleList",
"description": "List of Module Descriptors",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "ModuleDescriptor.json",
"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 (does not include version)",
"type": "string"
},
"replaces": {
"description": "List of modules that this replaces",
"type": "array",
"items": {
"description": "Module name - without semantic version",
"type": "string"
}
},
"tags": {
"description": "Module tags",
"type": [
"array",
"null"
],
"items": {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"provides": {
"description": "Provided interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceDescriptor.json",
"title": "InterfaceDescriptor",
"description": "An interface that a module can provide",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "Interface version in major.minor format",
"type": "string"
},
"interfaceType": {
"description": "Type: proxy (default), system, internal, multiple",
"type": [
"string",
"null"
]
},
"handlers": {
"description": "Handler entries for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Permissions for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"scope": {
"description": "Interface scope",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"version"
]
}
},
"optional": {
"description": "Optional interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"env": {
"description": "Supported environment variables",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
},
"metadata": {
"description": "Module Metadata (any object)",
"type": "object"
},
"uiDescriptor": {
"description": "UI module descriptor",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "UiModuleDescriptor.json",
"title": "UiModuleDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"npm": {
"description": "NPM module",
"type": [
"string",
"null"
]
},
"url": {
"description": "URL",
"type": [
"string",
"null"
]
},
"local": {
"description": "Local",
"type": [
"string",
"null"
]
},
"args": {
"description": "Arguments",
"type": [
"string",
"null"
]
}
}
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"required": [
"id"
]
}
}
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
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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "ModuleDescriptor.json",
"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 (does not include version)",
"type": "string"
},
"replaces": {
"description": "List of modules that this replaces",
"type": "array",
"items": {
"description": "Module name - without semantic version",
"type": "string"
}
},
"tags": {
"description": "Module tags",
"type": [
"array",
"null"
],
"items": {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"provides": {
"description": "Provided interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceDescriptor.json",
"title": "InterfaceDescriptor",
"description": "An interface that a module can provide",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "Interface version in major.minor format",
"type": "string"
},
"interfaceType": {
"description": "Type: proxy (default), system, internal, multiple",
"type": [
"string",
"null"
]
},
"handlers": {
"description": "Handler entries for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Permissions for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"scope": {
"description": "Interface scope",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"version"
]
}
},
"optional": {
"description": "Optional interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"env": {
"description": "Supported environment variables",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
},
"metadata": {
"description": "Module Metadata (any object)",
"type": "object"
},
"uiDescriptor": {
"description": "UI module descriptor",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "UiModuleDescriptor.json",
"title": "UiModuleDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"npm": {
"description": "NPM module",
"type": [
"string",
"null"
]
},
"url": {
"description": "URL",
"type": [
"string",
"null"
]
},
"local": {
"description": "Local",
"type": [
"string",
"null"
]
},
"args": {
"description": "Arguments",
"type": [
"string",
"null"
]
}
}
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"required": [
"id"
]
}
delete /_/proxy/modules/{module_id}
Remove module descriptor for a particular module, module will no longer be selectable by tenants
/_/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#",
"id": "TenantDescriptor.json",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "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",
"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: (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#",
"id": "TenantDescriptor.json",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "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",
"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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantList.json",
"title": "TenantList",
"description": "List of Tenants",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantDescriptor.json",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "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",
"type": "string"
},
"name": {
"description": "Tenant name",
"type": "string"
},
"description": {
"description": "Tenant description",
"type": "string"
}
}
}
}
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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantDescriptor.json",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "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",
"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#",
"id": "TenantDescriptor.json",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "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",
"type": "string"
},
"name": {
"description": "Tenant name",
"type": "string"
},
"description": {
"description": "Tenant description",
"type": "string"
}
}
}
HTTP status code 200
Headers
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantDescriptor.json",
"title": "TenantDescriptor",
"description": "Tenant information",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "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",
"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
Disable 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#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required": [
"id"
]
}
HTTP status code 201
Created
Headers
- X-Okapi-Trace: (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#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"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
- 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: (one of 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: (one of true, false, only - default: true)
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
- npmSnapshot: (one of true, false, only - default: true)
Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.
HTTP status code 200
Headers
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "ModuleList.json",
"title": "ModuleList",
"description": "List of Module Descriptors",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "ModuleDescriptor.json",
"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 (does not include version)",
"type": "string"
},
"replaces": {
"description": "List of modules that this replaces",
"type": "array",
"items": {
"description": "Module name - without semantic version",
"type": "string"
}
},
"tags": {
"description": "Module tags",
"type": [
"array",
"null"
],
"items": {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"provides": {
"description": "Provided interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceDescriptor.json",
"title": "InterfaceDescriptor",
"description": "An interface that a module can provide",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "Interface version in major.minor format",
"type": "string"
},
"interfaceType": {
"description": "Type: proxy (default), system, internal, multiple",
"type": [
"string",
"null"
]
},
"handlers": {
"description": "Handler entries for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Permissions for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"scope": {
"description": "Interface scope",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"version"
]
}
},
"optional": {
"description": "Optional interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"env": {
"description": "Supported environment variables",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
},
"metadata": {
"description": "Module Metadata (any object)",
"type": "object"
},
"uiDescriptor": {
"description": "UI module descriptor",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "UiModuleDescriptor.json",
"title": "UiModuleDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"npm": {
"description": "NPM module",
"type": [
"string",
"null"
]
},
"url": {
"description": "URL",
"type": [
"string",
"null"
]
},
"local": {
"description": "Local",
"type": [
"string",
"null"
]
},
"args": {
"description": "Arguments",
"type": [
"string",
"null"
]
}
}
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"required": [
"id"
]
}
}
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
Disable modules for tenant
URI 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
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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"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)
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
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required": [
"id"
]
}
HTTP status code 201
Created
Headers
- X-Okapi-Trace: (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#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"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.
URI Parameters
- tenant_id: required(string)
- module_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
Retrieve information about all install/upgrade jobs - including those that are ongoing.
Delete all completed install jobs
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.
get /_/proxy/tenants/{tenant_id}/install
Retrieve information about all install/upgrade jobs - including those that are ongoing.
URI Parameters
- tenant_id: required(string)
HTTP status code 200
OK
Headers
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InstallJobList.json",
"title": "InstallJobList",
"description": "List of install jobs",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InstallJob.json",
"title": "InstallJob",
"description": "Install job",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Job ID",
"type": "string"
},
"complete": {
"description": "Whether job is complete",
"type": "boolean"
},
"startDate": {
"description": "Start date",
"type": "string"
},
"endDate": {
"description": "End date",
"type": "string"
},
"modules": {
"description": "List of modules involved in install job",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptorList.json",
"title": "TenantModuleDescriptorList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required": [
"id"
]
}
}
},
"required": [
"complete",
"modules"
]
}
}
HTTP status code 400
User error
Body
Media type: text/plain
Type: any
HTTP status code 404
Tenant not Found
Body
Media type: text/plain
Type: any
HTTP status code 500
User error
Body
Media type: text/plain
Type: any
delete /_/proxy/tenants/{tenant_id}/install
Delete all completed install jobs
URI Parameters
- tenant_id: required(string)
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 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
- preRelease: (one of true, false, only - default: true)
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
- npmSnapshot: (one of true, false, only - default: true)
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 - default: 1 - minimum: 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.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptorList.json",
"title": "TenantModuleDescriptorList",
"description": "List of module transitions",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required": [
"id"
]
}
}
HTTP status code 200
OK
Headers
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptorList.json",
"title": "TenantModuleDescriptorList",
"description": "List of module transitions",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required": [
"id"
]
}
}
HTTP status code 201
Install job created (async mode)
Headers
- Location: required(string)
URI to the install job
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptorList.json",
"title": "TenantModuleDescriptorList",
"description": "List of module transitions",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"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 install job status
Delete install job
get /_/proxy/tenants/{tenant_id}/install/{install_id}
Get install job status
URI Parameters
- tenant_id: required(string)
- install_id: required(string)
HTTP status code 200
OK
Headers
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InstallJob.json",
"title": "InstallJob",
"description": "Install job",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Job ID",
"type": "string"
},
"complete": {
"description": "Whether job is complete",
"type": "boolean"
},
"startDate": {
"description": "Start date",
"type": "string"
},
"endDate": {
"description": "End date",
"type": "string"
},
"modules": {
"description": "List of modules involved in install job",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptorList.json",
"title": "TenantModuleDescriptorList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required": [
"id"
]
}
}
},
"required": [
"complete",
"modules"
]
}
HTTP status code 400
User 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
Internal error
Body
Media type: text/plain
Type: any
delete /_/proxy/tenants/{tenant_id}/install/{install_id}
Delete install job
URI Parameters
- tenant_id: required(string)
- install_id: required(string)
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.
post /_/proxy/tenants/{tenant_id}/upgrade
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.
URI Parameters
- tenant_id: required(string)
Query Parameters
- preRelease: (one of true, false, only - default: true)
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
- npmSnapshot: (one of true, false, only - default: true)
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 - default: 1 - minimum: 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.
HTTP status code 200
OK
Headers
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptorList.json",
"title": "TenantModuleDescriptorList",
"description": "List of module transitions",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"message": {
"description": "Diagnostic Message",
"type": "string"
}
},
"required": [
"id"
]
}
}
HTTP status code 201
Install job created (async mode)
Headers
- Location: required(string)
URI to the install job
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptorList.json",
"title": "TenantModuleDescriptorList",
"description": "List of module transitions",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"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 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 - default: false)
Whether brief or full interface list
- type: (string)
Limit by interfaceType
HTTP status code 200
Headers
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceList.json",
"title": "InterfaceList",
"description": "Interface List",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceDescriptor.json",
"title": "InterfaceDescriptor",
"description": "An interface that a module can provide",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "Interface version in major.minor format",
"type": "string"
},
"interfaceType": {
"description": "Type: proxy (default), system, internal, multiple",
"type": [
"string",
"null"
]
},
"handlers": {
"description": "Handler entries for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Permissions for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"scope": {
"description": "Interface scope",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"version"
]
}
}
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. DEPRECATED Use /_/proxy/tenants/{tenant_id}/modules?provide={interface_id} instead.
get /_/proxy/tenants/{tenant_id}/interfaces/{interface_id}
Get all modules that provide the specified interface ID. DEPRECATED Use /_/proxy/tenants/{tenant_id}/modules?provide={interface_id} instead.
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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptorList.json",
"title": "TenantModuleDescriptorList",
"description": "List of module transitions",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TenantModuleDescriptor.json",
"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, default value is enable",
"type": "string",
"enum": [
"enable",
"disable",
"uptodate",
"suggest",
"conflict"
]
},
"stage": {
"description": "Stage for the module",
"type": "string",
"enum": [
"pending",
"deploy",
"invoke",
"undeploy",
"done"
]
},
"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
Get timers for tenant.
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.
get /_/proxy/tenants/{tenant_id}/timers
Get timers for tenant.
URI Parameters
- tenant_id: required(string)
HTTP status code 200
Headers
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TimerDescriptorList.json",
"title": "Timer Descriptor list",
"description": "Timer Descriptor List",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TimerDescriptor.json",
"title": "TimerDescriptor",
"description": "Timer",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Timer identifier",
"type": "string"
},
"modified": {
"description": "Whether modified",
"type": "boolean"
},
"routingEntry": {
"description": "Routing entry",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"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
patch /_/proxy/tenants/{tenant_id}/timers
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.
URI Parameters
- tenant_id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TimerDescriptor.json",
"title": "TimerDescriptor",
"description": "Timer",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Timer identifier",
"type": "string"
},
"modified": {
"description": "Whether modified",
"type": "boolean"
},
"routingEntry": {
"description": "Routing entry",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"required": [
"id"
]
}
get timer with id given.
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.
get /_/proxy/tenants/{tenant_id}/timers/{timer_id}
get timer with id given.
URI Parameters
- tenant_id: required(string)
- timer_id: required(string)
HTTP status code 200
Headers
- X-Okapi-Trace: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "TimerDescriptor.json",
"title": "TimerDescriptor",
"description": "Timer",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Timer identifier",
"type": "string"
},
"modified": {
"description": "Whether modified",
"type": "boolean"
},
"routingEntry": {
"description": "Routing entry",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"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
patch /_/proxy/tenants/{tenant_id}/timers/{timer_id}
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.
URI Parameters
- tenant_id: required(string)
- timer_id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
/_/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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "HealthStatusList.json",
"title": "HealthStatusList",
"description": "Health for each module as seen from proxy",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "HealthStatus.json",
"title": "Health for module as seen from proxy",
"description": "Proxy health status",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Module ID",
"type": "string"
},
"status": {
"description": "Status message",
"type": "string"
}
},
"required": [
"id",
"status"
]
}
}
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#",
"id": "PullDescriptor.json",
"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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "ModuleList.json",
"title": "ModuleList",
"description": "List of Module Descriptors",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "ModuleDescriptor.json",
"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 (does not include version)",
"type": "string"
},
"replaces": {
"description": "List of modules that this replaces",
"type": "array",
"items": {
"description": "Module name - without semantic version",
"type": "string"
}
},
"tags": {
"description": "Module tags",
"type": [
"array",
"null"
],
"items": {
"description": "Module tag",
"type": "string"
}
},
"requires": {
"description": "Required interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"provides": {
"description": "Provided interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceDescriptor.json",
"title": "InterfaceDescriptor",
"description": "An interface that a module can provide",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "Interface version in major.minor format",
"type": "string"
},
"interfaceType": {
"description": "Type: proxy (default), system, internal, multiple",
"type": [
"string",
"null"
]
},
"handlers": {
"description": "Handler entries for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Permissions for this interface",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"scope": {
"description": "Interface scope",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"version"
]
}
},
"optional": {
"description": "Optional interfaces",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "InterfaceReference.json",
"title": "InterfaceReference",
"description": "A reference to an interfaceDescriptor, by name and version",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Interface ID",
"type": "string"
},
"version": {
"description": "One or more versions in major.minor format",
"type": "string"
}
},
"required": [
"id",
"version"
]
}
},
"filters": {
"description": "Provided filters",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "RoutingEntry.json",
"title": "RoutingEntry",
"description": "Okapi proxy routing entry",
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"description": "List of methods GET, POST,.. * (for all)",
"type": "array",
"items": {
"type": "string"
}
},
"pathPattern": {
"description": "Path pattern match. * matches any path. {x} matches one or more characters but not slash",
"type": "string"
},
"path": {
"description": "Path prefix match",
"type": "string"
},
"rewritePath": {
"description": "Rewrite path. e.g. have filter rewrite '/*' to '/events/*'",
"type": "string"
},
"phase": {
"description": "If given, may be auth, pre or post",
"type": "string"
},
"level": {
"description": "Processing level. Default is 50 (handlers)",
"type": "string"
},
"type": {
"description": "Proxy handling. One of: request-response, request-only, headers, redirect, system, internal, request-response-1.0. The default is request-response",
"type": "string"
},
"redirectPath": {
"description": "If given, path that we internally redirect to",
"type": "string"
},
"unit": {
"description": "Delay unit",
"type": "string"
},
"delay": {
"description": "Delay between calls; a value of zero disables timer",
"type": "string"
},
"schedule": {
"description": "Timer schedule using cron-utils",
"type": "object",
"additionalProperties": false,
"properties": {
"cron": {
"description": "crontab specification",
"type": "string"
},
"zone": {
"description": "time zone (UTC is the default); See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html",
"type": "string"
}
}
},
"permissionsRequired": {
"description": "Required permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsDesired": {
"description": "Desired permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"modulePermissions": {
"description": "Module permissions for this entry",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"permissionsRequiredTenant": {
"description": "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}",
"type": "array",
"items": {
"type": "string"
}
},
"delegateCORS": {
"description": "Okapi handles CORS by default. Set to true to delegate CORS handling to the module. This only applies to calls made via /_/invoke/tenant/<tid>/<path>. No OPTIONS entry in the methods array is needed for this.",
"type": "boolean"
}
}
}
},
"permissionSets": {
"description": "Module Permission Sets",
"type": [
"array",
"null"
],
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "Permission.json",
"title": "Permissions Definition Schema",
"description": "Permission entity",
"type": "object",
"additionalProperties": false,
"properties": {
"permissionName": {
"description": "Permission ID (usually module.service.method or similar)",
"type": "string"
},
"replaces": {
"description": "previously used names for this permission",
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"description": "Human readable name for permission",
"type": "string"
},
"description": {
"description": "Description for permission",
"type": "string"
},
"subPermissions": {
"description": "Sub permissions",
"type": "array",
"items": {
"type": "string"
}
},
"visible": {
"description": "Whether to show the permission in UI",
"type": "boolean"
}
},
"required": [
"permissionName"
]
}
},
"env": {
"description": "Supported environment variables",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
},
"metadata": {
"description": "Module Metadata (any object)",
"type": "object"
},
"uiDescriptor": {
"description": "UI module descriptor",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "UiModuleDescriptor.json",
"title": "UiModuleDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"npm": {
"description": "NPM module",
"type": [
"string",
"null"
]
},
"url": {
"description": "URL",
"type": [
"string",
"null"
]
},
"local": {
"description": "Local",
"type": [
"string",
"null"
]
},
"args": {
"description": "Arguments",
"type": [
"string",
"null"
]
}
}
},
"launchDescriptor": {
"description": "Default deployment for this module",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "LaunchDescriptor.json",
"title": "LaunchDescriptor",
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"exec": {
"description": "Process execution with string passed to exec and %p is replaced with assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStart": {
"description": "Process start instruction where the idea is that shell or process spawned thereof goes into background on its own. The string is passed to Bourne shell (Unix Only) and %p is replaced with the assigned port",
"type": [
"string",
"null"
]
},
"cmdlineStop": {
"description": "Process stop instruction where the idea is that shell or process spawned thereof stops service",
"type": [
"string",
"null"
]
},
"dockerImage": {
"description": "Deploy using Docker container and string is Docker image",
"type": [
"string",
"null"
]
},
"dockerPull": {
"description": "Whether Docker should attempt pulling",
"type": "boolean"
},
"dockerCMD": {
"description": "Override/set CMD of Dockerfile",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dockerArgs": {
"description": "Create Container JSON object passed to create container call for Docker. See https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate",
"type": "object",
"additionalProperties": true
},
"waitIterations": {
"description": "Number of iterations that Okapi waits for module to be fully ready",
"type": "integer"
},
"env": {
"description": "Default environment for deployment",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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"
]
}
}
}
}
},
"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
/_/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#",
"id": "EnvEntry.json",
"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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntryList.json",
"title": "EnvEntryList",
"description": "List of environment variables",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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 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: (string)
Okapi trace and timing
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "EnvEntry.json",
"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).