Giter Club home page Giter Club logo

module-manager's Introduction

DX Module Manager

DX module that provides enterprise level module management functionality

Install one or multiple bundle(s)

Install the specified bundle(s), optionally starting it/them right after and return the operation result(s).

In case you need to deploy multiple bundles at the same time, you can do it in one call to avoid multiple "refresh" of dependencies, for that you just need one "bundle" parameter for each bundle you want to deploy.

  • URL

    /

  • Method:

    POST

  • Consume:

    multipart/form-data

  • Params

    start=[boolean]: true, if the bundle should be started right after installation

    target=[string]: The group of cluster nodes targeted by the operation

    Required:

    bundle=[file]: a bundle to be deploy, this parameter can be repeat for each bundle that need to be deploy, at least one bundle is required

  • Success Response:

    • Code: 200
      Content: {"bundleInfos":[{"groupId":"org.jahia.modules","symbolicName":"article","version":"2.0.3.SNAPSHOT","key":"org.jahia.modules/article/2.0.3.SNAPSHOT"}],"message":"Operation successful"}

    • Code: 200
      Content: {"bundleInfos":[{"groupId":"org.jahia.modules","symbolicName":"article","version":"3.0.0.SNAPSHOT","key":"org.jahia.modules/article/3.0.0.SNAPSHOT"},{"groupId":"org.jahia.modules","symbolicName":"news","version":"2.0.2.SNAPSHOT","key":"org.jahia.modules/news/2.0.2.SNAPSHOT"}],"message":"Operation successful"}

  • Error Response:

    • Code: 400 BAD REQUEST
      Content: {"status":400,"reasonPhrase":"Bad Request","message":"Unable to install module. Cause: Submitted bundle is either not a valid OSGi bundle or has no required manifest headers Bundle-SymbolicName and Implementation-Version/Bundle-Version"}

    OR

    • Code: 401 UNAUTHORIZED
      Content: user /users/hj/di/ac/bill is not allowed to access Module Manager HTTP API
  • Sample Call:

    curl -s --user jon:password --form bundle=@/Users/jon/Projects/article/target/article-2.0.3-SNAPSHOT.jar --form start=true http://localhost:8080/modules/api/bundles
    curl -s --user jon:password --form bundle=@/Users/jon/Projects/article/target/article-3.0.0-SNAPSHOT.jar --form bundle=@/Users/jon/Projects/news/target/news-2.0.2-SNAPSHOT.jar --form start=true http://localhost:8080/modules/api/bundles

Start bundle

Starts the specified bundle and return the operation result.

  • URL

    /:bundleKey/_start

  • Method:

    POST

  • Params

    target=[string]: The group of cluster nodes targeted by the operation

    Required:

    bundleKey=[string]: the bundle key

  • Success Response:

    • Code: 200
      Content: {"bundleInfos":[{"groupId":"org.jahia.modules","symbolicName":"article","version":"2.0.3.SNAPSHOT","key":"org.jahia.modules/article/2.0.3.SNAPSHOT"}],"message":"Operation successful"}
  • Error Response:

    • Code: 404 NOT FOUND
      Content: {"status":404,"reasonPhrase":"Not Found","message":"Unable to find a module bundle corresponding to the key: org.jahia.modules/article/2.0.3.SPSHOT"}

    OR

    • Code: 401 UNAUTHORIZED
      Content: user /users/hj/di/ac/bill is not allowed to access Module Manager HTTP API
  • Sample Call:

    curl -s --user jon:root1234 --data --request POST http://localhost:8080/modules/api/bundles/org.jahia.modules/article/2.0.3.SNAPSHOT/_start

Stop bundle

Stops the specified bundle and return the operation result.

  • URL

    /:bundleKey/_stop

  • Method:

    POST

  • Params

    target=[string]: The group of cluster nodes targeted by the operation

    Required:

    bundleKey=[string]: the bundle key

  • Success Response:

    • Code: 200
      Content: {"bundleInfos":[{"groupId":"org.jahia.modules","symbolicName":"article","version":"2.0.3.SNAPSHOT","key":"org.jahia.modules/article/2.0.3.SNAPSHOT"}],"message":"Operation successful"}
  • Error Response:

    • Code: 404 NOT FOUND
      Content: {"status":404,"reasonPhrase":"Not Found","message":"Unable to find a module bundle corresponding to the key: org.jahia.modules/article/2.0.3.SPSHOT"}

    OR

    • Code: 401 UNAUTHORIZED
      Content: user /users/hj/di/ac/bill is not allowed to access Module Manager HTTP API
  • Sample Call:

    curl -s --user jon:root1234 --data --request POST http://localhost:8080/modules/api/bundles/org.jahia.modules/article/2.0.3.SNAPSHOT/_stop

