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.
POST /_/deployment/modules
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"
]
}
Created
URI to the descriptor of the deployed instance
Okapi trace and timing
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"
]
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
List all deployed instances
GET /_/deployment/modules
Okapi trace and timing
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
GET /_/deployment/modules/{instance_id}
Okapi trace and timing
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"
]
}
Not Found
Media type: text/plain
Type: any
Shutdown instance
DELETE /_/deployment/modules/{instance_id}
Okapi trace and timing
Discovery service. This is responsible for monitoring all instances (deployed) on, possibly many, deployment nodes.
Register instance under a specified service id
POST /_/discovery/modules
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"
]
}
Created
URI to the registered instance
Okapi trace and timing
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"
]
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Return all instances
GET /_/discovery/modules
OK
Okapi trace and timing
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"
]
}
}
Bad Request
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
List all instances for a particular service
GET /_/discovery/modules/{service_id}
Okapi trace and timing
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"
]
}
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Remove registration for a given instance
DELETE /_/discovery/modules/{service_id}
No Content
Okapi trace and timing
Not Found
Media type: text/plain
Type: any
Get registration of a specified instance
GET /_/discovery/modules/{service_id}/{instance_id}
Okapi trace and timing
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"
]
}
Not Found
Media type: text/plain
Type: any
Remove registration for a given instance
DELETE /_/discovery/modules/{service_id}/{instance_id}
Okapi trace and timing
Not Found
Media type: text/plain
Type: any
Health service for individual instances
Get health info for all services
GET /_/discovery/health
Okapi trace and timing
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"
]
}
}
Bad Request
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Health for all instances for a particular service
GET /_/discovery/health/{service_id}
Okapi trace and timing
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"
]
}
}
Not Found
Media type: text/plain
Type: any
Get health for a particular instance
GET /_/discovery/health/{service_id}/{instance_id}
Okapi trace and timing
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"
]
}
Not Found
Media type: text/plain
Type: any
Get information about nodes
Get list of all nodes
GET /_/discovery/nodes
Okapi trace and timing
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"
]
}
}
Bad Request
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Update descriptor of a particular node, only the name can be changed
PUT /_/discovery/nodes/{node_id}
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"
]
}
Okapi trace and timing
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"
]
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Get info for one node
GET /_/discovery/nodes/{node_id}
Okapi trace and timing
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"
]
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
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
Whether to check dependencies
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.
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 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
Force removal of modules that depend on obsolete snapshots
The number of latest releases where snapshots are never considered obsolete
The number of latest snapshots that are never considered obsolete (preserved)
Proxy modules service
Announce new module to the proxy. Once successful a module can be selected for a specific tenant.
POST /_/proxy/modules
Whether to check dependencies
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.
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"
]
}
Created
Okapi trace and timing
URI to the created module instance
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"
]
}
Bad Request
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
List all or subset of modules for proxy
GET /_/proxy/modules
If true, return Graphviz DOT content as plain text
Filter by module ID
Whether full or compact MD should be returned
Limit to latest N releases (most likely 1 if given)
Order
Order by field
Limit to provided interfaces (each interface name separated by comma)
Limit to required interfaces (each interface name separated by comma)
Limit to interface scope (only useful with provide and require)
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.
Okapi trace and timing
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
Bad Request
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Retrieve descriptor for a particular module
GET /_/proxy/modules/{module_id}
Okapi trace and timing
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"
]
}
Remove module descriptor for a particular module, module will no longer be selectable by tenants
DELETE /_/proxy/modules/{module_id}
Tenants service
Create a new tenant
POST /_/proxy/tenants
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"
}
}
}
Tenant has been created
Okapi trace and timing
URI to the created tenant
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"
}
}
}
Bad Request
Media type: text/plain
Type: any
List all tenants
GET /_/proxy/tenants
List of tenants in a brief format
Okapi trace and timing
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
GET /_/proxy/tenants/{tenant_id}
Okapi trace and timing
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"
}
}
}
Not Found
Media type: text/plain
Type: any
Update a tenant
PUT /_/proxy/tenants/{tenant_id}
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"
}
}
}
Okapi trace and timing
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"
}
}
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Remove a tenant
DELETE /_/proxy/tenants/{tenant_id}
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.
POST /_/proxy/tenants/{tenant_id}/modules
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"
]
}
Created
Okapi trace and timing
URI to the enabled module
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"
]
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Get enabled modules for tenant
GET /_/proxy/tenants/{tenant_id}/modules
If true, return Graphviz DOT content as plain text
Filter by module ID
Whether full or compact MD should be returned
Limit to latest N releases (most likely 1 if given)
Order
Order by field
Limit to provided interfaces (each interface name separated by comma)
Limit to required interfaces (each interface name separted by comma)
Limit to interface scope (only useful with provide and require)
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.
Okapi trace and timing
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
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Disable modules for tenant
DELETE /_/proxy/tenants/{tenant_id}/modules
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)".
Disabled modules will also be purged.
Parameters for Tenant init
Look up particular module selection
GET /_/proxy/tenants/{tenant_id}/modules/{module_id}
Okapi trace and timing
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"
]
}
Not Found
Media type: text/plain
Type: any
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.
POST /_/proxy/tenants/{tenant_id}/modules/{module_id}
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)".
Disabled modules will also be purged.
Parameters for Tenant init
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"
]
}
Created
Okapi trace and timing
URI to the enabled module
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"
]
}
Client Error
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Disable a module for a tenant. This call will eventually be replaced by the 'install' service.
DELETE /_/proxy/tenants/{tenant_id}/modules/{module_id}
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)".
Disabled modules will also be purged.
Parameters for Tenant init
Gone
Okapi trace and timing
Client Error
Media type: text/plain
Type: any
Retrieve information about all install/upgrade jobs - including those that are ongoing.
GET /_/proxy/tenants/{tenant_id}/install
OK
Okapi trace and timing
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"
]
}
}
User error
Media type: text/plain
Type: any
Tenant not Found
Media type: text/plain
Type: any
User error
Media type: text/plain
Type: any
Delete all completed install jobs
DELETE /_/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.
POST /_/proxy/tenants/{tenant_id}/install
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.
Whether to install in the background.
Whether to deploy (or undeploy if disabling).
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).
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").
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.
Disabled modules will also be purged.
Whether to install modules even if up-to-update.
Whether the installation is simulated
Parameters for tenant init
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.
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"
]
}
}
OK
Okapi trace and timing
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"
]
}
}
Install job created (async mode)
URI to the install job
Okapi trace and timing
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"
]
}
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Get install job status
GET /_/proxy/tenants/{tenant_id}/install/{install_id}
OK
Okapi trace and timing
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"
]
}
User error
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Internal error
Media type: text/plain
Type: any
Delete install job
DELETE /_/proxy/tenants/{tenant_id}/install/{install_id}
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
Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases.
Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots.
Whether to install in the background.
Whether to deploy (or undeploy if disabling).
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).
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").
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.
Disabled modules will also be purged.
Whether to install modules even if up-to-update.
Whether the installation is simulated
Parameters for tenant init
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.
OK
Okapi trace and timing
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"
]
}
}
Install job created (async mode)
URI to the install job
Okapi trace and timing
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"
]
}
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Get all interfaces for tenant
GET /_/proxy/tenants/{tenant_id}/interfaces
Whether brief or full interface list
Limit by interfaceType
Okapi trace and timing
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"
]
}
}
Client Error
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
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}
Limit by interfaceType
Okapi trace and timing
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"
]
}
}
Client Error
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Get timers for tenant.
GET /_/proxy/tenants/{tenant_id}/timers
Okapi trace and timing
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"
]
}
}
Client Error
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
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.
PATCH /_/proxy/tenants/{tenant_id}/timers
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.
GET /_/proxy/tenants/{tenant_id}/timers/{timer_id}
Okapi trace and timing
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"
]
}
Client Error
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
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.
PATCH /_/proxy/tenants/{tenant_id}/timers/{timer_id}
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"
}
}
}
Health of modules as seen from proxy
Check health of modules
GET /_/proxy/health
OK
Okapi trace and timing
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"
]
}
}
Server Error
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
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"
}
}
}
}
OK
Okapi trace and timing
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"
]
}
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
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
POST /_/env
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"
]
}
Created
URI to the environment entry instance
Okapi trace and timing
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"
]
}
Bad Request
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Get list of all environment variables
GET /_/env
Okapi trace and timing
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"
]
}
}
Bad Request
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Get info for one environment variable
GET /_/env/{id}
Okapi trace and timing
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"
]
}
Bad Request
Media type: text/plain
Type: any
Not Found
Media type: text/plain
Type: any
Server Error
Media type: text/plain
Type: any
Remove environment variable
DELETE /_/env/{id}
Okapi trace and timing
Not Found
Media type: text/plain
Type: any
Service for getting information about Okapi
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).
GET /_/invoke/tenant/{id}