foliolib.folio.api.mgrApplications.Am

class foliolib.folio.api.mgrApplications.Am(tenant: str)

Bases: foliolib.folio.FolioApi

Manager Applications API

Manager Applications API

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

createmodulediscoveries(moduleDiscoveries)

Creates module discovery information in a batch

createmodulediscovery(moduleDiscovery, id_)

Creates a discovery for the module referenced by id.

deletemodulediscovery(id_)

Delete discovery of the module referenced by id.

deregisterapplicationbyid(id_)

De-register (delete) application by id.

getapplicationbyid(id_, **kwargs)

Retrieve registered application by id.

getapplicationsbyquery(**kwargs)

Retrieve registered application by query.

getdiscovery(id_, **kwargs)

Retrieve module discovery info for application referenced by id.

getmodulebootstrap(id_)

Retrieve bootstrap information for module referenced by id

getmodulediscovery(id_)

Retrieving discovery for the module referenced by id.

registerapplication(applicationDescriptor, ...)

Register a new application.

searchmodulediscovery(**kwargs)

Retrieving module discovery information by CQL query and pagination parameters.

updatemodulediscovery(moduleDiscovery, id_)

Update discovery for the module referenced by id.

validateapplicationdescriptor(...)

Validate application descriptor.

createmodulediscoveries(moduleDiscoveries)

Creates module discovery information in a batch

POST /modules/discovery

Parameters

moduleDiscoveries (dict) – See Schema below.

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestError – Error response if request body contains validation error (in json format)

  • OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "description": "Collection of discovery information for modules that comprise an application",
    "properties": {
        "discovery": {
            "description": "Discovery information for the modules that comprise this application",
            "type": "array",
            "id": "moduleDiscovery",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "description": "Module discovery information",
                "x-implements": [
                    "org.folio.am.domain.model.Artifact"
                ],
                "allOf": [
                    {
                        "$ref": "../common/artifact.json"
                    }
                ],
                "properties": {
                    "location": {
                        "description": "A url address of module where its been deployed",
                        "type": "string"
                    }
                },
                "required": [
                    "location"
                ]
            }
        },
        "totalRecords": {
            "readOnly": true,
            "description": "The total number of records matching the provided criteria",
            "type": "integer",
            "format": "int64"
        }
    },
    "required": [
        "discovery"
    ]
}
createmodulediscovery(moduleDiscovery, id_)

Creates a discovery for the module referenced by id.

POST /modules/{id}/discovery

Parameters

moduleDiscovery (dict) – See Schema below.

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestError – Error response if request body contains validation error (in json format)

  • OkapiRequestNotFound – Error response if entity is not found by id (in json format)

  • OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "description": "Module discovery information",
    "x-implements": [
        "org.folio.am.domain.model.Artifact"
    ],
    "allOf": [
        {
            "$ref": "../common/artifact.json"
        }
    ],
    "properties": {
        "location": {
            "description": "A url address of module where its been deployed",
            "type": "string"
        }
    },
    "required": [
        "location"
    ]
}
deletemodulediscovery(id_)

Delete discovery of the module referenced by id.

DELETE /modules/{id}/discovery

Raises

OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

deregisterapplicationbyid(id_)

De-register (delete) application by id.

DELETE /applications/{id}

Raises
  • OkapiRequestNotFound – Error response if entity is not found by id (in json format)

  • OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

getapplicationbyid(id_, **kwargs)

Retrieve registered application by id.

GET /applications/{id}

Keyword Arguments

full (bool) – Show full information in the response including ModuleDescriptors (default: False)

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestNotFound – Error response if entity is not found by id (in json format)

  • OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

Schema

