home > Documentation

Monitoring




In this document, we detail the ADMIN RESTful API v1 of COHORTE platform as well as the web admin interface built on the top of this API.

Web Admin

SpellChecker Application

Admin REST API v1

API endpoints

CodeAction
APIV1-001 Get the list of all Nodes
APIV1-002 Get the list of all Isolates
APIV1-003 Get the list of all Components
APIV1-050 Get Node details
APIV1-051 Get Isolate details
APIV1-053 Get Component details
APIV1-100 Get the list of Isolates in one particular Node
APIV1-101 Get the list of Components in one particular Isolate
APIV1-150 Kill all nodes
APIV1-151 Kill node
APIV1-152 Kill isolate

Detail of REST APIs

APIV1-001 : GET the list of all Nodes

  • URL: http://myhost:port/admin/api/v1/nodes
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
metaMapmeta-information about the response
+ codeIntegerReturn code
+ countIntegerNumber of results
nodesArrayArray of information about the nodes
+ uidStringNode UID
+ nameStringNode Name
  • JSON Response Example :
{
    "meta": {
        "code": 200,
        "count": 2
    },
    "nodes": [
        {
            "uid": "56e5b100-c8a2-4bd8-a818-30edaf9a8fe9",
            "name": "central"
        },
        {
            "uid": "acfd6479-f29f-4bf0-ae4d-acd681e3a531",
            "name": "raspberry-pi-1"
        }
    ]
}


APIV1-002 : GET the list of all Isolates

  • URL: http://myhost:port/admin/api/v1/isolates
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
metaMapmeta-information about the response
+ codeIntegerReturn code
+ lastupdateFloatLast update time of the actual isolates list
+ countIntegerNumber of results
isolatesArrayArray of information about the isolates
+ uidStringIsolate UID
+ nameStringIsolate Name
+ node_uidStringNode UID
+ node_nameStringNode Name
  • JSON Response Example :
{
    "meta": {
        "code": 200,
        "lastupdate": 1411979225.65,
        "count": 2
    },
    "isolates": [
        {
            "uid": "50684926acb4387d0f007ced",
            "name": "webadmin-isolate",
            "node_uid": "41110b1d-b510-4e51-9945-a752da04a16d",
            "node_name": "central"
        },
        {
            "uid": "03ff839a-df24-4bdf-b734-9fac1c886c65",
            "name": "spellcheck-isolate",
            "node_uid": "41110b1d-b510-4e51-9945-a752da04a16d",
            "node_name": "central"
        }
    ]
}


APIV1-003 : GET the list of all Components

  • URL: http://myhost:port/admin/api/v1/components
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
metaMapmeta-information about the response
+ codeIntegerReturn code
+ countIntegerNumber of results
componentsArrayArray of information about the components
+ nameStringComponent name
+ factoryStringComponent Factory
+ languageStringProgramming language
+ isolate_uidStringIsolate UID
+ isolate_nameStringIsolate Name
  • JSON Response Example :
{
    "meta": {
        "code": 200,
        "count": 2
    },
    "components": [
        {
            "name": "spell_check_client",
            "factory": "spell_check_client_factory",
            "language": "python",
            "isolate_uid": "03ff839a-df24-4bdf-b734-9fac1c886c65",
            "isolate_name": "spellcheck-isolate"
        },
        {
            "name": "spell_dictionray_FR",
            "factory": "spell_dictionary_FR_factory",
            "language": "python",
            "isolate_uid": "03ff839a-df24-4bdf-b734-9fac1c886c65",
            "isolate_name": "spellcheck-isolate"
        }
    ]
}


APIV1-050 : GET Node detail

  • URL: http://myhost:port/admin/api/v1/nodes/56e5b100-c8a2-4bd8-a818-30edaf9a8fe9
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
metaMapmeta-information about the response
+ codeIntegerReturn code
+ nodeStringNode UID
nodeMapGeneral informations about the wanted Node
+ nameStringNode name
+ nbr_isolatesIntegerNumber of Isolates
  • JSON Response Example :
{
    "meta": {
        "node": "41110b1d-b510-4e51-9945-a752da04a16d",
        "code": 200
    },
    "node": {
        "name": "central",
        "nbr_isolates": 3
    }
}


APIV1-051 : GET Isolate detail

  • URL: http://myhost:port/admin/api/v1/isolates/50684926acb4387d0f007ced
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
metaMapmeta-information about the response
+ codeIntegerReturn code
+ isolateStringIsolate UID
isolateMapGeneral informations about the wanted Node
+ nameStringIsolate name
+ typeStringType of this isolate:
  • cohorte-isolate
  • app-dynamic-isolate
+ nbr_componentsIntegerNumber of components in this isolate
+ node_uidStringIsolate's Node UID
+ node_nameStringIsolate's Node name
+ http_accessStringIsolate's HTTP Service access
+ http_portintegerIsolate's HTTP Service port
+ shell_portintegerIsolate's Remote shell port
  • JSON Response Example :
{
    "meta": {
        "isolate": "50684926acb4387d0f007ced",
        "code": 200
    },
    "isolate": {
        "name": "webadmin-isolate",
        "type": "cohorte-isolate",
        "nbr_components": 3,
        "node_uid": "41110b1d-b510-4e51-9945-a752da04a16d",
        "node_name": "central",
        "http_access" : "10.130.1.97",
        "http_port" : 9500,
        "shell_port" : 9501
    }
}


