Difference between revisions of "Internal GCAPI"

From GrandCare Systems
Jump to navigation Jump to search
Line 1: Line 1:
= Introduction =
To access the Como API you first need the passcodes to the system via [[GCManage API]].
To access the Como API you first need the passcodes to the system via [[GCManage API]].


Line 11: Line 10:
  http://10.100.1.5
  http://10.100.1.5


== Services ==
= Services =
* Global Parameters
* Global Parameters
** '''op''': API Operation (see list below)
** '''op''': API Operation (see list below)
Line 18: Line 17:
* Use GET or POST requests
* Use GET or POST requests


=== History API ===
== History API ==
* URL: $SystemAddress/api/history.php
* URL: $SystemAddress/api/history.php


Line 132: Line 131:
=== System API ===
=== System API ===
* URL: $SystemAddress/api/system.php
* URL: $SystemAddress/api/system.php
== Other Resources ==
* [https://github.com/ngharo/gc-javascript-api Experimental JavaScript library]

Revision as of 18:17, 1 August 2012

To access the Como API you first need the passcodes to the system via GCManage API.

If you're on the same network as the GrandCare system, you can call directly to it's IP address. If not, you'll need to get the public URL from the GCManage API remotelogin service.

This URL (whether private IP or public address) will be referenced as $SystemAddress in the rest of the documentation.

$SystemAddress Examples

http://gcmanage.grandcare.com:21000
http://192.168.0.5
http://10.100.1.5

Services

  • Global Parameters
    • op: API Operation (see list below)
    • encoding ("json" or "xml")
    • passcode: System passcode from GCManage API
  • Use GET or POST requests

History API

  • URL: $SystemAddress/api/history.php

bp (Blood Pressure)

$ curl "http://10.100.1.2/api/history.php?op=bp&encoding=json&passcode=YkdrYUpUOEVVRDhMZFQ4SlB6OC9kdz09"
{
   "gcapi": {
       "result": "SUCCESS",
       "bp": [
           {
               "timestamp": "07/31/12 08:15:57",
               "deviceId": "1001",
               "residentId": "cf6ff892-3124-41ef-8c77-e729f0f66fc5",
               "systolic": "134",
               "diastolic": "95",
               "pulse": "54",
               "mean-ap": "117"
           },
           {
               "timestamp": "07/28/12 07:51:16",
               "deviceId": "1001",
               "residentId": "cf6ff892-3124-41ef-8c77-e729f0f66fc5",
               "systolic": "134",
               "diastolic": "89",
               "pulse": "51",
               "mean-ap": "104"
           }
       ],
       "totalEntries": "2"
   }
}

weight

$ curl "http://10.100.1.2/api/history.php?op=weight&encoding=json&passcode=YkdrYUpUOEVVRDhMZFQ4SlB6OC9kdz09"
{
   "gcapi": {
       "result": "SUCCESS",
       "weight": [
           {
               "timestamp": "07/31/12 08:14:45",
               "deviceId": "1000",
               "residentId": "cf6ff892-3124-41ef-8c77-e729f0f66fc5",
               "value": "176.6"
           },
           {
               "timestamp": "07/28/12 07:49:32",
               "deviceId": "1000",
               "residentId": "cf6ff892-3124-41ef-8c77-e729f0f66fc5",
               "value": "176.2"
           }
       ],
       "totalEntries": "2"
   }
}

temp (Indoor Temperature)

$ curl "http://10.100.1.2/api/history.php?op=temp&encoding=json&passcode=YkdrYUpUOEVVRDhMZFQ4SlB6OC9kdz09"
{
   "gcapi": {
       "result": "SUCCESS",
       "temp": [
           {
               "timestamp": "07/20/12 12:06:18",
               "deviceId": "103",
               "value": "73"
           },
           {
               "timestamp": "07/20/12 11:53:14",
               "deviceId": "103",
               "value": "74"
           }
       ],
       "totalEntries": "2"
   }
}

Assign API

  • URL: $SystemAddress/api/assign.php

Caregiver API

  • URL: $SystemAddress/api/caregiver.php

Care note API

  • URL: $SystemAddress/api/carenote.php

Configure API

  • URL: $SystemAddress/api/configure.php

Device API

  • URL: $SystemAddress/api/device.php

Log API

  • URL: $SystemAddress/api/log.php

Media API

  • URL: $SystemAddress/api/media.php

Medication API

  • URL: $SystemAddress/api/medication.php

Message API

  • URL: $SystemAddress/api/message.php

PIN API

  • URL: $SystemAddress/api/pin.php

Resident API

  • URL: $SystemAddress/api/resident.php

Rule API

  • URL: $SystemAddress/api/rule.php

System API

  • URL: $SystemAddress/api/system.php

Other Resources