{
    "$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.am.domain.model.Artifact"
    ],
    "allOf": [
        {
            "$ref": "common/artifact.json"
        }
    ],
    "properties": {
        "description": {
            "description": "A description of application manager",
            "type": "string"
        },
        "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"
            ]
        },
        "modules": {
            "description": "List of modules which are grouped by the application",
            "type": "array",
            "id": "module",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "description": "Module",
                "x-implements": [
                    "org.folio.am.domain.model.Artifact"
                ],
                "allOf": [
                    {
                        "$ref": "../common/artifact.json"
                    }
                ],
                "properties": {
                    "url": {
                        "description": "URL to the artifact",
                        "type": "string"
                    }
                }
            }
        },
        "uiModules": {
            "description": "List of ui-modules which are grouped by the application",
            "type": "array",
            "id": "uiModule",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "description": "Module",
                "x-implements": [
                    "org.folio.am.domain.model.Artifact"
                ],
                "allOf": [
                    {
                        "$ref": "../common/artifact.json"
                    }
                ],
                "properties": {
                    "url": {
                        "description": "URL to the artifact",
                        "type": "string"
                    }
                }
            }
        },
        "moduleDescriptors": {
            "description": "List of module descriptors which are grouped by the application",
            "type": "array",
            "id": "moduleDescriptor",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "description": "A FOLIO Module",
                "type": "object"
            }
        },
        "uiModuleDescriptors": {
            "description": "List of ui module descriptors which are grouped by the application",
            "type": "array",
            "id": "uiModuleDescriptor",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "description": "A FOLIO Module",
                "type": "object"
            }
        },
        "platform": {
            "description": "information about version of a platform",
            "type": "string"
        },
        "dependencies": {
            "description": "List of dependencies to other applications",
            "type": "array",
            "id": "dependency",
            "items": {
                "$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.am.domain.validation.constraints.SemVersionOrRange"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "name",
                    "version"
                ]
            }
        },
        "deployment": {
            "$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": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "type": "object",
                        "description": "Module",
                        "x-implements": [
                            "org.folio.am.domain.model.Artifact"
                        ],
                        "allOf": [
                            {
                                "$ref": "../common/artifact.json"
                            }
                        ],
                        "properties": {
                            "url": {
                                "description": "URL to the artifact",
                                "type": "string"
                            }
                        }
                    }
                },
                "ui-modules": {
                    "description": "List of modules which are grouped by the application",
                    "type": "array",
                    "id": "module",
                    "items": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "type": "object",
                        "description": "Module",
                        "x-implements": [
                            "org.folio.am.domain.model.Artifact"
                        ],
                        "allOf": [
                            {
                                "$ref": "../common/artifact.json"
                            }
                        ],
                        "properties": {
                            "url": {
                                "description": "URL to the artifact",
                                "type": "string"
                            }
                        }
                    }
                },
                "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
        }
    },
    "additionalProperties": false
}
getapplicationsbyquery(**kwargs)

Retrieve registered application by query.

GET /applications

Keyword Arguments
  • query (str) – A CQL query string with search conditions.

  • offset (int) – Skip over a number of elements by specifying an offset value for the query. (minimum: 0, default: 0)

  • limit (int) – Limit the number of elements returned in the response. (minimum: 0, maximum: 500, default: 10)

  • full (bool) – Show full information in the response including ModuleDescriptors (default: False)

Returns

See Schema below.

Return type

dict

Raises

OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

Schema

