Beruflich Dokumente
Kultur Dokumente
3
TELECOM WEB SERVICES 3.4
FEMTO
ZONAL PRESENCE REST V1.0
DOCUMENT VERSION: 1.1
Copyright
2012
Aepona Limited,
Interpoint Building,
20-24 York Street,
Belfast BT15 1AQ
All rights reserved. This document or any part thereof may not, without the written consent of Aepona Limited, be
copied, reprinted or reproduced in any material form including but not limited to photocopying, transcribing,
transmitting or storing it in any medium or translating it into any language, in any form or by any means, be it
electronic, mechanical, xerographic, optical, magnetic or otherwise.
The information contained in this document is proprietary and confidential and all copyright, trademarks, trade names,
patents and other intellectual property rights in the documentation are the exclusive property of Aepona Limited unless
otherwise specified. The information (including but not limited to data, drawings, specification, documentation, software
listings, source or object code) shall not at any time be disclosed directly or indirectly to any third party without Aepona
Limiteds prior written consent.
The information contained herein is believed to be accurate and reliable. Aepona Limited accepts no responsibility for
its use by any means or in any way whatsoever. Aepona Limited shall not be liable for any expenses, costs by damage
that may result from the use of the information contained within this document. The information contained
herein is subject to change without notice.
Table of Contents
1
Authentication..................................................................................................................................5
Methods............................................................................................................................................5
3.1
URIs................................................................................................................................................6
Initiate Subscription to Zonal Presence Notifications.................................................................7
4.1.1
Request..............................................................................................................................7
4.1.2
Request Parameters..........................................................................................................7
4.1.3
Response...........................................................................................................................8
4.1.4
Response Parameters.......................................................................................................8
Request..............................................................................................................................9
5.1.2
5.1.3
Response...........................................................................................................................9
5.1.4
7.1.1
Request............................................................................................................................11
7.1.2
Request Parameters........................................................................................................11
7.1.3
Response.........................................................................................................................11
7.1.4
Response Parameters.....................................................................................................11
Request............................................................................................................................12
8.1.2
Request Parameters........................................................................................................12
8.1.3
Response.........................................................................................................................12
8.1.4
Response Parameters.....................................................................................................12
Request............................................................................................................................13
Page 3
10
11
12
13
14
9.1.2
Request Parameters........................................................................................................13
9.1.3
Response.........................................................................................................................13
9.1.4
Response Parameters.....................................................................................................14
Request............................................................................................................................14
10.1.2
Request Parameters........................................................................................................14
10.1.3
Response.........................................................................................................................14
10.1.4
Response Parameters.....................................................................................................15
Request............................................................................................................................16
11.1.2
Request Parameters........................................................................................................16
11.1.3
Response.........................................................................................................................16
11.1.4
Response Parameters.....................................................................................................17
Request............................................................................................................................17
12.1.2
Request Parameters........................................................................................................17
12.1.3
Response.........................................................................................................................17
12.1.4
Response Parameters.....................................................................................................18
Request............................................................................................................................18
13.1.2
Request Parameters........................................................................................................18
13.1.3
Response.........................................................................................................................18
13.1.4
Response Parameters.....................................................................................................19
Exceptions...................................................................................................................................20
14.2.1
Service Exceptions..........................................................................................................20
14.2.2
Policy Exceptions.............................................................................................................20
Page 4
The Zonal Presence interface allows a Web application to subscribe to notifications of when a mobile device
enters, exits or moves between access points within a zone. It can also query the status of users, access
points and zones.
When using this document you will also need to refer to the 'OneAPI V2.0 Common Information Guide' for
information on common data types.
Throughout this document, the examples may be shown WITHOUT URL encoding
for readability purposes.
Authentication
Methods
Zonal Presence may be accessed via a REST API. The following methods are available:
POST is used to initiate the subscription, DELETE is used to cancel the subscription and GET is used to
retrieve the status of users, access points and zones. PUT is not used. The URIs used in the Zonal Presence
API are as follows:
Page 5
3.1
URIs
Initiate the subscription to receive zonal presence notifications of users entering, existing or transferring
between access points within a zone
http://example.com/{api version}/zonalpresence/subscriptions/{zoneId}
example.com is replaced by the hostname of the OneAPI server you are accessing. api version indicates
the version of Zonal Presence you are accessing.
Representation formats the response content type for the Zonal Presence API is
application/JSON.
Page 6
This method allows the Web application to subscribe to zonal presence notifications.
4.1.1
Request
4.1.2
Request Parameters
Table 1: Subscribe to Zonal Presence Notifications Request Parameters
Parameter
Description
Optional
notifyURL
No
Yes
Default: XML
Yes
Page 7
Yes
4.1.3
Response
{
deliveryReceiptSubscription: {
callbackReference: {
notifyURL: http://www.yoururl.here/notification/,
callbackData: doSomething,
notificationFormat: XML
},
clientCorrelator: 12345,
resourceURL:http://example.com/1/zonalpresence/subscriptions/yumscoffee/12345
}
}
4.1.4
Response Parameters
A '201' resource indicates the subscription has been created at the URL in the Location header. '12345'
indicates the subscriptionID that will be used when cancelling the subscription.
Description
Optional
notifyURL
No
Yes
Default: XML
Yes
Page 8
Yes
No
This method allows the Web application to cancel the subscription to zonal presence notifications.
5.1.1
Request
5.1.2
Request Parameters
None
5.1.3
Response
5.1.4
Response Parameters
None
Page 9
userEvent: [
{
timestamp: 2011-02-01T12:00:00,
address: tel:+16131234567,
zoneEnter: {
currentAccessPoint: femto01
}
},
{
timestamp: 2011-02-01T12:00:00,
address: tel:+16131234000,
zoneExit: {
currentAccessPoint: femto02
}
},
{
timestamp: 2011-02-01T12:00:00,
address: tel:+16131235000,
zoneTransfer: {
currentAccessPoint: femto02,
previousAccessPoint: femto01
}
}
]
}
}
timestamp, zoneId, and at least one userEvent object, which is comprised of the following parameters:
Parameter
Description
Optional
timeStamp
No
address
No
Page 10
No
This method allows the Web application to query for all the zone identifiers it is authorized to use.
7.1.1
Request
7.1.2
Request Parameters
None
7.1.3
Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1024
Date: Thu 04, June 2009 02:51:59 GMT
{
zoneList: {
zone: [
{
zoneId: yumscoffee
},
{
zoneId: yumsmuseum
}
]
}
}
7.1.4
Response Parameters
The JSON response us an object named zoneList which may contain an object named zone, which in turn
contains at least one of the following:
Description
Optional
zoneId
No
Page 11
This method allows the Web application to query a zone for it's status and other relevant information.
8.1.1
Request
8.1.2
Request Parameters
8.1.3
Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1024
Date: Thu 04, June 2009 02:51:59 GMT
{
zoneStatus: {
zoneId: yumscoffee,
numberOfUsers: 36,
numberOfAccessPoints: 12,
numberOfUnserviceableAccessPoints: 1
}
}
}
8.1.4
Response Parameters
The JSON response us an object named zoneStatus which contains the following:
Description
Optional
zoneId
No
numberOfUsers
No
Page 12
No
nts
This method allows the Web application to query a named set of access point status.
9.1.1
Request
GET http://example.com/1/zonalpresence/queries/accessPointStatus?
zoneId=yumscoffee&accessPointId=femto01 HTTP/1.1
Host: example.com:80
Accept: application/json
9.1.2
Request Parameters
The zoneId and one or more accessPointId are passed as attributes in the HTTP request.
9.1.3
Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1024
Date: Thu 04, June 2009 02:51:59 GMT
{
accessPointStatusList: {
zoneId: yumscoffee,
accessPointStatus: [
{
accessPointId: femto01,
accessType: femto,
numberOfUsers: 16,
operationStatus: SERVICEABLE,
locationInfo: {
longitude: -79.630554,
latitude: 43.677223,
altitude: 100.0,
accuracy: 10.0
}
}
]
}
Page 13
No
9.1.4
Response Parameters
The JSON response us an object named accessPointStatus which contains the following:
Description
Optional
accessPointId
No
accessType
operationStatus
locationInfo
10
No
No
Yes
This method allows the Web application to query all access point status'.
10.1.1 Request
GET http://example.com/1/zonalpresence/queries/accessPointStatus?zoneId=yumscoffee
HTTP/1.1
Host: example.com:80
Accept: application/json
10.1.3 Response
HTTP/1.1 200 OK
Content-Type: application/json
Page 14
Content-Length: 1024
Date: Thu 04, June 2009 02:51:59 GMT
{
accessPointStatusList: {
zoneId: yumscoffee,
accessPointStatus: [
{
accessPointId: femto01,
accessType: femto,
numberOfUsers: 16,
operationStatus: SERVICEABLE,
locationInfo: {
longitude: -79.630554,
latitude: 43.677223,
altitude: 100.0,
accuracy: 10.0
}
},
{
accessPointId: femto02,
accessType: femto,
numberOfUsers: 13,
operationStatus: SERVICEABLE,
locationInfo: {
longitude: -80.630554,
latitude: 44.677223,
altitude: 40.0,
accuracy: 10.0
}
}
]
}
}
Description
Optional
accessPointId
No
accessType
Page 15
No
operationStatus
locationInfo
11
This method allows the Web application to query one or more user(s) within a zone.
11.1.1 Request
GET http://example.com/1/zonalpresence/queries/userStatus?
zoneId=yumscoffee&address=tel:+16131234000 HTTP/1.1
Host: example.com:80
Accept: application/json
11.1.3 Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1024
Date: Thu 04, June 2009 02:51:59 GMT
{
userStatusList: {
zoneId: yumscoffee,
userStatus: [
{
address: tel:+16131234000,
accessPointId : femto02
}
]
Page 16
No
Yes
}
}
Description
Optional
address
No
12
This method allows the Web application to query all the users on an access point.
12.1.1 Request
GET http://example.com/1/zonalpresence/queries/userStatus?
zoneId=yumscoffee&accessPointId=femto02 HTTP/1.1
Host: example.com:80
Accept: application/json
12.1.3 Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1024
Date: Thu 04, June 2009 02:51:59 GMT
{
userStatusList: {
zoneId: yumscoffee,
userStatus: [
{
address: tel:+16131234000,
accessPointId : femto02
Page 17
No
},
{
address: tel:+16131235000,
accessPointId : femto02
}
]
}
}
Description
Optional
address
No
13
No
This method allows the Web application to query all the users within a zone.
13.1.1 Request
GET http://example.com/1/zonalpresence/queries/userStatus?zoneId=yumscoffee HTTP/1.1
Host: example.com:80
Accept: application/json
13.1.3 Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1024
Date: Thu 04, June 2009 02:51:59 GMT
{
userStatusList: {
Page 18
zoneId: yumscoffee,
userStatus: [
{
address: tel:+16131234000,
accessPointId : femto02
},
{
address: tel:+16131235000,
accessPointId : femto02
},
{
address: tel:+16131234567,
accessPointId : femto01
}
]
}
}
Description
Optional
address
No
14
No
200 Success!
404 Not found: mistake in the host or path of the service URI
405 Method not supported: for example, you mistakenly used a HTTP GET instead of a POST
Page 19
500 The server encountered an unexpected condition. This could be incorrect authentication details
or limited user permission
503 Server busy and service unavailable. Please retry the request.
14.2
Exceptions
HTTP/1.1 400
Bad Request
Content-Type: application/json
Content-Length: 1234
Date: Thu, 04 Jun 2009 02:51:59 GMT
{"requestError": {
"serviceError": {
"messageId": "SVC0002",
"text": " Invalid input value for message part %1",
"variables": " tel:+16309700000"
}
}
This section lists the available error codes, the possible reasons why the exception may have occurred, and
possible solutions.
Explanation
Page 20
The above exception may be thrown to indicate a fault relating to a policy associated with the service. This
category can be used for implementation-specific errors such as:
Explanation
transactions
A white list is enforced and the number is not in the white list.
been exceeded
POL-017: Operation is not allowed
been exceeded. Check your SLA for the limit and re-submit
your request.
been exceeded
Page 21