Skip to content

kashirin-alex/Thither.Direct-client-libraries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thither.Direct - CLIENT - LIBRARIES

CLIENT LIBRARIES

The libraries are separated by the client's side language

Flow Metrics Statistics(FMS) API URLs structure

The API base url for requests: https://thither.direct/api/fms/ with options by version https://thither.direct/api/fms-v201807

The Authernication parameters applied to every type of request.

Parameters (Auth):
  'fid'   - Your Flow-ID
  'ps'    - Passphrase, if no token
  'token' - the result of AES.MODE_EAX

'token' as example

params['token'] = '|'.join([base64.b64encode(cipher.nonce), base64.b64encode(tag), base64.b64encode(crp)])

POST METHOD:

https://thither.direct/api/fms/post/stats/item/

Content-Type: 
  'application/x-www-form-urlencoded'
  'application/json'
Parameters + Auth: 
  'mid'   - Your Metric-ID
  'dt'    - Unix Timestamp or format '%Y-%m-%d %H:%M:%S'
  'v'     - Integer Value positive, negative or =equal

https://thither.direct/api/fms/post/stats/items_json/

Content-Type: 
  'application/json'
Parameters + Auth:
  'items' - list of items [[Metric ID, DateTime, Value],]

https://thither.direct/api/fms/post/stats/items_csv/

Content-Type: 
  'multipart/form-data'
  'application/json'
Parameters + Auth:
  'csv' - data with ['mid', 'dt', 'v'] columns
RESPONSE TO POST:
JSON format:
  {
    "status": NAME, 
    "msg": MESSAGE, 
    "succeed": COUNT, 
    "failed": COUNT, 
    "errors": LIST
  }
GET METHOD:

https://thither.direct/api/fms/get/definitions/

  • units/
  • sections/
  • metrics/

https://thither.direct/api/fms/get/stats/