Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Technische Voraussetzungen

Für die Verwendung der REST API wird ein Conigma Installation benötigt, welche mindestens ein SAP-System mit Basisrelease 7.50 oder höher beinhaltet. Dieses System muss für die Verwendung der API über HTTP oder HTTPS erreichbar sein.

Import

Sofern die REST API nicht bereits als Bestandteil der Conigma-Auslieferung zur Verfügung gestellt wurde, erfolgt diese als separates ZIP-Archiv. Dieses enthält neben den benötigten Transportaufträgen eine Datei namens „ReadMe_EN.txt“ mit Angaben zur den Auftragsnummern (TRKORRs) und Inhalten.

Übertragen Sie das Datafile und das Cofile in die entsprechenden Transportverzeichnisse und importieren Sie diese mit Hilfe der Transaktion STMS in den Hauptmandant des Systems, welches die Kommunikation mit dem Connect Server übernehmen soll.

Alle ausgelieferten Objekte liegen im Namensraum /GAL/ und untergliedern sich in verschiedene Pakete.

Weitere Informationen zum Import von Transportaufträgen und der Transaktion STMS finden Sie in der entsprechenden Dokumentation des Netweaver Application Servers.

Aktivierung des Webservices

Nach dem Import muss der nun verfügbare Service aktiviert werden. Rufen Sie hierfür die Transaktion SICF auf.

...

Technical requirements

To use the REST API, a Conigma installation is required, which contains at least one SAP system with base release 7.50 or higher. This system must be accessible via HTTP or HTTPS to use the API.

Import

If the REST API has not already been provided as part of the Conigma delivery, it will be provided as a separate ZIP archive. Besides the required transport requests, this archive contains a file named "ReadMe_EN.txt" with information about the request numbers (TRKORRs) and contents.

Transfer the datafile and the cofile to the appropriate transport directories and import them into the main client of the system (the client that is to take over communication with the connect server) using transaction STMS.

All delivered objects are using the namespace /GAL/ and are associated with different packages in the same namespace.

For more information about importing transport requests and transaction STMS, see the relevant Netweaver Application Server documentation.

Activation of the web service

After the import, the service needs to be activated. To do this, call transaction SICF.

...

Press F8 or click on "Run". Now navigate to the service /default_host/gal/Conigmaconigma/ccm/api/rest/1 und aktivieren Sie diesen über das Kontextmenü.

...

Bestätigen Sie die Aktivierung im folgenden Popup über die Schaltfläche „Ja“ bei der links ein Hierarchiesymbol angezeigt wird, um alle relevanten übergeordneten Services ebenfalls zu aktivieren.

...

 

 and activate it via the context menu.

...

Confirm the activation in the following popup by clicking the "Yes" button, where a hierarchy symbol is displayed on the left. This will also activate all required parent services.

...

Testing the web service

To test access to the REST API, select “Test Service” from the context menu of the ICF node /gal/conigma/ccm/api/rest/1.

...

Depending on the SAPgui configuration, a window with a security warning may appear as the SAPgui tries to open a browser window. Use the " Allow " button to continue.

...

A browser window then opens and prompts you for a valid SAP user and password. Ignore this prompt and click the "Cancel" button if necessary. Copy the URL from the browser and add the component "/ping" to the path (i.e. the part before the question mark). The URL should now match the following pattern: .../gal/conigma/ccm/api/rest/1/ping?sap-client=...

Copy the path to the clipboard and log on to the system which should access the API. The procedure for testing access to the REST API differs depending on the technical capabilities of the system.

Systeme mit GUI und Browser

Besitzt das entsprechende System einen GUI und einen Browser, öffnen Sie die oben kopierte URI im Browser. Daraufhin werden Sie aufgefordert, einen gültigen SAP-Benutzer und ein Passwort einzugeben. Geben Sie die geforderten Daten ein und bestätigen Sie Ihre Eingaben. Wird im Browser nun ein JSON-Dokument angezeigt, welches von der Struktur her folgendem Beispiel entspricht, so war der Test erfolgreich.

