Waarp R66-Rest-API

From version 2.4.27, Waarp R66 includes a REST Full API using HTTP(s) protocol.

 

Helpers functions were created to help to act on REST interface in Java (org.waarp.openr66.protocol.http.rest.client.HttpRestR66Client for helper on creating connections and requests, and a partial client handler org.waarp.openr66.protocol.http.rest.client.HttpRestR66ClientResponseHandler). The test methods and handlers could be used as example too (in src/test/java org.waarp.openr66.protocol.http.rest.test.HttpTestRestR66Client). The implementation is based on Netty and WaarpGatewayKernel.

 

Note: The command OPTIONS prints the different abilities of the REST API and is available on all pathes.

 

2 sets of REST API are present in Waarp R66

In order to be functional, some configuration is needed. One can instantiate as many REST Http(s) interfaces as he/she wants. For each instantation (one rest entry), one can specify:

  • Network: REST support is activated when REST port is > 0 (serverrestport). Additionnally, the REST http support might be using SSL support (restssl to true) and specify an explicit address (in restaddress ; if none, all available IPs will be used).
  • Authentication: REST support might be conditionned by an explicit authentication mechanism (restauthenticated to true). This implies that user will be as for Http Admin interface (either configuration admin user, either special right user in host database (using client with negative port only)). Password is never sent through the network but is used locally to create the signature of the request. An attribute will be added (either in URI or in header) as X-Auth-User.
  • Time limitation: REST support might be limited to "valid time" request, meaning that client time express in the request is less than an authorized gap from server time (resttimelimit as time limit in ms). When the time gap (difference) is more than the limit allowed, the request is refused. This is particularly useful in authenticated way, to prevent man in the middle repetitive requests. The attribute X-Auth-Timestamp will be added to the request (either in URI or in header).

  • Signature of the request: whatever the REST support is using authentication or time limitation, each request could have one extra argument (X-Auth-Key) to explicitely "sign" the request, using a SHA-256 key based on uri arguments (restsigkey as file path). This support of query signature could be deactivated (restsignature to True for activation, False for deactivation). In case of authentication usage, the associated password is also added to the "virtual" URI to compute the final signature (virtual since the password is not sent). A specific algorithm is used (see RestArgument.computeKey method for details):

    1. Get all URI arguments (except X-Auth-Key itself, but including X-Auth-Timestamp and X-Auth-User, whatever their positions), lowered case, in alphabetic order
    2. Add an extra Key if not null (from ARG_X_AUTH_INTERNALKEY), corresponding to the user password (global admin or specific entry on the database)
    3. Compute an hash (using the SHA-256 key in HMAC mode)

This algorithm is strongly inspired from "standard" security approach used with REST interface. Indeed, the REST API of Waarp R66 is somehow sensible and shall not be allowed without any control. One might not want to share any role but still wants to check the correctness of the request through this signature.

  • Allowing specific CRUD operations: REST support might allow specific CRUD operations by setting restmethod/restcrud to any value using C, R, U or D (for instance: CRUD for all, R for read only, CRU for all except delete, ...). Only REST interface will be blocked, not the Http Admin interface that will still allow to act on them. Those CRUD properties will be set for one method expressed in restmethod/restname: All or DbHostAuth, DbRule, DbTaskRunner, DbHostConfiguration, DbConfiguration, Bandwidth, Business, Config, Information, Log, Server, Control
    • <restmethod><restname>All</restname><restcrud>CRUD</restcrud></restmethod> to allow all operations on all methods

For one server, the XML configuration file could contain the following for instance:

 <rest>
  <restaddress>127.0.0.1</restaddress>
  <restport>8088</restport>
  <restssl>False</restssl>
  <restauthenticated>True</restauthenticated>
  <resttimelimit>10000</resttimelimit>
  <restsignature>True</restsignature>
  <restsigkey>J:/GG/R66/conf/key.sha256</restsigkey>
  <restmethod>
   <restname>ALL</restname>
   <restcrud>CRUD</restcrud>
  </restmethod>
 </rest>

This first example shows a "full" REST API allowed, but on specific internal address (127.0.0.1:8088) and using authentication, timelimit and signature. This should be the default confiuguration, except eventually the address that could be bind to any available address.

Note that SSL, if activated, will be based on the certificate used for HTTPS Administrator. 
 <rest>
  <restport>8089</restport>
  <restssl>False</restssl>
  <restauthenticated>False</restauthenticated>
  <resttimelimit>-1</resttimelimit>
  <restsignature>False</restsignature>
  <restmethod>
   <restname>DbHostAuth DbRule DbTaskRunner DbHostConfiguration DbConfiguration</restname>
   <restcrud>R</restcrud>
  </restmethod>
  <restmethod>
   <restname>Bandwidth</restname>
   <restcrud>R</restcrud>
  </restmethod>
  <restmethod>
   <restname>Information</restname>
   <restcrud>R</restcrud>
  </restmethod>
  <restmethod>
   <restname>Server</restname>
   <restcrud>R</restcrud>
  </restmethod>
  <restmethod>
   <restname>Control</restname>
   <restcrud>R</restcrud>
  </restmethod>
 </rest>

This second example shows a "READ only" REST API allowed, on part of the methods (Business, Config, Log are not allowed), on all available addresses and one specific port (8089) and not using any of the authentication, timelimit and signature.

 

For creating a client in Java, you can use the code example from HttpTestRestR66Client, and in particular:

  • HttpTestR66PseudoMain.getTestConfiguration(); as an exemple to setup the REST configuration maually.
  • HttpRestR66Handler.instantiateHandlers(RestConfiguration); must be called to ensure the handlers exists as definition.
  • One shall call RestConfiguration.initializeKey(xxx) on one RestConfiguration object to ensure the KEY for signature is initialized correctly as HmacSha256 (org.waarp.common.crypto.HmacSha256 filename - main() method - will generate such a key file) as in getTestConfiguration() example.

 

