projectatomic/commissaire-service

Name: commissaire-service

Owner: Project Atomic

Description: Commissaire Service Framework

Created: 2016-08-31 17:32:52.0

Updated: 2018-03-22 10:33:18.0

Pushed: 2017-06-28 20:39:20.0

Homepage:

Size: 220

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

commissaire-service

Commissaire Service Framework

Documentation Build Status

Invocations

The library uses jsonrpc v2 for remote invocation and notifications internals.

Note: The last element for the routing_key must match the method to be called

Example

"jsonrpc": "2.0",                             // Required header noting version of jsonrpc
"id": "6829688e-649d-4de7-8649-afefca88781d", // Unique message id
"method": "add",                              // The remote method to call
"params": [1, 2]                              // The remote parameters to provide to the method

Example Response

"jsonrpc": "2.0",                             // Required header noting version of jsonrpc
"id": "6829688e-649d-4de7-8649-afefca88781d", // Unique message id
"result": 3                                   // Result of the call

Example Error

"jsonrpc": "2.0",                             // Required header noting version of jsonrpc
"id": "6829688e-649d-4de7-8649-afefca88781d", // Unique message id
"error": {
    "code": -32602,                           // http://www.jsonrpc.org/specification#error_object
    "message": "Method not found"             // Error message or Exception message
    "data": {                                 // Houses exception
        "exception": "TypeError"              // The name of the exception class or None
    }
}

Creating a Service

See the documentation.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.