APIV1-052 : GET Component detail

  • URL: http://myhost:port/admin/api/v1/components/spell_check_client
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
metaMapmeta-information about the response
+ codeIntegerReturn code
+ componentStringComponent name
componentMapGeneral informations about the wanted Component
+ factoryStringComponent Factory name
+ languageStringProgramming language
+ isolate_uidStringIsolate UID
+ isolate_nameStringIsolate name
+ bundle_nameStringBundle name
+ bundle_versionStringBundle version
+ propertiesMapComponent properties
  • JSON Response Example :
{
    "meta": {
        "component": "spell_check_client",
        "code": 200
    },
    "node": {
        "name": "spell_check_client",
        "factory": "spell_check_client_factory",
        "language": "python",
        "isolate_uid": "03ff839a-df24-4bdf-b734-9fac1c886c65",
        "isolate_name": "spellcheck-isolate"
        "bundle_name": "spellchecker.spell_check"
        "bundle_version": "1.0.0"
        "properties": {
             "prop1": "value1",
             "prop2": "value2",
        }
    }
}


APIV1-100 : Get Isolates of one particular Node

  • URL: http://myhost:port/admin/api/v1/nodes/56e5b100-c8a2-4bd8-a818-30edaf9a8fe9/isolates
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
metaMapmeta-information about the response
+ codeIntegerReturn code
+ nodeStringNode name
+ countIntegerNumber of results
isolatesArrayArray of isolates of the wanted Node
+ uidStringIsolate UID
+ nameStringIsolate name
  • JSON Response Example :
{
    "meta": {
        "node": "41110b1d-b510-4e51-9945-a752da04a16d",
        "code": 200,
        "count": 2
    },
    "isolates": [
        {
            "uid": "50684926acb4387d0f007ced",
            "name": "webadmin-isolate"
        },
        {
            "uid": "03ff839a-df24-4bdf-b734-9fac1c886c65",
            "name": "spellcheck-isolate"
        }
    ]
}


APIV1-101 : Get Components of one particular Isolate

  • URL: http://myhost:port/admin/api/v1/isolates/50684926acb4387d0f007ced/components
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
metaMapmeta-information about the response
+ codeIntegerReturn code
+ isolateStringIsolate UID
+ countIntegerNumber of results
componentsArrayArray of components of the wanted Isolate
+ nameStringComponent name
+ factoryStringComponent Factory name
+ languageStringComponent implementation language
  • JSON Response Example :
{
    "meta": {
        "isolate": "50684926acb4387d0f007ced",
        "code": 200,
        "count": 3
    },
    "components": [
        {
            "name": "spell_dictionary_FR",
            "factory": "spell_dictionary_FR_factory",
            "language": "python"
        },
        {
            "name": "spell_check",
            "factory": "spell_check_factory",
            "language": "python"
        },
        {
            "name": "spell_client",
            "factory": "spell_client_factory",
            "language": "python"
        }
    ]
}

APIV1-150 : Kill all nodes

  • URL: http://myhost:port/admin/api/v1/nodes/kill
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
  • JSON Response Example :
{
    "meta": {
        "code": 200
    },
    "status": {
        "code": 0,
        "description": "All nodes successfully destroyed"
    }
}

APIV1-151 : Kill node

  • URL: http://myhost:port/admin/api/v1/nodes/56e5b100-c8a2-4bd8-a818-30edaf9a8fe9/kill
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
metaMapmeta-information about the response
+ codeIntegerReturn code
+ nodeStringNode name
+ countIntegerNumber of results
isolatesArrayArray of isolates of the wanted Node
+ uidStringIsolate UID
+ nameStringIsolate name
  • JSON Response Example :
{
    "meta": {
        "node": "56e5b100-c8a2-4bd8-a818-30edaf9a8fe9",
        "code": 200
    },
    "status": {
        "code": 0,
        "description": "Node successfully destroyed"
    }
}

APIV1-152 : Kill isolate

  • URL: http://myhost:port/admin/api/v1/isolates/41110b1d-b510-4e51-9945-a752da04a16d/kill
  • Supported request methods: GET
  • Response format: json
  • Requires authentication?: not required
  • Response:
FieldTypeDescription
metaMapmeta-information about the response
+ codeIntegerReturn code
+ nodeStringNode name
+ countIntegerNumber of results
isolatesArrayArray of isolates of the wanted Node
+ uidStringIsolate UID
+ nameStringIsolate name
  • JSON Response Example :
{
    "meta": {
        "isolate": "41110b1d-b510-4e51-9945-a752da04a16d",
        "code": 200
    },
    "status": {
        "code": 0,
        "description": "Isolate successfully destroyed"
    }
}