First set of standard CRUD REST Full API to access to DbData from Database of a Waarp R66 Server

  • GET /uri means get all elements according to optional filter (body in Json format)
  • GET /uri/id means get one element specified by the id (and for Transfers additionnal uri arguments or in body in Json format)
  • PUT /uri/id means update one element specified by the id (and for Transfers additionnal uri arguments or in body as Json format) using body in Json format for data
  • POST /uri means create one element according to body in Json format
  • DELETE /uri/id means delete one element specified by the id (and for Transfers additionnal uri arguments or in body in Json format)
  • OPTIONS /uri means getting information on available REST service on this URI
  • For all command (except OPTIONS), answer contains a Json body reflecting the DbData model

/transfers

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/transfers",
  "base" : "transfers",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,PUT,POST,DELETE,OPTIONS",
    "UriAllowed" : "transfers",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/transfers/id",
        "command" : "GET",
        "body" : {
          "SPECIALID" : "Special Id as LONG in URI as transfers/id",
          "REQUESTER" : "Partner as requester as VARCHAR",
          "REQUESTED" : "Partner as requested as VARCHAR",
          "OWNERREQ" : "Owner of this request (optional) as VARCHAR"
        },
        "answer" : {
          "@model" : "DbTaskRunner",
          "GLOBALSTEP" : "INTEGER", "GLOBALLASTSTEP" : "INTEGER", "STEP" : "INTEGER", "RANK" : "INTEGER", "STEPSTATUS" : "VARCHAR",
          "RETRIEVEMODE" : "BIT", "FILENAME" : "VARCHAR", "ISMOVED" : "BIT", "IDRULE" : "VARCHAR", "BLOCKSZ" : "INTEGER",
          "ORIGINALNAME" : "VARCHAR", "FILEINFO" : "LONGVARCHAR", "TRANSFERINFO" : "LONGVARCHAR", "MODETRANS" : "INTEGER",
          "STARTTRANS" : "TIMESTAMP", "STOPTRANS" : "TIMESTAMP", "INFOSTATUS" : "VARCHAR", "UPDATEDINFO" : "INTEGER",
          "OWNERREQ" : "VARCHAR", "REQUESTER" : "VARCHAR", "REQUESTED" : "VARCHAR", "SPECIALID" : "BIGINT"
        }
      }
    }, {
      "GET" : {
        "path" : "/transfers",
        "command" : "MULTIGET",
        "body" : {
          "LIMIT" : "number", "ORDERBYID" : "boolean", "STARTID" : "transfer id", "STOPID" : "transfer id",
          "IDRULE" : "rule name", "PARTNER" : "partner (requester or requested) name",
          "PENDING" : "boolean", "INTRANSFER" : "boolean", "INERROR" : "boolean", "DONE" : "boolean", "ALLSTATUS" : "boolean",
          "STARTTRANS" : "Date in ISO 8601 format or ms", "STOPTRANS" : "Date in ISO 8601 format or ms",
          "OWNERREQ" : "Owner of this request (optional) as VARCHAR"
        },
        "answer" : [ {
          "@model" : "DbTaskRunner",
          "GLOBALSTEP" : "INTEGER", "GLOBALLASTSTEP" : "INTEGER", "STEP" : "INTEGER", "RANK" : "INTEGER", "STEPSTATUS" : "VARCHAR",
          "RETRIEVEMODE" : "BIT", "FILENAME" : "VARCHAR", "ISMOVED" : "BIT", "IDRULE" : "VARCHAR", "BLOCKSZ" : "INTEGER",
          "ORIGINALNAME" : "VARCHAR", "FILEINFO" : "LONGVARCHAR", "TRANSFERINFO" : "LONGVARCHAR", "MODETRANS" : "INTEGER",
          "STARTTRANS" : "TIMESTAMP", "STOPTRANS" : "TIMESTAMP", "INFOSTATUS" : "VARCHAR", "UPDATEDINFO" : "INTEGER",
          "OWNERREQ" : "VARCHAR", "REQUESTER" : "VARCHAR", "REQUESTED" : "VARCHAR", "SPECIALID" : "BIGINT"
        } ]
      }
    }, {
      "PUT" : {
        "path" : "/transfers/id",
        "command" : "UPDATE",
        "body" : {
          "SPECIALID" : "BIGINT", "REQUESTER" : "VARCHAR", "REQUESTED" : "VARCHAR", "OWNERREQ" : "VARCHAR",
          "GLOBALSTEP" : "INTEGER", "GLOBALLASTSTEP" : "INTEGER", "STEP" : "INTEGER", "RANK" : "INTEGER",
          "STEPSTATUS" : "VARCHAR", "RETRIEVEMODE" : "BIT", "FILENAME" : "VARCHAR", "ISMOVED" : "BIT",
          "BLOCKSZ" : "INTEGER", "ORIGINALNAME" : "VARCHAR", "FILEINFO" : "LONGVARCHAR", "TRANSFERINFO" : "LONGVARCHAR",
          "MODETRANS" : "INTEGER", "STARTTRANS" : "TIMESTAMP", "STOPTRANS" : "TIMESTAMP", "INFOSTATUS" : "VARCHAR", "UPDATEDINFO" : "INTEGER"
        },
        "answer" : {
          "@model" : "DbTaskRunner",
          "GLOBALSTEP" : "INTEGER", "GLOBALLASTSTEP" : "INTEGER", "STEP" : "INTEGER", "RANK" : "INTEGER", "STEPSTATUS" : "VARCHAR",
          "RETRIEVEMODE" : "BIT", "FILENAME" : "VARCHAR", "ISMOVED" : "BIT", "IDRULE" : "VARCHAR", "BLOCKSZ" : "INTEGER",
          "ORIGINALNAME" : "VARCHAR", "FILEINFO" : "LONGVARCHAR", "TRANSFERINFO" : "LONGVARCHAR", "MODETRANS" : "INTEGER",
          "STARTTRANS" : "TIMESTAMP", "STOPTRANS" : "TIMESTAMP", "INFOSTATUS" : "VARCHAR", "UPDATEDINFO" : "INTEGER",
          "OWNERREQ" : "VARCHAR", "REQUESTER" : "VARCHAR", "REQUESTED" : "VARCHAR", "SPECIALID" : "BIGINT"
        }
      }
    }, {
      "DELETE" : {
        "path" : "/transfers/id",
        "command" : "DELETE",
        "body" : {
          "SPECIALID" : "Special Id as LONG in URI as transfers/id",
          "REQUESTER" : "Partner as requester as VARCHAR",
          "REQUESTED" : "Partner as requested as VARCHAR",
          "OWNERREQ" : "Owner of this request (optional) as VARCHAR"
        },
        "answer" : {
          "@model" : "DbTaskRunner",
          "GLOBALSTEP" : "INTEGER", "GLOBALLASTSTEP" : "INTEGER", "STEP" : "INTEGER", "RANK" : "INTEGER", "STEPSTATUS" : "VARCHAR",
          "RETRIEVEMODE" : "BIT", "FILENAME" : "VARCHAR", "ISMOVED" : "BIT", "IDRULE" : "VARCHAR", "BLOCKSZ" : "INTEGER",
          "ORIGINALNAME" : "VARCHAR", "FILEINFO" : "LONGVARCHAR", "TRANSFERINFO" : "LONGVARCHAR", "MODETRANS" : "INTEGER",
          "STARTTRANS" : "TIMESTAMP", "STOPTRANS" : "TIMESTAMP", "INFOSTATUS" : "VARCHAR", "UPDATEDINFO" : "INTEGER",
          "OWNERREQ" : "VARCHAR", "REQUESTER" : "VARCHAR", "REQUESTED" : "VARCHAR", "SPECIALID" : "BIGINT"
        }
      }
    }, {
      "POST" : {
        "path" : "/transfers",
        "command" : "CREATE",
        "body" : {
          "GLOBALSTEP" : "INTEGER", "GLOBALLASTSTEP" : "INTEGER", "STEP" : "INTEGER", "RANK" : "INTEGER", "STEPSTATUS" : "VARCHAR",
          "RETRIEVEMODE" : "BIT", "FILENAME" : "VARCHAR", "ISMOVED" : "BIT", "IDRULE" : "VARCHAR", "BLOCKSZ" : "INTEGER",
          "ORIGINALNAME" : "VARCHAR", "FILEINFO" : "LONGVARCHAR", "TRANSFERINFO" : "LONGVARCHAR", "MODETRANS" : "INTEGER",
          "STARTTRANS" : "TIMESTAMP", "STOPTRANS" : "TIMESTAMP", "INFOSTATUS" : "VARCHAR", "UPDATEDINFO" : "INTEGER",
          "OWNERREQ" : "VARCHAR", "REQUESTER" : "VARCHAR", "REQUESTED" : "VARCHAR", "SPECIALID" : "BIGINT"
        },
        "answer" : {
          "@model" : "DbTaskRunner",
          "GLOBALSTEP" : "INTEGER", "GLOBALLASTSTEP" : "INTEGER", "STEP" : "INTEGER", "RANK" : "INTEGER", "STEPSTATUS" : "VARCHAR",
          "RETRIEVEMODE" : "BIT", "FILENAME" : "VARCHAR", "ISMOVED" : "BIT", "IDRULE" : "VARCHAR", "BLOCKSZ" : "INTEGER",
          "ORIGINALNAME" : "VARCHAR", "FILEINFO" : "LONGVARCHAR", "TRANSFERINFO" : "LONGVARCHAR", "MODETRANS" : "INTEGER",
          "STARTTRANS" : "TIMESTAMP", "STOPTRANS" : "TIMESTAMP", "INFOSTATUS" : "VARCHAR", "UPDATEDINFO" : "INTEGER",
          "OWNERREQ" : "VARCHAR", "REQUESTER" : "VARCHAR", "REQUESTED" : "VARCHAR", "SPECIALID" : "BIGINT"
        }
      }
    }, {
      "OPTIONS" : {
        "path" : "/transfers",
        "command" : "OPTIONS"
      }
    } ]
  }

}