{
    "$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": {
                "$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.am.domain.model.Artifact"
                ],
                "allOf": [
                    {
                        "$ref": "common/artifact.json"
                    }
                ],
                "properties": {
                    "description": {
                        "description": "A description of application manager",
                        "type": "string"
                    },
                    "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"
                        ]
                    },
                    "modules": {
                        "description": "List of modules which are grouped by the application",
                        "type": "array",
                        "id": "module",
                        "items": {
                            "$schema": "http://json-schema.org/draft-04/schema#",
                            "type": "object",
                            "description": "Module",
                            "x-implements": [
                                "org.folio.am.domain.model.Artifact"
                            ],
                            "allOf": [
                                {
                                    "$ref": "../common/artifact.json"
                                }
                            ],
                            "properties": {
                                "url": {
                                    "description": "URL to the artifact",
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "uiModules": {
                        "description": "List of ui-modules which are grouped by the application",
                        "type": "array",
                        "id": "uiModule",
                        "items": {
                            "$schema": "http://json-schema.org/draft-04/schema#",
                            "type": "object",
                            "description": "Module",
                            "x-implements": [
                                "org.folio.am.domain.model.Artifact"
                            ],
                            "allOf": [
                                {
                                    "$ref": "../common/artifact.json"
                                }
                            ],
                            "properties": {
                                "url": {
                                    "description": "URL to the artifact",
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "moduleDescriptors": {
                        "description": "List of module descriptors which are grouped by the application",
                        "type": "array",
                        "id": "moduleDescriptor",
                        "items": {
                            "$schema": "http://json-schema.org/draft-04/schema#",
                            "description": "A FOLIO Module",
                            "type": "object"
                        }
                    },
                    "uiModuleDescriptors": {
                        "description": "List of ui module descriptors which are grouped by the application",
                        "type": "array",
                        "id": "uiModuleDescriptor",
                        "items": {
                            "$schema": "http://json-schema.org/draft-04/schema#",
                            "description": "A FOLIO Module",
                            "type": "object"
                        }
                    },
                    "platform": {
                        "description": "information about version of a platform",
                        "type": "string"
                    },
                    "dependencies": {
                        "description": "List of dependencies to other applications",
                        "type": "array",
                        "id": "dependency",
                        "items": {
                            "$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.am.domain.validation.constraints.SemVersionOrRange"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "name",
                                "version"
                            ]
                        }
                    },
                    "deployment": {
                        "$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": {
                                    "$schema": "http://json-schema.org/draft-04/schema#",
                                    "type": "object",
                                    "description": "Module",
                                    "x-implements": [
                                        "org.folio.am.domain.model.Artifact"
                                    ],
                                    "allOf": [
                                        {
                                            "$ref": "../common/artifact.json"
                                        }
                                    ],
                                    "properties": {
                                        "url": {
                                            "description": "URL to the artifact",
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "ui-modules": {
                                "description": "List of modules which are grouped by the application",
                                "type": "array",
                                "id": "module",
                                "items": {
                                    "$schema": "http://json-schema.org/draft-04/schema#",
                                    "type": "object",
                                    "description": "Module",
                                    "x-implements": [
                                        "org.folio.am.domain.model.Artifact"
                                    ],
                                    "allOf": [
                                        {
                                            "$ref": "../common/artifact.json"
                                        }
                                    ],
                                    "properties": {
                                        "url": {
                                            "description": "URL to the artifact",
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "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
                    }
                },
                "additionalProperties": false
            }
        },
        "totalRecords": {
            "type": "integer"
        }
    },
    "required": [
        "applicationDescriptors",
        "totalRecords"
    ]
}
getdiscovery(id_, **kwargs)

Retrieve module discovery info for application referenced by id.

GET /applications/{id}/discovery

Keyword Arguments
  • offset (int) – Skip over a number of elements by specifying an offset value for the query. (minimum: 0, default: 0)

  • limit (int) – Limit the number of elements returned in the response. (minimum: 0, maximum: 500, default: 10)

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestError – Error response if request body contains validation error (in json format)

  • OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "description": "Collection of discovery information for modules that comprise an application",
    "properties": {
        "discovery": {
            "description": "Discovery information for the modules that comprise this application",
            "type": "array",
            "id": "moduleDiscovery",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "description": "Module discovery information",
                "x-implements": [
                    "org.folio.am.domain.model.Artifact"
                ],
                "allOf": [
                    {
                        "$ref": "../common/artifact.json"
                    }
                ],
                "properties": {
                    "location": {
                        "description": "A url address of module where its been deployed",
                        "type": "string"
                    }
                },
                "required": [
                    "location"
                ]
            }
        },
        "totalRecords": {
            "readOnly": true,
            "description": "The total number of records matching the provided criteria",
            "type": "integer",
            "format": "int64"
        }
    },
    "required": [
        "discovery"
    ]
}
getmodulebootstrap(id_)

Retrieve bootstrap information for module referenced by id

GET /modules/{id}

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestNotFound – Error response if entity is not found by id (in json format)

  • OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "description": "Bootstrap information of the module",
    "properties": {
        "module": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "A Module bootstrap discovery information",
            "type": "object",
            "properties": {
                "moduleId": {
                    "description": "Module ID",
                    "type": "string"
                },
                "applicationId": {
                    "description": "Application ID",
                    "type": "string"
                },
                "location": {
                    "description": "Module location",
                    "type": "string"
                },
                "interfaces": {
                    "description": "Provided interfaces",
                    "type": "array",
                    "items": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "description": "An interface that a module can provide",
                        "type": "object",
                        "properties": {
                            "id": {
                                "description": "Interface ID",
                                "type": "string"
                            },
                            "version": {
                                "description": "Interface version in major.minor format",
                                "type": "string"
                            },
                            "interfaceType": {
                                "description": "Interface type",
                                "type": "string"
                            },
                            "endpoints": {
                                "description": "Endpoint entries for this interface",
                                "type": "array",
                                "items": {
                                    "$schema": "http://json-schema.org/draft-04/schema#",
                                    "description": "An endpoint that an interface can provide",
                                    "type": "object",
                                    "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"
                                        },
                                        "permissionsRequired": {
                                            "description": "Required permissions",
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "required": [
                            "id",
                            "version",
                            "endpoints"
                        ]
                    }
                }
            },
            "required": [
                "moduleId",
                "applicationId"
            ]
        },
        "requiredModules": {
            "description": "Discovery information for the required modules",
            "type": "array",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "description": "A Module bootstrap discovery information",
                "type": "object",
                "properties": {
                    "moduleId": {
                        "description": "Module ID",
                        "type": "string"
                    },
                    "applicationId": {
                        "description": "Application ID",
                        "type": "string"
                    },
                    "location": {
                        "description": "Module location",
                        "type": "string"
                    },
                    "interfaces": {
                        "description": "Provided interfaces",
                        "type": "array",
                        "items": {
                            "$schema": "http://json-schema.org/draft-04/schema#",
                            "description": "An interface that a module can provide",
                            "type": "object",
                            "properties": {
                                "id": {
                                    "description": "Interface ID",
                                    "type": "string"
                                },
                                "version": {
                                    "description": "Interface version in major.minor format",
                                    "type": "string"
                                },
                                "interfaceType": {
                                    "description": "Interface type",
                                    "type": "string"
                                },
                                "endpoints": {
                                    "description": "Endpoint entries for this interface",
                                    "type": "array",
                                    "items": {
                                        "$schema": "http://json-schema.org/draft-04/schema#",
                                        "description": "An endpoint that an interface can provide",
                                        "type": "object",
                                        "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"
                                            },
                                            "permissionsRequired": {
                                                "description": "Required permissions",
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            },
                            "required": [
                                "id",
                                "version",
                                "endpoints"
                            ]
                        }
                    }
                },
                "required": [
                    "moduleId",
                    "applicationId"
                ]
            }
        }
    },
    "required": [
        "module"
    ]
}
getmodulediscovery(id_)

Retrieving discovery for the module referenced by id.

GET /modules/{id}/discovery

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestNotFound – Error response if entity is not found by id (in json format)

  • OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "description": "Module discovery information",
    "x-implements": [
        "org.folio.am.domain.model.Artifact"
    ],
    "allOf": [
        {
            "$ref": "../common/artifact.json"
        }
    ],
    "properties": {
        "location": {
            "description": "A url address of module where its been deployed",
            "type": "string"
        }
    },
    "required": [
        "location"
    ]
}
registerapplication(applicationDescriptor, **kwargs)

Register a new application.

POST /applications

Args:

applicationDescriptor (dict): See Schema below.

Keyword Args:

check (bool): Whether to run default validation of application descriptor or not

Default validation mode specified in the application properties

(default: True)

Returns:

dict: See Schema below.

Schema:

{
    "$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.am.domain.model.Artifact"
    ],
    "allOf": [
        {
            "$ref": "common/artifact.json"
        }
    ],
    "properties": {
        "description": {
            "description": "A description of application manager",
            "type": "string"
        },
        "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"
            ]
        },
        "modules": {
            "description": "List of modules which are grouped by the application",
            "type": "array",
            "id": "module",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "description": "Module",
                "x-implements": [
                    "org.folio.am.domain.model.Artifact"
                ],
                "allOf": [
                    {
                        "$ref": "../common/artifact.json"
                    }
                ],
                "properties": {
                    "url": {
                        "description": "URL to the artifact",
                        "type": "string"
                    }
                }
            }
        },
        "uiModules": {
            "description": "List of ui-modules which are grouped by the application",
            "type": "array",
            "id": "uiModule",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "description": "Module",
                "x-implements": [
                    "org.folio.am.domain.model.Artifact"
                ],
                "allOf": [
                    {
                        "$ref": "../common/artifact.json"
                    }
                ],
                "properties": {
                    "url": {
                        "description": "URL to the artifact",
                        "type": "string"
                    }
                }
            }
        },
        "moduleDescriptors": {
            "description": "List of module descriptors which are grouped by the application",
            "type": "array",
            "id": "moduleDescriptor",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "description": "A FOLIO Module",
                "type": "object"
            }
        },
        "uiModuleDescriptors": {
            "description": "List of ui module descriptors which are grouped by the application",
            "type": "array",
            "id": "uiModuleDescriptor",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "description": "A FOLIO Module",
                "type": "object"
            }
        },
        "platform": {
            "description": "information about version of a platform",
            "type": "string"
        },
        "dependencies": {
            "description": "List of dependencies to other applications",
            "type": "array",
            "id": "dependency",
            "items": {
                "$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.am.domain.validation.constraints.SemVersionOrRange"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "name",
                    "version"
                ]
            }
        },
        "deployment": {
            "$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": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "type": "object",
                        "description": "Module",
                        "x-implements": [
                            "org.folio.am.domain.model.Artifact"
                        ],
                        "allOf": [
                            {
                                "$ref": "../common/artifact.json"
                            }
                        ],
                        "properties": {
                            "url": {
                                "description": "URL to the artifact",
                                "type": "string"
                            }
                        }
                    }
                },
                "ui-modules": {
                    "description": "List of modules which are grouped by the application",
                    "type": "array",
                    "id": "module",
                    "items": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "type": "object",
                        "description": "Module",
                        "x-implements": [
                            "org.folio.am.domain.model.Artifact"
                        ],
                        "allOf": [
                            {
                                "$ref": "../common/artifact.json"
                            }
                        ],
                        "properties": {
                            "url": {
                                "description": "URL to the artifact",
                                "type": "string"
                            }
                        }
                    }
                },
                "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
        }
    },
    "additionalProperties": false
}
searchmodulediscovery(**kwargs)