Code Block
languagejson
{
	"serverInfo": {
		"name": "sape70_E70_42",
		"host": "sape70",
		"serv": "sdp-id-port",
		"msgtypes": "BB",
		"hostadr": "C0A8C32A",
		"servno": "0CAA",
		"state": "01",
		"hostnamelong": "sape70",
		"hostaddrV4Str": "192.168.195.42",
		"hostaddrV6Str": "192.168.195.42",
		"sysservice0": "00",
		"sysservice1": "00",
		"sysservice2": "00",
		"sysservice3": "00"
	},
	"systemTime": "2022-08-10T09:19:41.625Z"
}

Linux-based systems without GUI

Enter the following command line and replace the values in the curly brackets with the desired values:

Code Block
languagebash
curl "{uri}" -u "{SAP user}:{password of the SAP user}"

If the output is a JSON document with the following structure, the test was successful.

Code Block
languagejson
{
	"serverInfo": {
		"name": "sape70_E70_42",
		"host": "sape70",
		"serv": "sdp-id-port",
		"msgtypes": "BB",
		"hostadr": "C0A8C32A",
		"servno": "0CAA",
		"state": "01",
		"hostnamelong": "sape70",
		"hostaddrV4Str": "192.168.195.42",
		"hostaddrV6Str": "192.168.195.42",
		"sysservice0": "00",
		"sysservice1": "00",
		"sysservice2": "00",
		"sysservice3": "00"
	},
	"systemTime": "2022-08-10T09:19:41.625Z"
}

Windows based systems without GUI with .NET Core based PowerShell (version 7 or newer)

Enter the following command line in a PowerShell and replace the values in the curly brackets with the desired values:

Code Block
languagepowershell
Invoke-WebRequest -Uri "{uri}" -Authentication Basic -Credential (Get-Credential) -AllowUnencryptedAuthentication

You are now prompted to enter a valid SAP user and password.

If the output is a JSON document with the following structure, the test was successful.

Code Block
languagejson
{
	"serverInfo": {
		"name": "sape70_E70_42",
		"host": "sape70",
		"serv": "sdp-id-port",
		"msgtypes": "BB",
		"hostadr": "C0A8C32A",
		"servno": "0CAA",
		"state": "01",
		"hostnamelong": "sape70",
		"hostaddrV4Str": "192.168.195.42",
		"hostaddrV6Str": "192.168.195.42",
		"sysservice0": "00",
		"sysservice1": "00",
		"sysservice2": "00",
		"sysservice3": "00"
	},
	"systemTime": "2022-08-10T09:19:41.625Z"
}

Windows basierte Systeme ohne GUI mit klassischer PowerShell

Enter the following command line in a PowerShell and replace the values in the curly brackets with the desired values:

Code Block
languagepowershell
$user = "{SAP user}"
$password = ConvertTo-SecureString -String "{Password of the SAP user}" -AsPlainText -Force
$credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $user, $password
Invoke-WebRequest -Uri "{uri}" -Credential $credentials

If there is an output with the value 200 in the "StatusCode" field and a JSON document in the "Content" field, the test was successful.

Code Block
languagejson
StatusCode        : 200
StatusDescription : OK
Content           : {
                        "serverInfo": {
                                "name": "sape70_E70_42",
                                "host": "sape70",
                                "serv": "sdp-id-port",
                                "msgtypes": "BB",
                                "hostadr": "C0A8C32A",
                                "servno": "0CAA",
                                "state": "01",
                                "hostnamelong": "sape70",...
RawContent        : HTTP/1.1 200 OK
                    sap-server: true
                    sap-perf-fesrec: 52050.000000
                    Content-Length: 414
                    Content-Type: application/json; charset=utf-8
                    Set-Cookie: SAP_SESSIONID_E70_100=xac1X0ln2BqbYTIGRKQc-c7DbEIYkRHt...
Forms             : {}
Headers           : {[sap-server, true], [sap-perf-fesrec, 52050.000000], [Content-Length, 414], [Content-Type,
                    application/json; charset=utf-8]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 414