Protocol Actions |
"version" Action Request |
"version" Action Response |
Get the PhpGedView version.
Required Parameters:
action=versionSample URL:
client.php?action=version |
Returns the version for
this installation of PhpGedView. Successful Response:
SUCCESS
version number
Sample Response:
SUCCESS
2.65 final |
|
"listgedcoms" Action Request |
"listgedcoms" Action Response |
Get a list of all of
the gedcoms available on this server. Could be used to
allow the user to switch between gedcoms. Required Parameters:
action=listgedcoms
sessionname=sessionid
Sample URL:
client.php?action=listgedcoms
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns a tab delimited
list of gedcom files and their corresponding titles. Each
gedcom is written on its own line. Successful Response:
SUCCESS
gedcomfile1 [tab] title1
gedcomfile2 [tab] title2
...
Sample Response:
SUCCESS
surname.ged [tab] Surname Genealogy
myfamily.ged [tab] My Family History |
|
"connect" Action Request |
"connect" Action Response |
Initiates a session
with the server.
Required Parameters:
action=connect
Optional paramters:
username=username
password=password
ged=gedcom.ged
readonly=1If no gedcom is specified with the "ged" parameter then the default gedcom defined by the PhpGedView
system administrator will be used.
If no username and password are sent, then an anonymous read-only
connection will be established. Any attempts to change the data will result in an error.
If the
"readonly" parameter is sent, then all editing features will be disabled and they will return errors.
Sample URL:
client.php?action=connect&username=admin&password=adminpass&ged=gedcom.ged
Sample Anonymous Read-only connection:
client.php?action=connect&ged=gedcom.ged |
Returns the session
name and session id for this connection. Successful Response:
SUCCESS
sessionname [tab] sessionid
Sample Response:
SUCCESS
PHPSESSID [tab] f0c56ab7e2381cf17ce7c94135c1398b |
All following actions require a connection be established before they can be used.
|
"get" Action Request |
"get" Action Response |
Get one or more gedcom
records with the given "xref" ids from the gedcom file.
The "xref" parameter accepts a semicolon delimetted list of xref
ids. Required Parameters:
action=get
xref=gedcomid
sessionname=sessionid
Sample URL (single xref):
client.php?action=get&xref=I100
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b
Sample URL (multiple xref):
client.php?action=get&xref=I100;I101
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns the raw gedcom
record for the given "xref". Successful Response:
SUCCESS
gedcom records
...
Sample Response:
SUCCESS
0 @I100@ INDI
1 NAME Given Names /Surname/
1 GIVN Given Names
1 SURN Surname
1 BIRT
2 DATE 1 Jan 1900
2 PLAC New York, New York, USA
0 @I101@ INDI
1 NAME Sibling /Surname/
1 BIRT
2 DATE 1 Jan 1902
2 PLAC New York, New York, USA
... |
|
"getxref" Action Request |
"getxref" Action Response |
Get the first, last,
next, or previous xref in the given type list. A position
of "new" will create a new GEDCOM record for the given type.
A position of "all" will return a list of all Required
Parameters:
action=getxref
type=INDI|FAM|SOUR|REPO|NOTE|OBJE|OTHER
position=new|first|next|prev|last|all
xref=gedcomid
sessionname=sessionid
Sample URL: (get the first FAM)
client.php?action=getxref&type=FAM&position=first
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b
Sample URL: (get the next INDI after I100)
client.php?action=getxref&type=INDI&position=next&xref=I100
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b
Sample URL: (get the xref for a new FAM. See also the
"append" action)
client.php?action=getxref&type=FAM&position=new
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns a list of xref
Successful Response:
SUCCESS
XREF
...
Sample Response:
SUCCESS
I102
... |
|
"getvar" Action Request |
"getvar" Action Response |
Get the value of the
given global phpGedView variable. A list of available
variable names can be found in the config_gedcom.php file.
Required Parameters:
action=getvar
var=variablename
sessionname=sessionid
Sample URL:
client.php?action=getvar&var=GEDCOM
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns the value of
the global variable specified in "var". Successful Response:
SUCCESS
variable value
Sample Response: (in this example the current working gedcom)
SUCCESS
surname.ged |
|
"update" Action Request |
"update" Action Response |
Update a GEDCOM record
by replacing it by the given gedcom record. Required
Parameters:
action=update
xref=gedcomid
gedrec=Raw GEDCOM Record
sessionname=sessionid
Sample URL:
client.php?action=update&xref=I100
&gedrec=0 @I100@ INDI\n1 NAME New Name /Surname/\n
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns "SUCCESS".
Successful Response:
SUCCESS
Sample Response:
SUCCESS |
|
"append" Action Request |
"append" Action Response |
Append a new GEDCOM
record to this gedcom file. (See also action=getxref&position=new)
Required Parameters:
action=append
gedrec=raw GEDCOM record
sessionname=sessionid
Sample URL:
client.php?action=append&gedrec=0 @NEW@ INDI\n1 NAME New Name
/Surname/\n&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns "SUCCESS" and
the new xref assigned to this gedcom record. Successful
Response:
SUCCESS
XREF
Sample Response:
SUCCESS
I9999 |
|
"delete" Action Request |
"delete" Action Response |
Deletes the GEDCOM
record from the file. Required Parameters:
action=delete
xref=gedcomid
sessionname=sessionid
Sample URL:
client.php?action=update&xref=I100
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns "SUCCESS".
Successful Response:
SUCCESS
Sample Response:
SUCCESS |
|
"getnext" Action Request |
"getnext" Action Response |
Get the next gedcom
record after the given "xref" from the gedcom file. Required
Parameters:
action=getnext
xref=gedcomid
sessionname=sessionid
Sample URL:
client.php?action=getnext&xref=I100
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns the raw gedcom
record after the given "xref". Successful Response:
SUCCESS
gedcom record
Sample Response:
SUCCESS
0 @I99@ INDI
1 NAME Given Names /Surname/
1 GIVN Given Names
1 SURN Surname
1 BIRT
2 DATE 1 Jan 1880
2 PLAC New York, New York, USA |
|
"getprev" Action Request |
"getprev" Action Response |
Get the previous gedcom
record before the given "xref" from the gedcom file. Required
Parameters:
action=getprev
xref=gedcomid
sessionname=sessionid
Sample URL:
client.php?action=getprev&xref=I100
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns the raw gedcom
record before the given "xref". Successful Response:
SUCCESS
gedcom record
Sample Response:
SUCCESS
0 @I101@ INDI
1 NAME Given Names /Surname/
1 GIVN Given Names
1 SURN Surname
1 BIRT
2 DATE 1 Jan 1920
2 PLAC New York, New York, USA |
|
"search" Action Request |
"search" Action Response |
Use regular expressions
to search gedcom INDI records. Required Parameters:
action=search
query=keyword or expression
sessionname=sessionid
Sample URL: (search for all indis with "arizona" in their
record)
client.php?action=search&query=arizona
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b
Sample URL: (search for all indis with an event in 1900)
client.php?action=search&query=DATE+.*+1900
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns a sorted list
of INDI xrefs. Successful Response:
SUCCESS
XREF
...
Sample Response:
SUCCESS
I1
I100
I102
... |
|
"soundex" Action Request |
"soundex" Action Response |
Use soundex to search
INDI names. Required Parameters:
action=soundex
firstname=givenames
lastname=lastname
sessionname=sessionid
Sample URL: (search for indis with soundex surname matching "finlay")
client.php?action=soundex&lastname=finlay
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b
Sample URL: (search for indis with soundex surname matching "finlay"
and firstname matching "john")
client.php?action=soundex&lastname=finlay&firstname=john
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b |
Returns a sorted list
of INDI xrefs. Successful Response:
SUCCESS
XREF
...
Sample Response:
SUCCESS
I1
I100
I102
... |
|
"uploadmedia" Action Request |
"uploadmedia" Action Response |
Upload media files to
the PhpGedView server. You can specify either a "mediafile"
a "thumbnail" or both. Required Parameters:
action=uploadmedia
mediafile=[File Data]
thumbnail=[File Data]
sessionname=sessionid
Sample URL:
This cannot be done through a GET. The data must be posted
in Multi-part mime form data.
|
Returns a URL to the
uploaded object. Successful Response:
SUCCESS
http://www.yoursite.com/phpGedView/media/object
http://www.yoursite.com/phpGedView/media/thumbs/object
Sample Response:
SUCCESS
http://www.yoursite.com/phpGedView/media/object
|
|
"getchanges" Action Request |
"getchanges" Action Response |
Get a list of changes since the given date. Required Parameters:
action=getchanges
date=DD MMM YYYY
sessionname=sessionid
Sample URL:
client.php?action=getchanges&date=1+FEB+2006 &PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b
|
Returns a list of the changed record XREFs.
Successful Response:
SUCCESS
I101
I102
F51
|
|