/hosts

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/hosts",
  "base" : "hosts",
  "uri" : { },
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,PUT,POST,DELETE,OPTIONS",
    "UriAllowed" : "hosts",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/hosts/id",
        "command" : "GET",
        "body" : {
          "HOSTID" : "HostId as VARCHAR in URI as hosts/id"
        },
        "answer" : {
          "@model" : "DbHostAuth",
          "ADDRESS" : "VARCHAR", "PORT" : "INTEGER", "ISSSL" : "BIT", "HOSTKEY" : "VARBINARY", "ADMINROLE" : "BIT",
          "ISCLIENT" : "BIT", "ISACTIVE" : "BIT", "ISPROXIFIED" : "BIT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "GET" : {
        "path" : "/hosts",
        "command" : "MULTIGET",
        "body" : {
          "HOSTID" : "host name",
          "ADDRESS" : "ADDRESS of this partner",
          "ISSSL" : "is Ssl entry",
          "ISACTIVE" : "is Active entry"
        },
        "answer" : [ {
          "@model" : "DbHostAuth",
          "ADDRESS" : "VARCHAR", "PORT" : "INTEGER", "ISSSL" : "BIT", "HOSTKEY" : "VARBINARY", "ADMINROLE" : "BIT",
          "ISCLIENT" : "BIT", "ISACTIVE" : "BIT", "ISPROXIFIED" : "BIT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        } ]
      }
    }, {
      "PUT" : {
        "path" : "/hosts/id",
        "command" : "UPDATE",
        "body" : {
          "HOSTID" : "HostId as VARCHAR in URI as hosts/id",
          "ADDRESS" : "VARCHAR", "PORT" : "INTEGER", "ISSSL" : "BIT", "HOSTKEY" : "VARBINARY", "ADMINROLE" : "BIT",
          "ISCLIENT" : "BIT", "ISACTIVE" : "BIT", "ISPROXIFIED" : "BIT", "UPDATEDINFO" : "INTEGER"
        },
        "answer" : {
          "@model" : "DbHostAuth",
          "ADDRESS" : "VARCHAR", "PORT" : "INTEGER", "ISSSL" : "BIT", "HOSTKEY" : "VARBINARY", "ADMINROLE" : "BIT",
          "ISCLIENT" : "BIT", "ISACTIVE" : "BIT", "ISPROXIFIED" : "BIT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "DELETE" : {
        "path" : "/hosts/id",
        "command" : "DELETE",
        "body" : {
          "HOSTID" : "HostId as VARCHAR in URI as hosts/id"
        },
        "answer" : {
          "@model" : "DbHostAuth",
          "ADDRESS" : "VARCHAR", "PORT" : "INTEGER", "ISSSL" : "BIT", "HOSTKEY" : "VARBINARY", "ADMINROLE" : "BIT",
          "ISCLIENT" : "BIT", "ISACTIVE" : "BIT", "ISPROXIFIED" : "BIT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "POST" : {
        "path" : "/hosts",
        "command" : "CREATE",
        "body" : {
          "ADDRESS" : "VARCHAR", "PORT" : "INTEGER", "ISSSL" : "BIT", "HOSTKEY" : "VARBINARY", "ADMINROLE" : "BIT",
          "ISCLIENT" : "BIT", "ISACTIVE" : "BIT", "ISPROXIFIED" : "BIT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        },
        "answer" : {
          "@model" : "DbHostAuth",
          "ADDRESS" : "VARCHAR", "PORT" : "INTEGER", "ISSSL" : "BIT", "HOSTKEY" : "VARBINARY", "ADMINROLE" : "BIT",
          "ISCLIENT" : "BIT", "ISACTIVE" : "BIT", "ISPROXIFIED" : "BIT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "OPTIONS" : {
        "path" : "/hosts",
        "command" : "OPTIONS"
      }
    } ]
  },
  "cookie" : { }
}

/hostconfigs

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/hostconfigs",
  "base" : "hostconfigs",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,PUT,POST,DELETE,OPTIONS",
    "UriAllowed" : "hostconfigs",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/hostconfigs/id",
        "command" : "GET",
        "body" : {
          "HOSTID" : "HostId as VARCHAR in URI as hostconfigs/id"
        },
        "answer" : {
          "@model" : "DbHostConfiguration",
          "BUSINESS" : "LONGVARCHAR", "ROLES" : "LONGVARCHAR", "ALIASES" : "LONGVARCHAR",
          "OTHERS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "GET" : {
        "path" : "/hostconfigs",
        "command" : "MULTIGET",
        "body" : {
          "BUSINESS" : "LONGVARCHAR", "ROLES" : "LONGVARCHAR", "ALIASES" : "LONGVARCHAR",
          "OTHERS" : "LONGVARCHAR", "HOSTID" : "VARCHAR"
        },
        "answer" : [ {
          "@model" : "DbHostConfiguration",
          "BUSINESS" : "LONGVARCHAR", "ROLES" : "LONGVARCHAR", "ALIASES" : "LONGVARCHAR",
          "OTHERS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        } ]
      }
    }, {
      "PUT" : {
        "path" : "/hostconfigs/id",
        "command" : "UPDATE",
        "body" : {
          "HOSTID" : "HostId as VARCHAR in URI as hostconfigs/id",
          "BUSINESS" : "LONGVARCHAR", "ROLES" : "LONGVARCHAR", "ALIASES" : "LONGVARCHAR",
          "OTHERS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER"
        },
        "answer" : {
          "@model" : "DbHostConfiguration",
          "BUSINESS" : "LONGVARCHAR", "ROLES" : "LONGVARCHAR", "ALIASES" : "LONGVARCHAR",
          "OTHERS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "DELETE" : {
        "path" : "/hostconfigs/id",
        "command" : "DELETE",
        "body" : {
          "HOSTID" : "HostId as VARCHAR in URI as hostconfigs/id"
        },
        "answer" : {
          "@model" : "DbHostConfiguration",
          "BUSINESS" : "LONGVARCHAR", "ROLES" : "LONGVARCHAR", "ALIASES" : "LONGVARCHAR",
          "OTHERS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "POST" : {
        "path" : "/hostconfigs",
        "command" : "CREATE",
        "body" : {
          "BUSINESS" : "LONGVARCHAR", "ROLES" : "LONGVARCHAR", "ALIASES" : "LONGVARCHAR",
          "OTHERS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        },
        "answer" : {
          "@model" : "DbHostConfiguration",
          "BUSINESS" : "LONGVARCHAR", "ROLES" : "LONGVARCHAR", "ALIASES" : "LONGVARCHAR",
          "OTHERS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "OPTIONS" : {
        "path" : "/hostconfigs",
        "command" : "OPTIONS"
      }
    } ]
  }
}

/configurations

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/configurations",
  "base" : "configurations",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,PUT,POST,DELETE,OPTIONS",
    "UriAllowed" : "configurations",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/configurations/id",
        "command" : "GET",
        "body" : {
          "HOSTID" : "HostId as VARCHAR in URI as configurations/id"
        },
        "answer" : {
          "@model" : "DbConfiguration",
          "READGLOBALLIMIT" : "BIGINT", "WRITEGLOBALLIMIT" : "BIGINT", "READSESSIONLIMIT" : "BIGINT", "WRITESESSIONLIMIT" : "BIGINT",
          "DELAYLIMIT" : "BIGINT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "GET" : {
        "path" : "/configurations",
        "command" : "MULTIGET",
        "body" : {
          "HOSTID" : "host name",
          "BANDWIDTH" : "<0 for no filter, =0 for no bandwidth, >0 for a limit greater than value"
        },
        "answer" : [ {
          "@model" : "DbConfiguration",
          "READGLOBALLIMIT" : "BIGINT", "WRITEGLOBALLIMIT" : "BIGINT", "READSESSIONLIMIT" : "BIGINT", "WRITESESSIONLIMIT" : "BIGINT",
          "DELAYLIMIT" : "BIGINT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        } ]
      }
    }, {
      "PUT" : {
        "path" : "/configurations/id",
        "command" : "UPDATE",
        "body" : {
          "HOSTID" : "HostId as VARCHAR in URI as configurations/id",
          "READGLOBALLIMIT" : "BIGINT", "WRITEGLOBALLIMIT" : "BIGINT", "READSESSIONLIMIT" : "BIGINT", "WRITESESSIONLIMIT" : "BIGINT",
          "DELAYLIMIT" : "BIGINT", "UPDATEDINFO" : "INTEGER"
        },
        "answer" : {
          "@model" : "DbConfiguration",
          "READGLOBALLIMIT" : "BIGINT", "WRITEGLOBALLIMIT" : "BIGINT", "READSESSIONLIMIT" : "BIGINT", "WRITESESSIONLIMIT" : "BIGINT",
          "DELAYLIMIT" : "BIGINT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "DELETE" : {
        "path" : "/configurations/id",
        "command" : "DELETE",
        "body" : {
          "HOSTID" : "HostId as VARCHAR in URI as configurations/id"
        },
        "answer" : {
          "@model" : "DbConfiguration",
          "READGLOBALLIMIT" : "BIGINT", "WRITEGLOBALLIMIT" : "BIGINT", "READSESSIONLIMIT" : "BIGINT", "WRITESESSIONLIMIT" : "BIGINT",
          "DELAYLIMIT" : "BIGINT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "POST" : {
        "path" : "/configurations",
        "command" : "CREATE",
        "body" : {
          "READGLOBALLIMIT" : "BIGINT", "WRITEGLOBALLIMIT" : "BIGINT", "READSESSIONLIMIT" : "BIGINT", "WRITESESSIONLIMIT" : "BIGINT",
          "DELAYLIMIT" : "BIGINT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        },
        "answer" : {
          "@model" : "DbConfiguration",
          "READGLOBALLIMIT" : "BIGINT", "WRITEGLOBALLIMIT" : "BIGINT", "READSESSIONLIMIT" : "BIGINT", "WRITESESSIONLIMIT" : "BIGINT",
          "DELAYLIMIT" : "BIGINT", "UPDATEDINFO" : "INTEGER", "HOSTID" : "VARCHAR"
        }
      }
    }, {
      "OPTIONS" : {
        "path" : "/configurations",
        "command" : "OPTIONS"
      }
    } ]
  }
}

/rules

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/rules",
  "base" : "rules",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,PUT,POST,DELETE,OPTIONS",
    "UriAllowed" : "rules",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/rules/id",
        "command" : "GET",
        "body" : {
          "IDRULE" : "RuleId in URI as VARCHAR as rules/id"
        },
        "answer" : {
          "@model" : "DbRule",
          "HOSTIDS" : "LONGVARCHAR", "MODETRANS" : "INTEGER", "RECVPATH" : "VARCHAR", "SENDPATH" : "VARCHAR",
          "ARCHIVEPATH" : "VARCHAR", "WORKPATH" : "VARCHAR", "RPRETASKS" : "LONGVARCHAR",
          "RPOSTTASKS" : "LONGVARCHAR", "RERRORTASKS" : "LONGVARCHAR", "SPRETASKS" : "LONGVARCHAR",
          "SPOSTTASKS" : "LONGVARCHAR", "SERRORTASKS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "IDRULE" : "VARCHAR"
        }
      }
    }, {
      "GET" : {
        "path" : "/rules",
        "command" : "MULTIGET",
        "body" : {
          "IDRULE" : "rule name",
          "MODETRANS" : "MODETRANS value"
        },
        "answer" : [ {
          "@model" : "DbRule",
          "HOSTIDS" : "LONGVARCHAR", "MODETRANS" : "INTEGER", "RECVPATH" : "VARCHAR", "SENDPATH" : "VARCHAR",
          "ARCHIVEPATH" : "VARCHAR", "WORKPATH" : "VARCHAR", "RPRETASKS" : "LONGVARCHAR",
          "RPOSTTASKS" : "LONGVARCHAR", "RERRORTASKS" : "LONGVARCHAR", "SPRETASKS" : "LONGVARCHAR",
          "SPOSTTASKS" : "LONGVARCHAR", "SERRORTASKS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "IDRULE" : "VARCHAR"
        } ]
      }
    }, {
      "PUT" : {
        "path" : "/rules/id",
        "command" : "UPDATE",
        "body" : {
          "IDRULE" : "RuleId in URI as VARCHAR as rules/id",
          "HOSTIDS" : "LONGVARCHAR", "MODETRANS" : "INTEGER", "RECVPATH" : "VARCHAR", "SENDPATH" : "VARCHAR",
          "ARCHIVEPATH" : "VARCHAR", "WORKPATH" : "VARCHAR", "RPRETASKS" : "LONGVARCHAR",
          "RPOSTTASKS" : "LONGVARCHAR", "RERRORTASKS" : "LONGVARCHAR", "SPRETASKS" : "LONGVARCHAR",
          "SPOSTTASKS" : "LONGVARCHAR", "SERRORTASKS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER"
        },
        "answer" : {
          "@model" : "DbRule",
          "HOSTIDS" : "LONGVARCHAR", "MODETRANS" : "INTEGER", "RECVPATH" : "VARCHAR", "SENDPATH" : "VARCHAR",
          "ARCHIVEPATH" : "VARCHAR", "WORKPATH" : "VARCHAR", "RPRETASKS" : "LONGVARCHAR",
          "RPOSTTASKS" : "LONGVARCHAR", "RERRORTASKS" : "LONGVARCHAR", "SPRETASKS" : "LONGVARCHAR",
          "SPOSTTASKS" : "LONGVARCHAR", "SERRORTASKS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "IDRULE" : "VARCHAR"
        }
      }
    }, {
      "DELETE" : {
        "path" : "/rules/id",
        "command" : "DELETE",
        "body" : {
          "IDRULE" : "RuleId in URI as VARCHAR as rules/id"
        },
        "answer" : {
          "@model" : "DbRule",
          "HOSTIDS" : "LONGVARCHAR", "MODETRANS" : "INTEGER", "RECVPATH" : "VARCHAR", "SENDPATH" : "VARCHAR",
          "ARCHIVEPATH" : "VARCHAR", "WORKPATH" : "VARCHAR", "RPRETASKS" : "LONGVARCHAR",
          "RPOSTTASKS" : "LONGVARCHAR", "RERRORTASKS" : "LONGVARCHAR", "SPRETASKS" : "LONGVARCHAR",
          "SPOSTTASKS" : "LONGVARCHAR", "SERRORTASKS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "IDRULE" : "VARCHAR"
        }
      }
    }, {
      "POST" : {
        "path" : "/rules",
        "command" : "CREATE",
        "body" : {
          "HOSTIDS" : "LONGVARCHAR", "MODETRANS" : "INTEGER", "RECVPATH" : "VARCHAR", "SENDPATH" : "VARCHAR",
          "ARCHIVEPATH" : "VARCHAR", "WORKPATH" : "VARCHAR", "RPRETASKS" : "LONGVARCHAR",
          "RPOSTTASKS" : "LONGVARCHAR", "RERRORTASKS" : "LONGVARCHAR", "SPRETASKS" : "LONGVARCHAR",
          "SPOSTTASKS" : "LONGVARCHAR", "SERRORTASKS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "IDRULE" : "VARCHAR"
        },
        "answer" : {
          "@model" : "DbRule",
          "HOSTIDS" : "LONGVARCHAR", "MODETRANS" : "INTEGER", "RECVPATH" : "VARCHAR", "SENDPATH" : "VARCHAR",
          "ARCHIVEPATH" : "VARCHAR", "WORKPATH" : "VARCHAR", "RPRETASKS" : "LONGVARCHAR",
          "RPOSTTASKS" : "LONGVARCHAR", "RERRORTASKS" : "LONGVARCHAR", "SPRETASKS" : "LONGVARCHAR",
          "SPOSTTASKS" : "LONGVARCHAR", "SERRORTASKS" : "LONGVARCHAR", "UPDATEDINFO" : "INTEGER", "IDRULE" : "VARCHAR"
        }
      }
    }, {
      "OPTIONS" : {
        "path" : "/rules",
        "command" : "OPTIONS"
      }
    } ]
  }
}

