openapi: 3.2.0 info: title: Folio Applications API version: v1 description: 'Operations tagged applications across 2 of this provider''s published API definitions: folio-mgr-applications-am-openapi.json, folio-mgr-applications-am-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: Applications paths: /applications: post: operationId: registerApplication description: Register a new application. parameters: - $ref: '#/components/parameters/x-okapi-token' - $ref: '#/components/parameters/check' tags: - Applications requestBody: content: application/json: schema: $ref: '#/components/schemas/applicationDescriptor' responses: '201': description: An application descriptor as response body content: application/json: schema: $ref: '#/components/schemas/applicationDescriptor' summary: Register application x-summary-source: derived get: operationId: getApplicationsByQuery description: 'Retrieve applications using two different modes: **Basic Mode** - Use `query`, `offset`, `limit` for simple database searches **Advanced Mode** - Use `appName`, `latest`, `preRelease`, `order`, `orderBy` for version-specific filtering Advanced mode automatically activates when you use any of the advanced parameters and provides semantic version handling.' tags: - Applications parameters: - $ref: '#/components/parameters/cql-query' - $ref: '#/components/parameters/query-offset' - $ref: '#/components/parameters/query-limit' - $ref: '#/components/parameters/full' - $ref: '#/components/parameters/appName' - $ref: '#/components/parameters/latest' - $ref: '#/components/parameters/preRelease' - $ref: '#/components/parameters/order' - $ref: '#/components/parameters/orderBy' responses: '200': description: An application descriptors list content: application/json: schema: $ref: '#/components/schemas/applicationDescriptors' '500': $ref: '#/components/responses/internal-server-error' summary: Get applications by query x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server /applications/cleanup: post: operationId: cleanupApplications description: Remove unused application descriptors and return a best-effort cleanup summary. tags: - Applications parameters: - $ref: '#/components/parameters/x-okapi-token' responses: '200': description: Applications cleanup summary content: application/json: schema: $ref: '#/components/schemas/applicationCleanupResult' '500': $ref: '#/components/responses/internal-server-error' '501': description: Applications cleanup is not supported in FAR mode content: application/json: schema: $ref: '#/components/schemas/errors' summary: Cleanup applications x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server /applications/{id}: get: operationId: getApplicationById description: Retrieve registered application by id. tags: - Applications parameters: - $ref: '#/components/parameters/path-entity-id' - $ref: '#/components/parameters/full' responses: '200': description: An application descriptor content: application/json: schema: $ref: '#/components/schemas/applicationDescriptor' '404': $ref: '#/components/responses/entity-not-found' '500': $ref: '#/components/responses/internal-server-error' summary: Get application by id x-summary-source: derived delete: operationId: deregisterApplicationById description: De-register (delete) application by id. tags: - Applications parameters: - $ref: '#/components/parameters/path-entity-id' - $ref: '#/components/parameters/x-okapi-token' responses: '204': description: An application descriptor '404': $ref: '#/components/responses/entity-not-found' '500': $ref: '#/components/responses/internal-server-error' summary: Deregister application by id x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server /applications/validate: post: operationId: validateApplicationDescriptor description: Validate application descriptor. tags: - Applications parameters: - $ref: '#/components/parameters/validation-mode' requestBody: content: application/json: schema: $ref: '#/components/schemas/applicationDescriptor' responses: '204': description: No content '400': $ref: '#/components/responses/bad-request' '500': $ref: '#/components/responses/internal-server-error' summary: Validate application descriptor x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server /applications/validate-interfaces: post: operationId: validateModulesInterfaceIntegrity description: Validate module interface integrity. tags: - Applications requestBody: content: application/json: schema: $ref: '#/components/schemas/applicationReferences' responses: '204': description: No content '400': $ref: '#/components/responses/bad-request' '500': $ref: '#/components/responses/internal-server-error' summary: Validate modules interface integrity x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server /applications/validate-descriptors: post: operationId: validateDescriptorsDependenciesIntegrity description: Validate descriptors integrity at application and interface levels. When scopeApplicationId is provided, validation is limited to that application's dependency tree; when omitted, all supplied descriptors are validated. tags: - Applications requestBody: content: application/json: schema: $ref: '#/components/schemas/applicationDescriptorsValidation' responses: '200': description: A list of application ids content: application/json: schema: $ref: '#/components/schemas/applicationIds' '400': $ref: '#/components/responses/bad-request' '500': $ref: '#/components/responses/internal-server-error' summary: Validate descriptors dependencies integrity x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server components: schemas: moduleDescriptor: $schema: http://json-schema.org/draft-04/schema# description: A FOLIO Module type: object parameter: description: List of key/value parameters of an error $schema: http://json-schema.org/draft-04/schema# type: object properties: key: description: Parameter key type: string value: description: Parameter value type: string applicationDescriptorsValidation: $schema: http://json-schema.org/draft-04/schema# type: object description: Collection of application descriptors properties: applicationDescriptors: description: List of application descriptors type: array minItems: 1 items: $ref: '#/components/schemas/applicationDescriptor' scopeApplicationId: description: Optional root application ID that must match a descriptor in applicationDescriptors. When provided, validation is limited to this application and its full dependency tree. type: string minLength: 1 required: - applicationDescriptors applicationDescriptor: $schema: http://json-schema.org/draft-04/schema# title: Application Descriptor Schema description: Application Descriptor for Application Manager Installer type: object x-implements: - org.folio.common.domain.model.Artifact allOf: - $ref: '#/components/schemas/artifact' properties: description: description: A description of application manager type: string metadata: $ref: '#/components/schemas/metadata' readonly: true modules: description: List of modules which are grouped by the application type: array id: module items: $ref: '#/components/schemas/module' uiModules: description: List of ui-modules which are grouped by the application type: array id: uiModule items: $ref: '#/components/schemas/module' moduleDescriptors: description: List of module descriptors which are grouped by the application type: array id: moduleDescriptor items: $ref: '#/components/schemas/moduleDescriptor' uiModuleDescriptors: description: List of ui module descriptors which are grouped by the application type: array id: uiModuleDescriptor items: $ref: '#/components/schemas/moduleDescriptor' dependencies: description: List of dependencies to other applications type: array id: dependency items: $ref: '#/components/schemas/dependency' deployment: description: Deployment information $ref: '#/components/schemas/applicationDeployment' additionalProperties: true applicationReferences: $schema: http://json-schema.org/draft-04/schema# type: object description: Collection of application ids properties: applicationIds: description: List of application ids type: array minItems: 1 uniqueItems: true items: description: A Name-Version id of application type: string required: - applicationIds applicationIds: type: array items: type: string validationMode: $schema: http://json-schema.org/draft-04/schema# type: string description: Validation mode enum: - default - basic - onCreate default: default errors: description: A set of errors $schema: http://json-schema.org/draft-04/schema# type: object properties: errors: id: errors description: List of errors type: array items: $ref: '#/components/schemas/error' total_records: description: Total number of errors type: integer parameters: description: List of key/value parameters of an error $schema: http://json-schema.org/draft-04/schema# type: array items: $ref: '#/components/schemas/parameter' metadata: $schema: http://json-schema.org/draft-04/schema# title: Metadata Schema description: Metadata about creation and changes to records, provided by the server (client should not provide) type: object properties: createdDate: description: Date and time when the record was created type: string format: date-time createdBy: description: ID of the user who created the record (when available) type: string format: uuid modifiedDate: description: Date and time when the record was last updated type: string format: date-time modifiedBy: description: ID of the user who last updated the record (when available) type: string format: uuid additionalProperties: false required: - createdDate applicationDescriptors: $schema: http://json-schema.org/draft-04/schema# type: object description: Collection of application descriptors properties: applicationDescriptors: description: List of application descriptors type: array id: applicationDescriptor items: $ref: '#/components/schemas/applicationDescriptor' totalRecords: description: Total number of application descriptors type: integer required: - applicationDescriptors - totalRecords errorCode: $schema: http://json-schema.org/draft-04/schema# type: string description: Error message code enum: - unknown_error - service_error - validation_error - not_found_error - found_error version: $schema: http://json-schema.org/draft-04/schema# description: A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/ type: string pattern: ^(\d+)\.(\d+)\.(\d+)(?:-([\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*))?(?:\+[\dA-Za-z-]+)?$ module: $schema: http://json-schema.org/draft-04/schema# type: object description: Module x-implements: - org.folio.common.domain.model.Artifact allOf: - $ref: '#/components/schemas/artifact' properties: url: description: URL to the artifact type: string artifact: $schema: http://json-schema.org/draft-04/schema# title: Application Artifact Schema description: Artifact Descriptor for Application Manager Installer type: object properties: id: description: A Name-Version id for identifying this artifact type: string name: description: Artifact name type: string version: description: The version of an artifact (semantic version approach) $ref: '#/components/schemas/version' additionalProperties: false required: - name - version applicationDeployment: $schema: http://json-schema.org/draft-04/schema# title: Application Deployment Schema description: An information about application deployment generated by pipelines type: object properties: modules: description: List of modules which are grouped by the application type: array id: module items: $ref: '#/components/schemas/module' ui-modules: description: List of modules which are grouped by the application type: array id: module items: $ref: '#/components/schemas/module' deployment: description: Deployment info about application type: object title: Deployment properties: type: description: type of deployment type: string chart: description: url address of application where its been deployed type: string additionalProperties: false applicationCleanupResult: $schema: http://json-schema.org/draft-04/schema# type: object description: Summary of the application cleanup execution properties: inspected: description: The total number of application descriptors inspected for cleanup type: integer minimum: 0 cleaned: description: The number of application descriptors removed successfully type: integer minimum: 0 skipped: description: The number of application descriptors skipped because they are still installed type: integer minimum: 0 failed: description: The number of application descriptors that could not be removed due to errors type: integer minimum: 0 cleanedIds: description: The identifiers of application descriptors removed successfully type: array items: type: string skippedIds: description: The identifiers of application descriptors skipped because they are still installed type: array items: type: string failedIds: description: The identifiers of application descriptors that failed cleanup type: array items: type: string required: - inspected - cleaned - skipped - failed - cleanedIds - skippedIds - failedIds dependency: $schema: http://json-schema.org/draft-04/schema# type: object description: Dependency x-class-extra-annotation: '@com.fasterxml.jackson.annotation.JsonIgnoreProperties({"id"})' properties: name: description: Artifact name type: string version: description: The concrete version of an artifact (semantic version) or the version range type: string x-extra-annotation: '@org.folio.common.domain.validation.constraints.SemVersionOrRange' optional: description: Indicates whether the dependency is optional type: boolean default: false preRelease: description: 'Controls pre-release (e.g. SNAPSHOT) inclusion when resolving this dependency''s version range: ''true'' includes pre-release alongside stable, picking the overall highest match (default); ''false'' resolves stable versions only; ''only'' resolves pre-release versions only.' type: string enum: - 'true' - 'false' - only default: 'true' additionalProperties: false required: - name - version error: description: An error $schema: http://json-schema.org/draft-04/schema# type: object properties: message: type: string description: Error message text type: type: string description: Error message type code: description: Error message code $ref: '#/components/schemas/errorCode' parameters: description: Error message parameters $ref: '#/components/schemas/parameters' parameters: preRelease: in: query name: preRelease required: false description: 'Control whether pre-release versions are included. - "true" → include all versions (default) - "false" → only stable releases - "only" → only pre-releases ' schema: type: string enum: - true - false - only default: true example: false full: name: full in: query required: false description: Show full information in the response including ModuleDescriptors schema: type: boolean default: false orderBy: in: query name: orderBy required: false description: Field name to order results by. schema: type: string enum: - id - version default: version example: version cql-query: name: query in: query description: A CQL query string with search conditions. schema: type: string x-okapi-token: name: x-okapi-token in: header required: false description: An OKAPI authentication token schema: type: string query-limit: in: query required: false name: limit description: Limit the number of elements returned in the response. schema: type: integer minimum: 0 maximum: 500 default: 10 path-entity-id: in: path required: true name: id description: Entity/document id schema: type: string order: in: query name: order required: false description: Sort order of the results. schema: type: string enum: - asc - desc default: desc example: desc check: in: query name: check required: false description: 'Whether to run default validation of application descriptor or not Default validation mode specified in the application properties ' schema: type: boolean default: true validation-mode: in: query name: mode required: false description: Validation mode to be applied schema: $ref: '#/components/schemas/validationMode' latest: in: query name: latest required: false description: Limit results to the latest N releases per application name using SemVer comparison. Common use case - latest=1 for the most recent release. schema: type: integer minimum: 1 query-offset: in: query required: false name: offset description: Skip over a number of elements by specifying an offset value for the query. schema: type: integer minimum: 0 default: 0 appName: in: query name: appName required: false description: Filter results by application name. schema: type: string example: my-app responses: bad-request: description: Error response if request body contains validation error (in json format) content: application/json: schema: $ref: '#/components/schemas/errors' entity-not-found: description: Error response if entity is not found by id (in json format) content: application/json: schema: $ref: '#/components/schemas/errors' internal-server-error: description: Error response for unhandled or critical server exceptions, e.g. NullPointerException. content: application/json: schema: $ref: '#/components/schemas/errors' x-refined-from: - folio-mgr-applications-am-openapi.json - folio-mgr-applications-am-openapi.yml