Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
engine:procedures:co_getcommunitysettings [11.01.2016 ] |
engine:procedures:co_getcommunitysettings [11.01.2016 ] (aktuell) |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ===== co_GetCommunitySettings ===== | ||
+ | |||
+ | Ermittelt die "Settings"-Einträge (optional nur zu einem bestimmten Schlüssel) aller Communities (oder auch nur zu einer bestimmten Community).\\ | ||
+ | |HTTP-Method|GET | | ||
+ | |HTTP-Auth|Optional | | ||
+ | |Tags|{{tag>[co Get Community Settings]}}| | ||
+ | |Engine-Kategorie|communities | | ||
+ | |Engine-Typ|Daten-Ermittlung | | ||
+ | |Letzte Aktualisierung|3.5.2 (2001-01-28)| | ||
+ | |||
+ | ==== Parameter ==== | ||
+ | |||
+ | ^Name ((Pflichtparameter sind unterstrichen)) ^Standard-Wert ^Beschreibung ((siehe [[webservice:engine_parameterconventions|Parameter-Konventionen engine/<Prozedur-Name>]])) ^SQL-Datentyp((siehe [[:webservice:engine_datatypes|Datentypen im Bereich "engine"]])) ^ab Version ^ | ||
+ | |CommunityID|NULL |ID einer Community, zu der die "Settings"-Einträge ermittelt werden sollen. Falls "NULL", ermittelt die Prozedur die Einträge zu allen Communities.\\ |smallint|3.5.2| | ||
+ | |KeyVariable|NULL |Ein Schlüssel wie z.B. "CommunityGroupID". Falls "NULL", werden alle "Settings"-Einträge der Community "CommunityID" zurückgegeben.\\ |varchar(100)|3.5.2| | ||
+ | |ResultOnlyInOutputParam|0 |Wird nur beachtet, falls "CommunityID" UND "KeyVariable" angegeben sind ! Wenn hier "0" übergeben wird, gibt es eine Rückgabemenge, sonst ist der Wert nur in "Value" gespeichert.\\ |bit|3.5.2| | ||
+ | ==== Rückgabe ==== | ||
+ | |||
+ | === wenn ResultOnlyInOutputParam = 0 === | ||
+ | |||
+ | ^Spaltenname ^Beschreibung ^SQL-Datentyp((siehe [[:webservice:engine_datatypes|Datentypen im Bereich "engine"]])) ^ab Version ^ | ||
+ | |CommunityID|ID einer Community\\ |smallint|3.5.2 | | ||
+ | |CommunityName|Name der Community "CommunityID"\\ |varchar(100)|3.5.2 | | ||
+ | |KeyVariable|Ein Schlüssel wie z.B. "CommunityGroupID", zu dem für die Community "CommunityID" ein Wert hinterlegt ist\\ |varchar(50)|3.5.2 | | ||
+ | |Value|Der in der Community "CommunityID" zum Schlüssel "KeyVariable" hinterlegte Wert\\ |varchar(100)|3.5.2 | | ||
+ | === wenn CommunityID is NULL und ResultOnlyInOutputParam = 1 === | ||
+ | |||
+ | ^Spaltenname ^Beschreibung ^SQL-Datentyp((siehe [[:webservice:engine_datatypes|Datentypen im Bereich "engine"]])) ^ab Version ^ | ||
+ | |CommunityID|ID einer Community\\ |smallint|3.5.2 | | ||
+ | |CommunityName|Name der Community "CommunityID"\\ |varchar(100)|3.5.2 | | ||
+ | |KeyVariable|Ein Schlüssel wie z.B. "CommunityGroupID", zu dem für die Community "CommunityID" ein Wert hinterlegt ist\\ |varchar(50)|3.5.2 | | ||
+ | |Value|Der in der Community "CommunityID" zum Schlüssel "KeyVariable" hinterlegte Wert\\ |varchar(100)|3.5.2 | | ||
+ | === wenn KeyVariable is NULL und ResultOnlyInOutputParam = 1 === | ||
+ | |||
+ | ^Spaltenname ^Beschreibung ^SQL-Datentyp((siehe [[:webservice:engine_datatypes|Datentypen im Bereich "engine"]])) ^ab Version ^ | ||
+ | |CommunityID|ID einer Community\\ |smallint|3.5.2 | | ||
+ | |CommunityName|Name der Community "CommunityID"\\ |varchar(100)|3.5.2 | | ||
+ | |KeyVariable|Ein Schlüssel wie z.B. "CommunityGroupID", zu dem für die Community "CommunityID" ein Wert hinterlegt ist\\ |varchar(50)|3.5.2 | | ||
+ | |Value|Der in der Community "CommunityID" zum Schlüssel "KeyVariable" hinterlegte Wert\\ |varchar(100)|3.5.2 | | ||
+ | ==== Output-Parameter ==== | ||
+ | |||
+ | |Value|Ausgabeparameter für den zum Schlüssel "KeyVariable" hinterlegten Wert| | ||
+ | ==== Mögliche Return-Codes ==== | ||
+ | |||
+ | ^Code ^Beschreibung ^Quelle ((direkt meint "von der Prozedur selber" und indirekt meint "von intern aufgerufenen Unterprozeduren")) ^ | ||
+ | |-781|Fehlender oder falscher Eintrag in CommunitySettings|nur direkt| | ||
+ | ==== XML-Schema ==== | ||
+ | |||
+ | Die Rückgabe erfolgt als XML-Dokument welches gegen das Schema [[http://resources.dstore.de/xsd/webservice_SmartGate/Response/EngineProcedure_v1_0.xsd|Response/EngineProcedure_v1_0.xsd]] validiert. | ||
+ | ==== Historie ==== | ||
+ | |||
+ | |3.5.2 |2001-01-28|Erstmalig in dieser Version erstellt\\ | | ||
+ | |||
+ | ==== Code-Snippets ==== | ||
+ | |||
+ | == Engine Playground == | ||
+ | Der folgende Link öffnet in einem separaten Fenster den Engine Playground der fest mit dem dbap-demo System verbunden ist: | ||
+ | * [[http://playground.dstore.de/index.php?proc=co_GetCommunitySettings|co_GetCommunitySettings im Engine Playground öffnen]] | ||
+ | == cURL == | ||
+ | Unformatierte Ausgabe: | ||
+ | <code bash> | ||
+ | curl -X GET 'http://<partner>-<project>.dstore.de/default/engine/co_GetCommunitySettings'</code>Mit xmllint ((I.d.R. auf Unix-artigen Systemen bereits installiert, Bestandteil der libxml2, siehe http://www.xmlsoft.org)) formatierte Ausgabe: | ||
+ | <code bash> | ||
+ | curl -X GET 'http://<partner>-<project>.dstore.de/default/engine/co_GetCommunitySettings' | xmllint --format -</code>== dStore_php == | ||
+ | <code php> | ||
+ | use dStore_php\WebService; | ||
+ | |||
+ | $service = new WebService\Service( WebService\Scheme::HTTP,'<partner>-<project>.dstore.de', 80); | ||
+ | |||
+ | $request = new WebService\Requests\Engine\Procedure\Request( | ||
+ | new WebService\Requests\AccessData('default'), | ||
+ | 'co_GetCommunitySettings', | ||
+ | array( | ||
+ | // 'CommunityID' => NULL, | ||
+ | // 'KeyVariable' => NULL, | ||
+ | // 'ResultOnlyInOutputParam' => 0 | ||
+ | ) | ||
+ | ); | ||
+ | |||
+ | $service->execute($request); | ||
+ | |||
+ | $xml_result = $request->getResponse()->getBody()->toSimpleXmlDocument(); | ||
+ | $ResultSet = $xml_result->getRowsAsArray(); | ||
+ | |||
+ | $OutputParams = $xml_result->getOutputParametersAsArray();</code> | ||
+ | == engine/execute == | ||
+ | XML zur Ausführung mit der Methode [[:webservice:engine:execute|engine/execute]], z.B. per | ||
+ | curl --header 'Content-Type: application/xml' -X POST 'http://<partner>-<kunde>.dstore.de/default/engine/execute' -d '<xml-daten>' | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version="1.0" encoding="UTF-8"?> | ||
+ | <ListOfBatches> | ||
+ | <Batch No="0"> | ||
+ | <Procedure Name="co_GetCommunitySettings"> | ||
+ | <Parameters> | ||
+ | <!-- <Parameter Name="CommunityID">NULL</Parameter> --> | ||
+ | <!-- <Parameter Name="KeyVariable">NULL</Parameter> --> | ||
+ | <!-- <Parameter Name="ResultOnlyInOutputParam">0</Parameter> --> | ||
+ | </Parameters> | ||
+ | </Procedure> | ||
+ | </Batch> | ||
+ | </ListOfBatches></code> | ||