Second set of REST API to enable some actions or settings on the Waarp R66 Server

Among those actions, you will found: configuration, bandwidth, transfer control, log control, information command, server control, business integration.

Various actions could be possible on each URI:

  • OPTIONS /uri means getting information on available REST service on this URI
  • In general GET means getting information, while PUT update configuration and POST create a configuration.
  • In all cases (except OPTIONS), the body must include a JsonPacket as Json (using Jackson standard serialization or manually by specifying the @class element in the Json).
  • Most of the cases, the answer includes a JsonPacket as body.

/info

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/info",
  "base" : "info",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,OPTIONS",
    "UriAllowed" : "info",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/info",
        "command" : "GetInformation",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.InformationJsonPacket",
          "comment" : "Information request (GET)",
          "requestUserPacket" : 18, "id" : 0, "request" : 0,
          "rulename" : "The rule name associated with the remote repository",
          "filename" : "The filename to look for if any", "idRequest" : false, "to" : false
        },
        "answer" : [ "path" ]
      }
    }, {
      "GET" : {
        "path" : "/info",
        "command" : "GetTransferInformation",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.InformationJsonPacket",
          "comment" : "Information on Transfer request (GET)",
          "requestUserPacket" : 18, "id" : 0, "request" : 0, "rulename" : "remoteHost", "filename" : null, "idRequest" : true, "to" : false
        },
        "answer" : [ {
            "@model" : "DbTaskRunner",
            "GLOBALSTEP" : "INTEGER", "GLOBALLASTSTEP" : "INTEGER", "STEP" : "INTEGER", "RANK" : "INTEGER", "STEPSTATUS" : "VARCHAR",
          "RETRIEVEMODE" : "BIT", "FILENAME" : "VARCHAR", "ISMOVED" : "BIT", "IDRULE" : "VARCHAR", "BLOCKSZ" : "INTEGER",
          "ORIGINALNAME" : "VARCHAR", "FILEINFO" : "LONGVARCHAR", "TRANSFERINFO" : "LONGVARCHAR", "MODETRANS" : "INTEGER",
          "STARTTRANS" : "TIMESTAMP", "STOPTRANS" : "TIMESTAMP", "INFOSTATUS" : "VARCHAR", "UPDATEDINFO" : "INTEGER",
          "OWNERREQ" : "VARCHAR", "REQUESTER" : "VARCHAR", "REQUESTED" : "VARCHAR", "SPECIALID" : "BIGINT"
        } ]
      }
    }, {
      "OPTIONS" : {
        "path" : "/info",
        "command" : "OPTIONS"
      }
    } ]
  }
}

