Difference between revisions of "Internal GCAPI"

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


Line 11: Line 11:
  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 18:
* Use GET or POST requests
* Use GET or POST requests


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


===== bp (Blood Pressure) =====
==== 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 50: Line 50:
  }
  }


===== weight =====
==== 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 73: Line 73:
  }
  }


===== temp (Indoor Temperature) =====
==== 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 94: Line 94:
  }
  }


==== Assign API ====
=== Assign API ===
* URL: $SystemAddress/api/assign.php
* URL: $SystemAddress/api/assign.php


==== Caregiver API ====
=== Caregiver API ===
* URL: $SystemAddress/api/caregiver.php
* URL: $SystemAddress/api/caregiver.php


==== Care note API ====
=== Care note API ===
* URL: $SystemAddress/api/carenote.php
* URL: $SystemAddress/api/carenote.php


==== Configure API ====
=== Configure API ===
* URL: $SystemAddress/api/configure.php
* URL: $SystemAddress/api/configure.php


==== Device API ====
=== Device API ===
* URL: $SystemAddress/api/device.php
* URL: $SystemAddress/api/device.php


==== Log API ====
=== Log API ===
* URL: $SystemAddress/api/log.php
* URL: $SystemAddress/api/log.php


==== Media API ====
=== Media API ===
* URL: $SystemAddress/api/media.php
* URL: $SystemAddress/api/media.php


==== Medication API ====
=== Medication API ===
* URL: $SystemAddress/api/medication.php
* URL: $SystemAddress/api/medication.php


==== Message API ====
=== Message API ===
* URL: $SystemAddress/api/message.php
* URL: $SystemAddress/api/message.php


==== PIN API ====
=== PIN API ===
* URL: $SystemAddress/api/pin.php
* URL: $SystemAddress/api/pin.php


==== Resident API ====
=== Resident API ===
* URL: $SystemAddress/api/resident.php
* URL: $SystemAddress/api/resident.php


==== Rule API ====
=== Rule API ===
* URL: $SystemAddress/api/rule.php
* URL: $SystemAddress/api/rule.php


==== System API ====
=== System API ===
* URL: $SystemAddress/api/system.php
* URL: $SystemAddress/api/system.php

Revision as of 18:01, 1 August 2012

Introduction

To access the Como API you first need the passcodes to they 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