Get the service document for the application connection. Retrieving the service document allows the client to discover the capabilities and locations of the available collections.
Perform an HTTP GET request at the following URL:
http[s]://<host:port>/[public/]odata/applications/{v1|latest}/{appid}
GET /odata/applications/v1/com.sap.myapp HTTP/1.1 Host: smpserver:8080 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.3 (java 1.5) Authorization: Basic REVWMDAwMTppbml0aWFs
HTTP response header:
HTTP/1.1 200 OK Content-Type: application/xml;charset=utf-8 Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: X-SMP-SESSID=97ts80gwhxkc;Path=/ Set-Cookie: X-SMP-APPCID=b6d50e93-bcaa-439d-9741-660a3cb56771 DataServiceVersion: 1.0 Date: Tue, 14 Aug 2012 21:28:55 GMT Transfer-Encoding: chunked
The HTTP response body is a service document that includes two collections named "Connections" and "Endpoints".
<?xml version='1.0' encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xml:base="http://host:port/appSettings/odata/v1/appid/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app"> <workspace> <atom:title>Default</atom:title> <collection href="Connections"> <atom:title>Connections</atom:title> <collection href="Endpoints"> <atom:title>Endpoints</atom:title> </collection> </workspace> </service>