/bandwidth

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/bandwidth",
  "base" : "bandwidth",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,PUT,OPTIONS",
    "UriAllowed" : "bandwidth",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/bandwidth",
        "command" : "GetBandwidth",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.BandwidthJsonPacket",
          "comment" : "Bandwidth getter (GET)",
          "requestUserPacket" : 19, "setter" : false, "writeglobal" : -10, "readglobal" : -10, "writesession" : -10, "readsession" : -10
        },
        "answer" : [ {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.BandwidthJsonPacket",
          "comment" : "Bandwidth getter (GET)",
          "requestUserPacket" : 19, "setter" : false, "writeglobal" : -10, "readglobal" : -10, "writesession" : -10, "readsession" : -10
        } ]
      }
    }, {
      "PUT" : {
        "path" : "/bandwidth",
        "command" : "SetBandwidth",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.BandwidthJsonPacket",
          "comment" : "Bandwidth setter (PUT)",
          "requestUserPacket" : 19, "setter" : true, "writeglobal" : -10, "readglobal" : -10, "writesession" : -10, "readsession" : -10
        },
        "answer" : [ {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.BandwidthJsonPacket",
          "comment" : "Bandwidth getter (GET)",
          "requestUserPacket" : 19, "setter" : true, "writeglobal" : -10, "readglobal" : -10, "writesession" : -10, "readsession" : -10
        } ]
      }
    }, {
      "OPTIONS" : {
        "path" : "/bandwidth",
        "command" : "OPTIONS"
      }
    } ]
  }
}