Retrieving module discovery information by CQL query and pagination parameters.

GET /modules/discovery

Keyword Arguments
  • query (str) – A CQL query string with search conditions.

  • offset (int) – Skip over a number of elements by specifying an offset value for the query. (minimum: 0, default: 0)

  • limit (int) – Limit the number of elements returned in the response. (minimum: 0, maximum: 500, default: 10)

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestError – Error response if request body contains validation error (in json format)

  • OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "description": "Collection of discovery information for modules that comprise an application",
    "properties": {
        "discovery": {
            "description": "Discovery information for the modules that comprise this application",
            "type": "array",
            "id": "moduleDiscovery",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "description": "Module discovery information",
                "x-implements": [
                    "org.folio.am.domain.model.Artifact"
                ],
                "allOf": [
                    {
                        "$ref": "../common/artifact.json"
                    }
                ],
                "properties": {
                    "location": {
                        "description": "A url address of module where its been deployed",
                        "type": "string"
                    }
                },
                "required": [
                    "location"
                ]
            }
        },
        "totalRecords": {
            "readOnly": true,
            "description": "The total number of records matching the provided criteria",
            "type": "integer",
            "format": "int64"
        }
    },
    "required": [
        "discovery"
    ]
}
updatemodulediscovery(moduleDiscovery, id_)

