Difference between revisions of "Internal GCAPI"
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
* URL: $SystemAddress/api/history.php | * URL: $SystemAddress/api/history.php | ||
=== bp (Blood Pressure) === | |||
$ curl "http://10.100.1.2/api/history.php?op=bp&encoding=json&passcode=YkdrYUpUOEVVRDhMZFQ4SlB6OC9kdz09" | $ curl "http://10.100.1.2/api/history.php?op=bp&encoding=json&passcode=YkdrYUpUOEVVRDhMZFQ4SlB6OC9kdz09" | ||
{ | { | ||
Line 49: | Line 49: | ||
} | } | ||
=== weight === | |||
$ curl "http://10.100.1.2/api/history.php?op=weight&encoding=json&passcode=YkdrYUpUOEVVRDhMZFQ4SlB6OC9kdz09" | $ curl "http://10.100.1.2/api/history.php?op=weight&encoding=json&passcode=YkdrYUpUOEVVRDhMZFQ4SlB6OC9kdz09" | ||
{ | { | ||
Line 72: | Line 72: | ||
} | } | ||
=== temp (Indoor Temperature) === | |||
$ curl "http://10.100.1.2/api/history.php?op=temp&encoding=json&passcode=YkdrYUpUOEVVRDhMZFQ4SlB6OC9kdz09" | $ curl "http://10.100.1.2/api/history.php?op=temp&encoding=json&passcode=YkdrYUpUOEVVRDhMZFQ4SlB6OC9kdz09" | ||
{ | { | ||
Line 93: | Line 93: | ||
} | } | ||
== Assign API == | |||
* URL: $SystemAddress/api/assign.php | * URL: $SystemAddress/api/assign.php | ||
== Caregiver API == | |||
* URL: $SystemAddress/api/caregiver.php | * URL: $SystemAddress/api/caregiver.php | ||
== Care note API == | |||
* URL: $SystemAddress/api/carenote.php | * URL: $SystemAddress/api/carenote.php | ||
== Configure API == | |||
* URL: $SystemAddress/api/configure.php | * URL: $SystemAddress/api/configure.php | ||
== Device API == | |||
* URL: $SystemAddress/api/device.php | * URL: $SystemAddress/api/device.php | ||
== Log API == | |||
* URL: $SystemAddress/api/log.php | * URL: $SystemAddress/api/log.php | ||
== Media API == | |||
* URL: $SystemAddress/api/media.php | * URL: $SystemAddress/api/media.php | ||
== Medication API == | |||
* URL: $SystemAddress/api/medication.php | * URL: $SystemAddress/api/medication.php | ||
== Message API == | |||
* URL: $SystemAddress/api/message.php | * URL: $SystemAddress/api/message.php | ||
== PIN API == | |||
* URL: $SystemAddress/api/pin.php | * URL: $SystemAddress/api/pin.php | ||
== Resident API == | |||
* URL: $SystemAddress/api/resident.php | * URL: $SystemAddress/api/resident.php | ||
== Rule API == | |||
* URL: $SystemAddress/api/rule.php | * URL: $SystemAddress/api/rule.php | ||
== System API == | |||
* URL: $SystemAddress/api/system.php | * URL: $SystemAddress/api/system.php | ||
= Other Resources = | |||
* [https://github.com/ngharo/gc-javascript-api Experimental JavaScript library] | * [https://github.com/ngharo/gc-javascript-api Experimental JavaScript library] |
Revision as of 18:18, 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