/control

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/control",
  "base" : "control",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,PUT,POST,OPTIONS",
    "UriAllowed" : "control",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/control",
        "command" : "GetTransferInformation",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.InformationJsonPacket",
          "comment" : "Information on Transfer request (GET)",
          "requestUserPacket" : 18, "id" : 0, "request" : 0, "rulename" : "remoteHost", "filename" : null, "idRequest" : true, "to" : false
        },
        "answer" : [ {
            "@model" : "DbTaskRunner",
            "GLOBALSTEP" : "INTEGER", "GLOBALLASTSTEP" : "INTEGER", "STEP" : "INTEGER", "RANK" : "INTEGER", "STEPSTATUS" : "VARCHAR",
          "RETRIEVEMODE" : "BIT", "FILENAME" : "VARCHAR", "ISMOVED" : "BIT", "IDRULE" : "VARCHAR", "BLOCKSZ" : "INTEGER",
          "ORIGINALNAME" : "VARCHAR", "FILEINFO" : "LONGVARCHAR", "TRANSFERINFO" : "LONGVARCHAR", "MODETRANS" : "INTEGER",
          "STARTTRANS" : "TIMESTAMP", "STOPTRANS" : "TIMESTAMP", "INFOSTATUS" : "VARCHAR", "UPDATEDINFO" : "INTEGER",
          "OWNERREQ" : "VARCHAR", "REQUESTER" : "VARCHAR", "REQUESTED" : "VARCHAR", "SPECIALID" : "BIGINT"
        } ]
      }
    }, {
      "PUT" : {
        "path" : "/control",
        "command" : "RestartTransfer",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.RestartTransferJsonPacket",
          "comment" : "Restart Transfer request (PUT)",
          "requestUserPacket" : 4, "requester" : "Requester host", "requested" : "Requested host", "specialid" : -9223372036854775808, "restarttime" : 1399760601381
        },
        "answer" : [ {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.RestartTransferJsonPacket",
          "comment" : "Restart Transfer request (PUT)",
          "requestUserPacket" : 4, "requester" : "Requester host", "requested" : "Requested host", "specialid" : -9223372036854775808, "restarttime" : 1399760601381
        } ]
      }
    }, {
      "PUT" : {
        "path" : "/control",
        "command" : "StopOrCancelTransfer",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.StopOrCancelJsonPacket",
          "comment" : "Stop Or Cancel request (PUT)",
          "requestUserPacket" : 9, "requester" : "Requester host", "requested" : "Requested host", "specialid" : -9223372036854775808
        },
        "answer" : [ {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.StopOrCancelJsonPacket",
          "comment" : "Stop Or Cancel request (PUT)",
          "requestUserPacket" : 9, "requester" : "Requester host", "requested" : "Requested host", "specialid" : -9223372036854775808
        } ]
      }
    }, {
      "POST" : {
        "path" : "/control",
        "command" : "CreateTransfer",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.TransferRequestJsonPacket",
          "comment" : "Transfer Request (POST)",
          "requestUserPacket" : 7, "rulename" : "Rulename", "mode" : 0, "filename" : "Filename", "requested" : "Requested host", "blocksize" : 0,
          "rank" : 0, "specialId" : 0, "validate" : 0, "originalSize" : 0, "fileInformation" : "File information", "separator" : "{",
          "start" : 1399760601381, "delay" : 0, "toValidate" : true, "additionalDelay" : false
        },
        "answer" : [ {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.TransferRequestJsonPacket",
          "comment" : "Transfer Request (POST)",
          "requestUserPacket" : 7, "rulename" : "Rulename", "mode" : 0, "filename" : "Filename", "requested" : "Requested host", "blocksize" : 0,
          "rank" : 0, "specialId" : 0, "validate" : 0, "originalSize" : 0, "fileInformation" : "File information", "separator" : "{",
          "start" : 1399760601381, "delay" : 0, "toValidate" : true, "additionalDelay" : false
        } ]
      }
    }, {
      "OPTIONS" : {
        "path" : "/control",
        "command" : "OPTIONS"
      }
    } ]
  }
}

