Skip to content

Create Capabilities Upon Registration

Store the device's form factor and its capabilities when the device is registered.

Request for Registrations

URL: https://<mobile services host>/odata/applications/<service version>/<appID>/Connections

HTTP Method POST

Request Parameters:

Parameter Type Description
<appID> Mandatory ID that uniquely identifies an application
<service version> Mandatory v3 onwards

Request Example:

POST
http://localhost:8082/odata/applications/latest/TESTAPP81d1e7af59f84f78a342ead3ad2a22a4/Connections
 Content-Type: application/atom+xml Authorization: Basic
 UDE5NDA3MDMyNDU6U2VjcmV0MTI=

<?xml version='1.0' encoding='utf-8'?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<link
rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Capability"
type="application/atom+xml;type=feed" title="Capability">
<m:inline>
<feed>
<entry>
<content type="application/xml">
<m:properties>
<d:Category>push</d:Category>
<d:CapabilityName>purchaseOrder-display</d:CapabilityName>
</m:properties>
</content>
</entry>
</feed>
</m:inline>
</link>
<content type="application/xml">
<m:properties>
<d:FormFactor>smartphone</d:FormFactor>
<d:DeviceType>iPhone</d:DeviceType>
</m:properties>
</content>
</entry>

Response Example:

HTTP/1.1 201 Created set-cookie:
 X-SMP-SESSID=14DBBA390DC7598A482B567006E109332628AB966D86E3867553E86092957BF9;
 Path=/; HttpOnly set-cookie:
 JTENANTSESSIONID_hmtenant1=1Xurlcqv8KCcWVylL1T5UflsgqmyTg1L35zLjTnmEps%3D;
 Path=/; HttpOnly set-cookie:
 X-SUP-APPCID=bd985307-497d-417e-b6fc-08f089d503f7; Expires=Wed,
 11-Jul-2035 10:57:16 GMT; Path=/ set-cookie:
 X-SMP-APPCID=bd985307-497d-417e-b6fc-08f089d503f7; Expires=Wed,
 11-Jul-2035 10:57:16 GMT; Path=/ dataserviceversion: 1.0 date: Thu, 16
 Jul 2015 10:57:16 GMT location:
http://localhost:8082/odata/applications/latest/TESTAPP81d1e7af59f84f78a342ead3ad2a22a4/Connections('bd985307-497d-417e-b6fc-08f089d503f7')
 content-type: application/atom+xml;charset=utf-8 server: SAP

<entry
xml:base="http://localhost:8082/odata/applications/latest/TESTAPP81d1e7af59f84f78a342ead3ad2a22a4/"
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">
<id>http://localhost:8082/odata/applications/latest/TESTAPP81d1e7af59f84f78a342ead3ad2a22a4/Connections('bd985307-497d-417e-b6fc-08f089d503f7')</id>
<title type="text"/>
<updated>2015-07-16T10:57:16Z</updated>
<author>
<name/>
</author>
<link rel="edit" title="Connection" href="Connections('bd985307-497d-417e-b6fc-08f089d503f7')"/>
<link
rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Capability"
type="application/atom+xml;type=feed" title="Capability"
href="Connections('bd985307-497d-417e-b6fc-08f089d503f7')/Capability">
<m:inline/>
</link>
<link
rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/FeatureVectorPolicy"
type="application/atom+xml;type=feed" title="FeatureVectorPolicy"
href="Connections('bd985307-497d-417e-b6fc-08f089d503f7')/FeatureVectorPolicy">
<m:inline/>
</link>
<category term="applications.Connection"
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<content type="application/xml">
<m:properties>
<!-- [...] -->
<d:DeviceType>iPhone</d:DeviceType>
<!-- [...] -->
<d:FormFactor>smartphone</d:FormFactor>
</m:properties>
</content>
</entry>

Response for Registrations

Code Description
201 OK The application connection has been created.

Create Capabilities Upon Update

Update an existing application connection, using a POST method.

Usage

Update the form factor and capabilities when they are changed on the device (update app.connection).

Request for Update

URL: https://<mobile services host>/odata/applications/<service version>/<appId>/Connections(<registrationId>)

HTTP Method POST

Request Example:

POST
HTTP Post with a header: X-HTTP-METHOD:MERGE
/odata/applications/latest/<appId>/Connections(<registrationId>)

Response for Update

Code Description
200 OK The existing application connection has been updated.

Delete Capabilities

Delete an application capability, for example, a user may elect to remove the capability to receive an e-mail notification. The server is notified of this change to the application connection.

Request

URL: https://<mobile services host>/odata/applications/<service version>/<appId>/Capabilities(ApplicationConnectionId='<registrationID>',CapabilityName='<capability_name>',Category='<capability_category>')

HTTP Method DELETE

Request Parameters:

Parameter Type Description
<appId> Mandatory ID that uniquely identifies an application
registrationId Mandatory The connection ID of the application instance that is interacting with the service
<capability_name> Mandatory The capability name used in the application, such as "purchaseOrder-display".
<capability_category> Mandatory The capability category, such as "push".
<service version> Mandatory v3 onwards

Request Example:

DELETE http://localhost:8082/odata/applications/latest/TESTAPPea4a626ffccc4ef98dbf27da343132aa/Capabilities(ApplicationConnectionId='784b1fb8-4da5-4c87-a2b5-282bb4506253',CapabilityName='purchaseOrder-display',Category='push')
 Authorization: Basic UDE5NDA3MDMyNDU6U2VjcmV0MTI= X-SMP-APPCID: 784b1fb8-4da5-4c87-a2b5-282bb4506253

Response

Code Description
200 OK The capability was removed from the application connection.

Last update: August 12, 2020