Uninstall bundle

Uninstalls the specified bundle and return the operation result.

  • URL

    /:bundleKey/_uninstall

  • Method:

    POST

  • Params

    target=[string]: The group of cluster nodes targeted by the operation

    Required:

    bundleKey=[string]: the bundle key

  • Success Response:

    • Code: 200
      Content: {"bundleInfos":[{"groupId":"org.jahia.modules","symbolicName":"article","version":"2.0.3.SNAPSHOT","key":"org.jahia.modules/article/2.0.3.SNAPSHOT"}],"message":"Operation successful"}
  • Error Response:

    • Code: 404 NOT FOUND
      Content: {"status":404,"reasonPhrase":"Not Found","message":"Unable to find a module bundle corresponding to the key: org.jahia.modules/article/2.0.3.SPSHOT"}

    OR

    • Code: 401 UNAUTHORIZED
      Content: user /users/hj/di/ac/bill is not allowed to access Module Manager HTTP API
  • Sample Call:

    curl -s --user jon:root1234 --data --request POST http://localhost:8080/modules/api/bundles/org.jahia.modules/article/2.0.3.SNAPSHOT/_uninstall

Get info about a single bundle (since DX 7.2.0.2)

Get info about a single bundle.

  • URL

    /:bundleKey/_info

  • Method:

    GET

  • Params

    target=[string]: The group of cluster nodes targeted by the operation

    Required:

    bundleKey=[string]: the bundle key

  • Success Response:

    • Code: 200
      Content: {"jahiaNode1":{"type":"MODULE","osgiState":"ACTIVE","moduleState":"STARTED"},"jahiaNode2":{"type":"MODULE","osgiState":"ACTIVE","moduleState":"STARTED"}
  • Error Response:

    • Code: 200
      Content: {"jahiaNode1":{"message":"Error retrieving bundle info from cluster node jahiaNode1","cause":"org.jahia.services.modulemanager.ModuleNotFoundException: Unable to find a module bundle corresponding to the key: article/2.0.3.SPSHOT"},"jahiaNode2":{"message":"Error retrieving bundle info from cluster node jahiaNode2","cause":"org.jahia.services.modulemanager.ModuleNotFoundException: Unable to find a module bundle corresponding to the key: article/2.0.3.SPSHOT"}

    OR

    • Code: 401 UNAUTHORIZED
      Content: user /users/hj/di/ac/bill is not allowed to access Module Manager HTTP API
  • Sample Call:

    curl -s --user jon:password --request GET http://localhost:8080/modules/api/bundles/article/2.0.3.SNAPSHOT/_info

Get info about multiple bundles (since DX 7.2.0.2)

Get current info about multiple bundles.

  • URL

    /[:bundleKeys]/_info

  • Method:

    GET

  • Params

    target=[string]: The group of cluster nodes targeted by the operation

    Required:

    bundleKeys=[string]: comma separated list of bundle keys

  • Success Response:

    • Code: 200
      Content: {"jahiaNode1":{"article/2.0.2":{"type":"MODULE","osgiState":"ACTIVE","moduleState":"STARTED"},"news/2.0.3":{"type":"type":"MODULE","osgiState":"ACTIVE","moduleState":"STARTED"}},"jahiaNode2":{"article/2.0.2":{"type":"MODULE","osgiState":"ACTIVE","moduleState":"STARTED"},"news/2.0.3":{"type":"MODULE","osgiState":"ACTIVE","moduleState":"STARTED"}}}
  • Error Response:

    • Code: 200
      Content: {"jahiaNode1":{"message":"Error retrieving bundle info from cluster node jahiaNode1","cause":"org.jahia.services.modulemanager.ModuleNotFoundException: Unable to find a module bundle corresponding to the key: article/2.0.3.SPSHOT"},"jahiaNode2":{"message":"Error retrieving bundle info from cluster node jahiaNode2","cause":"org.jahia.services.modulemanager.ModuleNotFoundException: Unable to find a module bundle corresponding to the key: article/2.0.3.SPSHOT"}

    OR

    • Code: 401 UNAUTHORIZED
      Content: user /users/hj/di/ac/bill is not allowed to access Module Manager HTTP API
  • Sample Call:

    curl -g -s --user jon:password --request GET http://localhost:8090/modules/api/bundles/\[article/2.0.3.SNAPSHOT,news/2.0.3\]/_info

Get local info about a single bundle (since DX 7.2.0.2)

Get local info about a single bundle.

  • URL

    /:bundleKey/_localInfo

  • Method:

    GET

  • Params

    Required:

    bundleKey=[string]: the bundle key

  • Success Response:

    • Code: 200
      Content: {"type":"MODULE","osgiState":"ACTIVE","moduleState":"STARTED"}
  • Error Response:

    • Code: 404 NOT FOUND
      Content: {"status":404,"reasonPhrase":"Not Found","message":"Unable to find a module bundle corresponding to the key: article/2.0.3.SPSHOT"}

    OR

    • Code: 401 UNAUTHORIZED
      Content: user /users/hj/di/ac/bill is not allowed to access Module Manager HTTP API
  • Sample Call:

    curl -s --user jon:password --request GET http://localhost:8080/modules/api/bundles/article/2.0.3.SNAPSHOT/_localInfo

Get local info about multiple bundles (since DX 7.2.0.2)

Get current local info about multiple bundles.

  • URL

    /[:bundleKeys]/_localInfo

  • Method:

    GET

  • Params

    Required:

    bundleKeys=[string]: comma separated list of bundle keys

  • Success Response:

    • Code: 200
      Content: {"article/2.0.3.SNAPSHOT":{"type":"MODULE","osgiState":"ACTIVE","moduleState":"STARTED"},"news/2.0.3":{"type":"MODULE","osgiState":"ACTIVE","moduleState":"STARTED"}}
  • Error Response:

    • Code: 404 NOT FOUND
      Content: {"status":404,"reasonPhrase":"Not Found","message":"Unable to find a module bundle corresponding to the key: article/2.0.3.SPSHOT"}

    OR

    • Code: 401 UNAUTHORIZED
      Content: user /users/hj/di/ac/bill is not allowed to access Module Manager HTTP API
  • Sample Call:

    curl -g -s --user jon:password --request GET http://localhost:8090/modules/api/bundles/\[article/2.0.3.SNAPSHOT,news/2.0.3\]/_localInfo

Get local state of a single bundle

Get current local state of a single bundle.

  • URL

    /:bundleKey/_localState

  • Method:

    GET

  • Params

    Required:

    bundleKey=[string]: the bundle key

  • Success Response:

    • Code: 200
      Content: "STATE"
      Possible values: UNINSTALLED, INSTALLED, RESOLVED, STARTING, STOPPING, ACTIVE
  • Error Response:

    • Code: 404 NOT FOUND
      Content: {"status":404,"reasonPhrase":"Not Found","message":"Unable to find a module bundle corresponding to the key: article/2.0.3.SPSHOT"}

    OR

    • Code: 401 UNAUTHORIZED
      Content: user /users/hj/di/ac/bill is not allowed to access Module Manager HTTP API
  • Sample Call:

    curl -s --user jon:password --request GET http://localhost:8080/modules/api/bundles/article/2.0.3.SNAPSHOT/_localState

Get local state of multiple bundles

Get current local state of multiple bundles.

  • URL

    /[:bundleKeys]/_localState

  • Method:

    GET

  • Params

    Required:

    bundleKeys=[string]: comma separated list of bundle keys

  • Success Response:

    • Code: 200
      Content: {"article/2.0.3.SNAPSHOT":"ACTIVE","news/2.0.3":"ACTIVE"}
  • Error Response:

    • Code: 404 NOT FOUND
      Content: {"status":404,"reasonPhrase":"Not Found","message":"Unable to find a module bundle corresponding to the key: article/2.0.3.SPSHOT"}

    OR

    • Code: 401 UNAUTHORIZED
      Content: user /users/hj/di/ac/bill is not allowed to access Module Manager HTTP API
  • Sample Call:

    curl -g -s --user jon:password --request GET http://localhost:8090/modules/api/bundles/\[article/2.0.3.SNAPSHOT,news/2.0.3\]/_localState

module-manager's People

Contributors

oyevstafyev avatar bdjiba avatar dgriffon avatar jkevan avatar bpapez avatar rknj avatar fbourasse avatar root737 avatar yousria avatar obelhadi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.