/config

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/config",
  "base" : "config",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,PUT,OPTIONS",
    "UriAllowed" : "config",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/config",
        "command" : "ExportConfig",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.ConfigExportJsonPacket",
          "comment" : "ConfigExport request (GET)",
          "requestUserPacket" : 11, "host" : false, "rule" : false, "business" : false, "alias" : false, "roles" : false
        },
        "answer" : [ {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.ConfigExportResponseJsonPacket",
          "comment" : "ConfigExport response",
          "requestUserPacket" : 11, "host" : false, "rule" : false, "business" : false, "alias" : false, "roles" : false,
          "command" : 0, "filehost" : "filepath", "filerule" : "filepath", "filebusiness" : "filepath", "filealias" : "filepath", "fileroles" : "filepath"
        } ]
      }
    }, {
      "PUT" : {
        "path" : "/config",
        "command" : "ImportConfig",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.ConfigImportJsonPacket",
          "comment" : "ConfigImport request (PUT) where items are either set through transfer Id, either set directly with a filename",
          "requestUserPacket" : 12, "purgehost" : false, "purgerule" : false, "purgebusiness" : false, "purgealias" : false, "purgeroles" : false,
          "host" : "HostFilename if not through TransferId", "rule" : "RuleFilename if not through TransferId", "business" : "BusinessFilename if not through TransferId",
          "alias" : "AliasFilename if not through TransferId", "roles" : "RolesFilename if not through TransferId", "hostid" : -9223372036854775808,
          "ruleid" : -9223372036854775808, "businessid" : -9223372036854775808, "aliasid" : -9223372036854775808, "rolesid" : -9223372036854775808
        },
        "answer" : [ {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.ConfigImportResponseJsonPacket",
            "comment" : "ConfigImport response",
            "requestUserPacket" : 12, "purgehost" : false, "purgerule" : false, "purgebusiness" : false, "purgealias" : false, "purgeroles" : false,
            "host" : "filepath", "rule" : "filepath", "business" : "filepath", "alias" : "filepath", "roles" : "filepath", "hostid" : -9223372036854775808,

            "ruleid" : -9223372036854775808, "businessid" : -9223372036854775808, "aliasid" : -9223372036854775808, "rolesid" : -9223372036854775808,
            "command" : 0, "purgedhost" : false, "purgedrule" : false, "purgedbusiness" : false, "purgedalias" : false, "purgedroles" : false,
            "importedhost" : false, "importedrule" : false, "importedbusiness" : false, "importedalias" : false, "importedroles" : false

        } ]
      }
    }, {
      "OPTIONS" : {
        "path" : "/config",
        "command" : "OPTIONS"
      }
    } ]
  }
}

