Skip to content
Sanchari edited this page Sep 6, 2013 · 9 revisions

Common Notes

  • Only JSON is supported
  • All requests must be under "/api" namespace
  • Once logged in, an API session expires in one week
  • Session tokens are stored as encrypted cookies
  • Any API call which is not under "/api" is deprecated and needs to be ported

Getting Started

  • First call the Login API /api/login
  • Save the Set-Cookie returned by this API call, This cookie must be used for all subsequent requests
  • For all subsequent requests, set the Cookie header
  • Call /api/logout at the end to invalidate the cookie

Interactive API Documentation

For the complete API documentation take a look at the Apigee interactive console

This Wiki shall only list the usage of the APIs. Please refer to the Apigee interactive console for the actual request/response formats, since that is more interactive.

POST /api/login

Entry point for using the API. First call this and save the cookie returned.

POST /api/logout

The current session will be invalidated. Remember to pass the cookie that you want to logout.

GET /api/children

Lists all Child records, without any pagination. The current user must be a verified user to use this API.

POST /api/children

Create a verified child record. The current user must be a verified user to use this API.

GET /api/children/{child id}

Get a Child record. The current user must be a registered user to use this API.

POST /api/children/{child id}

Update a Child record. The current user must be a registered user to use this API.

POST /api/children/unverified

Used by Unverified users to create an unverified child record.

GET /api/children/ids

Returns IDs and latest version numbers for all child records in the system. Used for comparing which child records have been updated.

GET /api/children/{child_id}/photo/{photo_id}

Fetch Photo for a Child record

GET /api/children/{child_id}/audio/{audio_id}

Fetch Audio file for a Child record

Clone this wiki locally