Update discovery for the module referenced by id.

PUT /modules/{id}/discovery

Parameters

moduleDiscovery (dict) – See Schema below.

Raises
  • OkapiRequestError – Error response if request body contains validation error (in json format)

  • OkapiRequestNotFound – Error response if entity is not found by id (in json format)

  • OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "description": "Module discovery information",
    "x-implements": [
        "org.folio.am.domain.model.Artifact"
    ],
    "allOf": [
        {
            "$ref": "../common/artifact.json"
        }
    ],
    "properties": {
        "location": {
            "description": "A url address of module where its been deployed",
            "type": "string"
        }
    },
    "required": [
        "location"
    ]
}
validateapplicationdescriptor(applicationDescriptor, **kwargs)

Validate application descriptor.

POST /applications/validate

Parameters

applicationDescriptor (dict) – See Schema below.

Keyword Arguments

mode (str) – Validation mode to be applied

Raises
  • OkapiRequestError – Error response if request body contains validation error (in json format)

  • OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.

Schema

{
    "$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.am.domain.model.Artifact"
    ],
    "allOf": [
        {
            "$ref": "common/artifact.json"
        }
    ],
    "properties": {
        "description": {
            "description": "A description of application manager",
            "type": "string"
        },
        "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"
            ]
        },
        "modules": {
            "description": "List of modules which are grouped by the application",
            "type": "array",
            "id": "module",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "description": "Module",
                "x-implements": [
                    "org.folio.am.domain.model.Artifact"
                ],
                "allOf": [
                    {
                        "$ref": "../common/artifact.json"
                    }
                ],
                "properties": {
                    "url": {
                        "description": "URL to the artifact",
                        "type": "string"
                    }
                }
            }
        },
        "uiModules": {
            "description": "List of ui-modules which are grouped by the application",
            "type": "array",
            "id": "uiModule",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "description": "Module",
                "x-implements": [
                    "org.folio.am.domain.model.Artifact"
                ],
                "allOf": [
                    {
                        "$ref": "../common/artifact.json"
                    }
                ],
                "properties": {
                    "url": {
                        "description": "URL to the artifact",
                        "type": "string"
                    }
                }
            }
        },
        "moduleDescriptors": {
            "description": "List of module descriptors which are grouped by the application",
            "type": "array",
            "id": "moduleDescriptor",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "description": "A FOLIO Module",
                "type": "object"
            }
        },
        "uiModuleDescriptors": {
            "description": "List of ui module descriptors which are grouped by the application",
            "type": "array",
            "id": "uiModuleDescriptor",
            "items": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "description": "A FOLIO Module",
                "type": "object"
            }
        },
        "platform": {
            "description": "information about version of a platform",
            "type": "string"
        },
        "dependencies": {
            "description": "List of dependencies to other applications",
            "type": "array",
            "id": "dependency",
            "items": {
                "$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.am.domain.validation.constraints.SemVersionOrRange"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "name",
                    "version"
                ]
            }
        },
        "deployment": {
            "$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": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "type": "object",
                        "description": "Module",
                        "x-implements": [
                            "org.folio.am.domain.model.Artifact"
                        ],
                        "allOf": [
                            {
                                "$ref": "../common/artifact.json"
                            }
                        ],
                        "properties": {
                            "url": {
                                "description": "URL to the artifact",
                                "type": "string"
                            }
                        }
                    }
                },
                "ui-modules": {
                    "description": "List of modules which are grouped by the application",
                    "type": "array",
                    "id": "module",
                    "items": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "type": "object",
                        "description": "Module",
                        "x-implements": [
                            "org.folio.am.domain.model.Artifact"
                        ],
                        "allOf": [
                            {
                                "$ref": "../common/artifact.json"
                            }
                        ],
                        "properties": {
                            "url": {
                                "description": "URL to the artifact",
                                "type": "string"
                            }
                        }
                    }
                },
                "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
        }
    },
    "additionalProperties": false
}