SourceForge Logo

 

Start


Leistungs-
 merkmale



Live Demos


Presse


Download


Dokumentation
 - Handbuch
 - Installation
 - Upgrade
 - MultiMedia
 - Readme *
 - FAQ *
 - CGI Gedcom
    Protocol



Support


Änderungen *


Style Hilfe


Edit Online


Module


Spenden

* Achtung! Links, die mit * markiert sind, führen zu originalen englischen Seiten. Benutzen Sie anschließend immer den "zurück"-Knopf Ihres Browsers, um wieder auf die deutschen Seiten zu gelangen.

  CGI GEDCOM Access Protokoll v2.65

Mit dem CGI-Protokoll für den GEDCOM-Zugang steht ein Werkzeug zur Verfügung, mit dem Remote Clients auf in PhpGedView gespeicherte genealogische Daten zugreifen und sie verändern können. Dieses Dokument beschreibt das Protokoll, das Remote Clients benutzen, um mit PhpGedView 2.65 zu kommunizieren.

Ein Client kommuniziert über POST- und GET-Anfragen an PhpGedView über die Datei "gdbi.php." Jede Anfrage muss eine "action" enthalten. Eine "action" übermittelt an PhpGedView, welche Art von Anfrage Sie stellen wollen. Die Datei "gdbi.php " antwortet mit dem String "SUCCESS" in der ersten Zeile, gefolgt von den angefragten Informationen, oder sie erhalten eine Fehlermeldung. Fehlermeldungen haben immer die folgende Form:

ERROR #: Error Message

Beispiel einer Fehlermeldung:

ERROR 1: No action specified.

 

Zuerst müssen Sie eine "connect action" mit Ihrem Benutzernamen und Ihrem Passwort senden, bevor Sie andere Anfragen stellen können. Eine erfolgreiche "connect action" wird mit einem Session-Namen und einer Session-ID beantwortet, die allen weiteren Anfragen hinzugefügt werden müssen. Sie können angeben, mit welcher GEDCOM-Datei Sie arbeiten möchten, indem Sie den optionalen "gedcom"-Parameter mit Ihrer Anfrage schicken. Alle folgenden Anfragen werden diese GEDCOM-Datei benutzen, bis ein anderer "gedcom"-Parameter angegeben wird.

Die im Protokoll verfügbaren "actions", ihre erforderlichen Parameter und ihre Antworten sind in der folgenden Tabelle aufgelistet.
([tab] bedeutet ein einzelnes Tabulator-Zeichen)
[Anm. d. Ü.: Von einer Übersetzung der Tabelle wurde abgesehen, da man wohl davon ausgehen kann, dass diejenigen, die mit dieser Materie vertraut sind, die Angaben auch so verstehen, und eine Übersetzung unnötig Verwirrung stiften würde.]

Protocol Actions

"connect" Action Request

"connect" Action Response

Initiates a session with the server.

Required Parameters:
action=connect
username=username
password=password

Sample URL:
gdbi.php?action=connect&username=admin&password=adminpass

Returns the session name and session id for this connection.

Successful Response:
SUCCESS
sessionname [tab] sessionid

Sample Response:
SUCCESS
PHPSESSID [tab] f0c56ab7e2381cf17ce7c94135c1398b

 

"version" Action Request

"version" Action Response

Initiates a session with the server.

Required Parameters:
action=version

Sample URL:
gdbi.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:
gdbi.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

 

"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):
gdbi.php?action=get&xref=I100
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b

Sample URL (multiple xref):
gdbi.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)
gdbi.php?action=getxref&type=FAM&position=first
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b

Sample URL: (get the next INDI after I100)
gdbi.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)
gdbi.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:
gdbi.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:
gdbi.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:
gdbi.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:
gdbi.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:
gdbi.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:
gdbi.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)
gdbi.php?action=search&query=arizona
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b

Sample URL: (search for all indis with an event in 1900)
gdbi.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")
gdbi.php?action=soundex&lastname=finlay
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b

Sample URL: (search for indis with soundex surname matching "finlay" and firstname matching "john")
gdbi.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
 

 

 

Hier ein Beispiel für eine Kommunikation:

CLIENT:
gdbi.php?action=connect&username=admin&password=adminpass

SERVER:
PHPSESSID [tab] f0c56ab7e2381cf17ce7c94135c1398b

CLIENT:
gdbi.php?action=getvar&var=PEDIGREE_ROOT_ID&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b

SERVER:
I1

CLIENT:
gdbi.php?action=get&xref=I1&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b

SERVER:
0 @I1@ 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
1 FAMS @F1@

CLIENT:
gdbi.php?action=get&xref=F1&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b

SERVER:
0 @F1@ FAM
1 HUSB @I1@
1 WIFE @I2@
1 MARR
2 DATE 13 Jun 1921
2 PLAC New York, New York, USA
1 CHIL @I3@

(The next few requests show how to switch from one gedcom to another)
CLIENT:
gdbi.php?action=listgedcoms&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b

SERVER:
surname.ged [tab] Surname Genealogy
myfamily.ged [tab] My Family History

CLIENT: (notice the GEDCOM parameter)
gdbi.php?GEDCOM=myfamily.ged&action=getvar&var=PEDIGREE_ROOT_ID
&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b

SERVER:
I103

CLIENT:
gdbi.php?action=get&xref=I103&PHPSESSID=f0c56ab7e2381cf17ce7c94135c1398b

SERVER
0 @I103@ INDI
1 NAME Given Names /Surname/
1 GIVN Given Names
1 SURN Surname
1 BIRT
2 DATE 1 Jan 1976
2 PLAC Hamburg, Germany
1 FAMS @F1@