/server

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/server",
  "base" : "server",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,PUT,OPTIONS",
    "UriAllowed" : "server",
    "DetailedAllow" : [ {
      "PUT" : {
        "path" : "/server",
        "command" : "ShutdownOrBlock",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.ShutdownOrBlockJsonPacket",
          "comment" : "Shutdown Or Block request (PUT)",
          "requestUserPacket" : 0,
          "key" : "S2V5", "shutdownOrBlock" : false, "restartOrBlock" : false
        },
        "answer" : [ {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.ShutdownOrBlockJsonPacket",
          "comment" : "Shutdown Or Block request (PUT)",
          "requestUserPacket" : 0,
          "key" : "S2V5", "shutdownOrBlock" : false, "restartOrBlock" : false
        } ]
      }
    }, {
        "GET" : {
          "path" : "/server",
          "command" : "GetStatus",
          "answer" : [ {
            "HostID" : "hosta", "Date" : "2014-05-13T11:02:52.185+02:00", "LastRun" : "1970-01-01T01:00:00.000+01:00", "FromDate" : "1970-01-01T01:00:00.000+01:00",
            "SecondsRunning" : 0, "NetworkConnections" : 0, "NbThreads" : 0,  "InBandwidth" : 0, "OutBandwidth" : 0,
            "OVERALL" : { "AllTransfer" : 0, "Unknown" : 0, "NotUpdated" : 0, "Interrupted" : 0, "ToSubmit" : 0,
              "Error" : 0, "Running" : 0, "Done" : 0, "InRunning" : 0, "OutRunning" : 0,
              "LastInRunning" : "2014-05-13T11:02:43.732+02:00", "LastOutRunning" : "2014-05-13T11:02:43.732+02:00",
              "InAll" : 0, "OutAll" : 0, "InError" : 0, "OutError" : 0 },
            "STEPS" : { "Notask" : 0, "Pretask" : 0, "Transfer" : 0, "Posttask" : 0, "AllDone" : 0, "Error" : 0 },
            "RUNNINGSTEPS" : { "AllRunning" : 0, "Running" : 0, "InitOk" : 0, "PreProcessingOk" : 0, "TransferOk" : 0, "PostProcessingOk" : 0, "CompleteOk" : 0 },
            "ERRORTYPES" : { "ConnectionImpossible" : 0, "ServerOverloaded" : 0, "BadAuthent" : 0, "ExternalOp" : 0, "TransferError" : 0,
              "MD5Error" : 0, "Disconnection" : 0, "FinalOp" : 0, "Unimplemented" : 0, "Internal" : 0, "Warning" : 0, "QueryAlreadyFinished" : 0, "QueryStillRunning" : 0,
              "KnownHost" : 0, "RemotelyUnknown" : 0, "CommandNotFound" : 0, "PassThroughMode" : 0, "RemoteShutdown" : 0, "Shutdown" : 0,
              "RemoteError" : 0, "Stopped" : 0, "Canceled" : 0, "FileNotFound" : 0, "Unknown" : 0 }
          } ]
        }
      }, {
      "OPTIONS" : {
        "path" : "/server",
        "command" : "OPTIONS"
      }
    } ]
  }
}

/log

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/log",
  "base" : "log",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,OPTIONS",
    "UriAllowed" : "log",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/log",
        "command" : "GetLog",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.LogJsonPacket",
          "comment" : "Log export request (GET)",
          "requestUserPacket" : 16, "purge" : false, "clean" : false, "statuspending" : false,
          "statustransfer" : false, "statusdone" : false, "statuserror" : false,
          "rule" : "The rule name", "request" : "The requester or requested host name",
          "start" : 1399760601400, "stop" : 1399760601400, "startid" : "Start id - long -",
          "stopid" : "Stop id - long -"
        },
        "answer" : [ {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.LogResponseJsonPacket",
          "comment" : "Log export response",
          "requestUserPacket" : 0, "purge" : false, "clean" : false, "statuspending" : false,
          "statustransfer" : false, "statusdone" : false, "statuserror" : false,
          "rule" : null, "request" : null, "start" : null, "stop" : null,
          "startid" : null, "stopid" : null, "command" : 0, "filename" : "filepath",
          "exported" : 0, "purged" : 0
        } ]
      }
    }, {
      "OPTIONS" : {
        "path" : "/log",
        "command" : "OPTIONS"
      }
    } ]
  }

}

/business

{
  "X-Auth-User" : "admin2",
  "X-method" : "OPTIONS",
  "path" : "/business",
  "base" : "business",
  "command" : "OPTIONS",
  "answer" : {
    "Allow" : "GET,OPTIONS",
    "UriAllowed" : "business",
    "DetailedAllow" : [ {
      "GET" : {
        "path" : "/business",
        "command" : "ExecuteBusiness",
        "body" : {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.BusinessRequestJsonPacket",
          "comment" : "Business execution request (GET)",
          "requestUserPacket" : 22, "className" : "Class name to execute", "arguments" : "Arguments of the execution",
          "extraArguments" : "Extra arguments", "delay" : 0, "toApplied" : false, "validated" : false
        },
        "answer" : [ {
          "@class" : "org.waarp.openr66.protocol.localhandler.packet.json.BusinessRequestJsonPacket",
          "comment" : "Business execution request (GET)",
          "requestUserPacket" : 22, "className" : "Class name to execute", "arguments" : "Arguments of the execution",
          "extraArguments" : "Extra arguments", "delay" : 0, "toApplied" : false, "validated" : false
        } ]
      }
    }, {
      "OPTIONS" : {
        "path" : "/business",
        "command" : "OPTIONS"
      }
    } ]
  }
}