openapi: 3.2.0 info: title: Folio Proxy Tenant Module API version: v2.0 description: 'Operations tagged proxy-tenant-module across 2 of this provider''s published API definitions: folio-mod-okapi-facade-openapi.json, folio-mod-okapi-facade-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: http://localhost:8081 description: Locally deployed server tags: - name: proxy-tenant-module paths: /_/proxy/tenants/{tenant_id}/modules: parameters: - name: tenant_id in: path required: true schema: type: string post: responses: '201': description: Created headers: X-Okapi-Trace: $ref: '#/components/headers/X-Okapi-Trace' Location: description: URI to the enabled module schema: type: string content: application/json: schema: $ref: '#/components/schemas/TenantModuleDescriptor' '400': description: Bad Request '404': description: Not Found '500': description: Server Error description: 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. operationId: enableTenantModule tags: - proxy-tenant-module requestBody: content: application/json: schema: $ref: '#/components/schemas/TenantModuleDescriptor' required: true summary: Enable tenant module x-summary-source: derived get: responses: '200': description: '' headers: X-Okapi-Trace: $ref: '#/components/headers/X-Okapi-Trace' content: application/json: schema: $ref: '#/components/schemas/ModuleList' '404': description: Not Found '500': description: Server Error description: Get enabled modules for tenant operationId: getAllTenantModules tags: - proxy-tenant-module parameters: - name: dot in: query description: If true, return Graphviz DOT content as plain text schema: default: false type: boolean - name: filter in: query description: Filter by module ID schema: type: string - name: full in: query description: Whether full or compact MD should be returned schema: default: false type: boolean - name: latest in: query description: Limit to latest N releases (most likely 1 if given) schema: type: integer - name: order in: query description: Order schema: enum: - desc - asc type: string - name: orderBy in: query description: Order by field schema: type: string - name: provide in: query description: Limit to provided interfaces (each interface name separated by comma) schema: type: string - name: require in: query description: Limit to required interfaces (each interface name separted by comma) schema: type: string - name: scope in: query description: Limit to interface scope (only useful with provide and require) schema: type: string - $ref: '#/components/parameters/query-pre-release' - $ref: '#/components/parameters/query-npm-snapshot' summary: Get all tenant modules x-summary-source: derived delete: responses: '204': description: OK headers: X-Okapi-Trace: $ref: '#/components/headers/X-Okapi-Trace' '400': description: Bad Request '404': description: Not Found '500': description: Server Error description: Disable modules for tenant operationId: disableTenantModules tags: - proxy-tenant-module parameters: - name: invoke in: query description: '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)". ' schema: default: 'true' type: string - name: purge in: query description: Disabled modules will also be purged. schema: default: false type: boolean - name: tenantParameters in: query description: Parameters for Tenant init schema: type: string summary: Disable tenant modules x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server /_/proxy/tenants/{tenant_id}/modules/{module_id}: parameters: - name: module_id in: path required: true schema: type: string - name: tenant_id in: path required: true schema: type: string get: responses: '200': description: '' headers: X-Okapi-Trace: $ref: '#/components/headers/X-Okapi-Trace' content: application/json: schema: $ref: '#/components/schemas/TenantModuleDescriptor' '404': description: Not Found description: Look up particular module selection operationId: getTenantModule tags: - proxy-tenant-module summary: Get tenant module x-summary-source: derived post: responses: '201': description: Created headers: X-Okapi-Trace: $ref: '#/components/headers/X-Okapi-Trace' Location: description: URI to the enabled module schema: type: string content: application/json: schema: $ref: '#/components/schemas/TenantModuleDescriptor' '400': description: Client Error '404': description: Not Found '500': description: Server Error description: 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. operationId: upgradeTenantModule tags: - proxy-tenant-module requestBody: content: application/json: schema: $ref: '#/components/schemas/TenantModuleDescriptor' required: true parameters: - name: invoke in: query description: '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)". ' schema: default: 'true' type: string - name: purge in: query description: Disabled modules will also be purged. schema: default: false type: boolean - name: tenantParameters in: query description: Parameters for Tenant init schema: type: string summary: Upgrade tenant module x-summary-source: derived delete: responses: '204': description: Gone headers: X-Okapi-Trace: $ref: '#/components/headers/X-Okapi-Trace' '400': description: Client Error description: Disable a module for a tenant. This call will eventually be replaced by the 'install' service. operationId: disableTenantModule tags: - proxy-tenant-module parameters: - name: invoke in: query description: '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)". ' schema: default: 'true' type: string - name: purge in: query description: Disabled modules will also be purged. schema: default: false type: boolean - name: tenantParameters in: query description: Parameters for Tenant init schema: type: string summary: Disable tenant module x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server components: headers: X-Okapi-Trace: required: false description: Okapi trace and timing schema: type: string schemas: ModuleDescriptor: $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 items: description: Module tag type: string requires: description: Required interfaces type: array items: $ref: '#/components/schemas/InterfaceReference' provides: description: Provided interfaces type: array items: $ref: '#/components/schemas/InterfaceDescriptor' optional: description: Optional interfaces type: array items: $ref: '#/components/schemas/InterfaceReference' filters: description: Provided filters type: array items: $ref: '#/components/schemas/RoutingEntry' permissionSets: description: Module Permission Sets type: array items: $ref: '#/components/schemas/Permission' env: description: Supported environment variables $ref: '#/components/schemas/EnvEntryList' metadata: description: Module Metadata (any object) type: object uiDescriptor: description: UI module descriptor $ref: '#/components/schemas/UiModuleDescriptor' launchDescriptor: description: Default deployment for this module $ref: '#/components/schemas/LaunchDescriptor' required: - id InterfaceReference: $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 LaunchDescriptor: $schema: http://json-schema.org/draft-04/schema# id: LaunchDescriptor.json title: LaunchDescriptor description: Specifies how a module is deployed and undeployed type: object EnvEntryList: $schema: http://json-schema.org/draft-04/schema# id: EnvEntryList.json title: EnvEntryList description: List of environment variables type: array items: $ref: '#/components/schemas/EnvEntry' UiModuleDescriptor: $schema: http://json-schema.org/draft-04/schema# id: UiModuleDescriptor.json title: UiModuleDescriptor description: UI Module description type: object Permission: $schema: http://json-schema.org/draft-04/schema# id: Permission.json title: Permissions Definition Schema description: Permission entity type: object ModuleList: $schema: http://json-schema.org/draft-04/schema# id: ModuleList.json title: ModuleList description: List of Module Descriptors type: array items: $ref: '#/components/schemas/ModuleDescriptor' TenantModuleDescriptor: $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 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 InterfaceDescriptor: $schema: http://json-schema.org/draft-04/schema# id: InterfaceDescriptor.json title: InterfaceDescriptor description: An interface that a module can provide type: object RoutingEntry: $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: title: RoutingEntrySchedule 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 items: type: string permissionsDesired: description: Desired permissions for this entry type: array items: type: string modulePermissions: description: Module permissions for this entry type: array 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//. No OPTIONS entry in the methods array is needed for this. type: boolean EnvEntry: $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 parameters: query-pre-release: name: preRelease in: query description: Whether to use pre-release in operation. "true": use all modules; "false": releases (no pre-releases); "only": only pre-releases. schema: default: 'true' enum: - 'true' - 'false' - only type: string query-npm-snapshot: name: npmSnapshot in: query description: Whether to use NPM module snapshots in operation. "true": use all modules; "false": releases (no NPM snapshots); "only": only NPM snapshots. schema: default: 'true' enum: - 'true' - 'false' - only type: string x-refined-from: - folio-mod-okapi-facade-openapi.json - folio-mod-okapi-facade-openapi.yml