Service API
The information provided in this is relative to a running service URL. For example
http://fc.jenika.com/services/kennedy
is a URL that is running a service for this site. So you could get a search result using something like:
http://fc.jenika.com/services/kennedy/object?search=ken
The Family Circles service may support three sets of APIs. The read part is always enabled but the write and admin functionality may or may not be available for a given server.
- Read API
Path Type Data Response Description /object GET search Returns all objects /object?search=<string> GET search Returns objects with text that matches search /object/<id> GET object Returns object with specific id /config GET config Returns service config information
- Write API
Path Type Data Response Description /object/<id> POST/PUT object object Modify/Update object /object/<id> OPTIONS Returns available request types /object/<id> DELETE Delete object
- Admin API
Path Type Data Response Description /clear GET Remove all Objects /export GET objects Output all objects /load?fromat=<format>&url=<url> GET Load data from specified url /load?format=<format> POST text Load posted data /load OPTIONS Returns available request types /usage GET usage Service Usage Information format is either "GEDCOM" or "JSON" GEDCOM = GEDCOM file JSON = Family Circles JSON file
Data
- object
Either a Person or Family JSON text see data for details.
- text
Depending on the format specified either GEDCOM text or Family Circles JSON text.
Response
If any request results in a http error response code then you should get an error response otherwise the above tables indicate what sort of response will be returned.
All responses are returned in JSON.
- error
{ "code" : number, "error" : "message" }
- config
{ "api" : ["read","write","admin"] }
- search
[ {"id":"<id>","text":"<string>"}, ... ]
- object
Either a Person or Family JSON text see data for details.
- objects
[ object, ... ]
- usage
{ "metrics" : { "family" : <number>, "person" : <number> } "usage" { "read" : { "object" : { "GET" : { "success":<number>,"error":<number>} } "config" : { "GET" : { "success":<number>,"error":<number>} } }, "write" : { "object" : { "POST" : { "success":<number>,"error":<number>}, "PUT" : { "success":<number>,"error":<number>}, "OPTIONS" : { "success":<number>,"error":<number>}, "DELETE" : { "success":<number>,"error":<number>} } }, "admin" : { "clear" : { "GET" : { "success":<number>,"error":<number>} }, "export" : { "GET" : { "success":<number>,"error":<number>} } "load" : { "GET" : { "success":<number>,"error":<number>}, "POST" : { "success":<number>,"error":<number>}, "OPTIONS" : { "success":<number>,"error":<number>} } "usage" : { "GET" : { "success":<number>,"error":<number>} } } } }