Versions Compared

Key

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

...

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