Create Application Connection

Create an application connection and initially set the application connection settings. Because all application connection settings are optional, the minimal body contains no properties at all. Sybase Unwired Platform populates default values as needed.

Syntax

Perform an HTTP POST request at the following URL:

http://host:port/[public/]/odata/applications/{v1|latest}/{appid}/Connections

Parameters

  • appid – The application ID that uniquely identifies the application.

Returns

If successful, a 201 Created status code is returned, and the new application connection settings are included in the response body.

Examples

  • Create application connection – Example HTTP request header:
    POST /odata/applications/v1/com.sap.myapp/Connections HTTP/1.1
    Content-Length: 4704
    Content-Type: application/atom+xml; charset=UTF-8
    Host: supserver:8000
    Connection: Keep-Alive
    User-Agent: Apache-HttpClient/4.1.3 (java 1.5)
    Authorization: Basic REVWMDAwMTppbml0aWFs
    

    Example HTTP response header:

    HTTP/1.1 201 Created
    Content-Type: application/atom+xml;charset=utf-8
    Expires: Thu, 01 Jan 1970 00:00:00 GMT
    Set-Cookie: X-SUP-SESSID=97ts80gwhxkc;Path=/
    Set-Cookie: X-SUP-APPCID=b6d50e93-bcaa-439d-9741-660a3cb56771
    Location: http:/supserver:8000/applications/Connections('b6d50e93-bcaa-439d-9741-660a3cb56771')
    DataServiceVersion: 1.0
    Date: Mon, 13 Aug 2012 22:40:50 GMT
    Transfer-Encoding: chunked

    Minimal body:

    <?xml version="1.0" encoding="UTF-8"?>
    <entry xml:base="http://localhost:8000/public/odata/applications/v1/com.sap.myapp/"
    xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
    xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
      <content type="application/xml">
        <m:properties>
        </m:properties>
      </content>
    </entry>