Version 5

    API

     

    GET /services
    GET /services/SERVICE/status
    GET /services/SERVICE/artifacts
    
    POST /services/SERVICE/start
    POST /services/SERVICE/stop
    POST /services/SERVICE/restart
    
    POST /services/SERVICE/artifacts, params: artifact
    POST /services/SERVICE/configure, params: config
    
    
    DELETE /services/SERVICE/artifacts/ARTIFACT_ID
    

     

    Request and Response objects

    Request

    Only POST requests for deploying new artifact and configuring the service require request body. Every other call is executed without

    Deploy new artifact

    New artifact must be deployed using multipart/form-data content-type. Artifact file must be sent as artifact parameter.

    Configure

    Configure call body depends on what service is called.

    Response

    Response is sent every time in JSON format.

     

    Structure:

    {
      "status": "ok" # or "error"
      "response": {
        ### DATA ###
      }
    }

     

    The status field should be used to determine if the call was  successfuly executed. Bear in mind, that some call may be a long-running  calls.

     

    Long running calls:

    • start
    • stop
    • restart

     

    If there is a long-running call executed, a 'status' is returned immediately, and the action is executed in backgroud.

     

    {
      "status": "ok"
      "response": {
        "state": "stopped"
      },
    }

    Error

    This is returned every time an error occurred. Status parameter is set to 'error', 'msg' is a human readable sentence.

    Example

     

    {
      "status": "error",
      "msg": "Error while saving artifact"
    }
    

    Success

    In case of success, status is set to 'ok', 'response' parameter contains information returned in the action.

     

    Response parameter body depends on what action was called.