Skip to main content

System loops

get loops

get - Returns the current status of all running software loops.

Request Structure:

http://<cluster>:<port>/api/system/loop/get

Post data:

access_token = <access_token>

The response from the server:

{
 "msg": {
  "quorum-Loop_QuorumStatus": {
   "isAlive": true,
   "counter": 19,
   "ident": "140645146556160",
   "native_id": "23681",
   "timeout": "3"
  },
  "cluster-Loop_NodesStatus": {
   "isAlive": true,
   "counter": 15,
   "ident": "140645138163456",
   "native_id": "23682",
   "timeout": "5"
  }
 },
 "status": "success",
 "error": ""
}

Errors:

Example:

import requests
import json

api_url = "http://<IP>:<PORT>/api/"
access_token = 'BLABLALBA'

path = 'system/loop/get'
data = {}

def send(path, data):
    data['access_token'] = access_token
    send = requests.post(url=api_url + path, data=data)
    print(send.text)
    
send(path, data)