Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "OM2M/Application"
< OM2M
(→Application Create) |
|||
(25 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
| Name || Type || Multiplicity || Create || Update ||Response | | Name || Type || Multiplicity || Create || Update ||Response | ||
|- | |- | ||
− | | [[OM2M/Attributes#appID|appId]] || | + | | [[OM2M/Attributes#appID|appId]] || NMTOKEN || 1 || O || NP || M |
|- | |- | ||
− | | [[OM2M/Attributes#AccessRightID|accessRightID]] || | + | | [[OM2M/Attributes#AccessRightID|accessRightID]] || AnyURI || 0..1 || O || O || O |
|- | |- | ||
− | | [[OM2M/Attributes#CreationTime|creationTime]] || | + | | [[OM2M/Attributes#CreationTime|creationTime]] || DateTime || 1 || NP || NP || M |
|- | |- | ||
− | | [[OM2M/Attributes#LastModifiedTime|lastModifiedTime]] || | + | | [[OM2M/Attributes#LastModifiedTime|lastModifiedTime]] || DateTime || 1 || NP || NP || M |
|- | |- | ||
− | | [[OM2M/Attributes#ExpirationTime|expirationTime]] || | + | | [[OM2M/Attributes#ExpirationTime|expirationTime]] || DateTime || 1 || O || O || M* |
|- | |- | ||
| [[OM2M/Attributes#SearchStrings|searchStrings]] || searchStrings || 1 || O || O || M | | [[OM2M/Attributes#SearchStrings|searchStrings]] || searchStrings || 1 || O || O || M | ||
|- | |- | ||
− | | [[OM2M/Attributes#AnnounceTo|announceTo]] || | + | | [[OM2M/Attributes#AnnounceTo|announceTo]] || AnnounceTo || 0..unbounded || O || O || M* |
|- | |- | ||
− | | [[OM2M/Attributes#APoC|aPoC]] || | + | | [[OM2M/Attributes#APoC|aPoC]] || AnyURI || 0..1 || O || O || O |
|- | |- | ||
− | | [[OM2M/Attributes#APocPaths|aPoCPaths]] || | + | | [[OM2M/Attributes#APocPaths|aPoCPaths]] || aPocPaths || 0..1 || O || O || O |
|- | |- | ||
− | | [[OM2M/Attributes#Iocrequester|Iocrequester]] || || 0..1 || O || O || O | + | | [[OM2M/Attributes#Iocrequester|Iocrequester]] || String || 0..1 || O || O || O |
|- | |- | ||
− | | containersReference || | + | | containersReference || AnyURI || 1 || NP || NP || M |
|- | |- | ||
− | | groupsReference || | + | | groupsReference || AnyURI || 1 || NP || NP || M |
|- | |- | ||
− | | accessRightsReference || | + | | accessRightsReference || NamedReferencecollection || 1 || NP || NP || M |
|- | |- | ||
− | | subscriptionsReference || | + | | subscriptionsReference || AnyURI || 1 || NP || NP || M |
|- | |- | ||
− | | notificationChannelsReference || | + | | notificationChannelsReference || AnyURI || 1 || NP || NP || M |
|} | |} | ||
− | + | == Application XSD schema == | |
− | == Application | + | |
<source lang="xml"> | <source lang="xml"> | ||
Line 94: | Line 93: | ||
</source> | </source> | ||
− | + | == Create Application == | |
− | == Application | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
'''Example Request''' | '''Example Request''' | ||
Line 114: | Line 102: | ||
Authorization: Basic xxxxxxxxxxxxxxxxxxx | Authorization: Basic xxxxxxxxxxxxxxxxxxx | ||
Body: | Body: | ||
− | <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" appId=" | + | <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" appId="app-Id"> |
<om2m:searchStrings> | <om2m:searchStrings> | ||
<om2m:searchString>Type/sensor</om2m:searchString> | <om2m:searchString>Type/sensor</om2m:searchString> | ||
Line 131: | Line 119: | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<om2m:application xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" appId="MY_SENSOR"> | <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" appId="MY_SENSOR"> | ||
− | <om2m:accessRightID> | + | <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID> |
<om2m:searchStrings> | <om2m:searchStrings> | ||
<om2m:searchString>Type/sensor</om2m:searchString> | <om2m:searchString>Type/sensor</om2m:searchString> | ||
Line 144: | Line 132: | ||
<om2m:global>false</om2m:global> | <om2m:global>false</om2m:global> | ||
</om2m:announceTo> | </om2m:announceTo> | ||
− | <om2m:containersReference> | + | <om2m:containersReference>scl-id/applications/app-Id/containers</om2m:containersReference> |
− | <om2m:groupsReference> | + | <om2m:groupsReference>scl-id/applications/app-Id/groups</om2m:groupsReference> |
− | <om2m:accessRightsReference> | + | <om2m:accessRightsReference>scl-id/applications/app-Id/accessRights</om2m:accessRightsReference> |
− | <om2m:subscriptionsReference> | + | <om2m:subscriptionsReference>scl-id/applications/app-Id/subscriptions</om2m:subscriptionsReference> |
− | <om2m: | + | <om2m:notificationChannelsReference>scl-id/applications/app-Id/notificationChannels</om2m:notificationChannelsReference> |
+ | </om2m:application> | ||
</pre> | </pre> | ||
− | == | + | == Retrieve Application == |
− | ''' | + | '''Example Request''' |
− | + | <pre> | |
− | + | GET /scl-id/applications/app-Id | |
− | + | Host: om2m.laas.fr | |
− | + | Authorization: Basic xxxxxxxxxxxxxxxxxxx | |
− | + | </pre> | |
− | + | ||
+ | '''Example Response''' | ||
+ | |||
+ | <pre> | ||
+ | HTTP/1.1 200 OK | ||
+ | Content-Type: text/xml | ||
+ | |||
+ | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
+ | <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" appId="app-Id"> | ||
+ | <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID> | ||
+ | <om2m:searchStrings> | ||
+ | <om2m:searchString>Type/sensor</om2m:searchString> | ||
+ | <om2m:searchString>Category/temperature</om2m:searchString> | ||
+ | <om2m:searchString>Location/Home</om2m:searchString> | ||
+ | </om2m:searchStrings> | ||
+ | <om2m:expirationTime>2045-12-23T16:15:11.981+01:00</om2m:expirationTime> | ||
+ | <om2m:creationTime>2014-04-16T15:28:32.981+02:00</om2m:creationTime> | ||
+ | <om2m:lastModifiedTime>2014-04-16T15:28:32.981+02:00</om2m:lastModifiedTime> | ||
+ | <om2m:announceTo> | ||
+ | <om2m:activated>false</om2m:activated> | ||
+ | <om2m:global>false</om2m:global> | ||
+ | </om2m:announceTo> | ||
+ | <om2m:containersReference>scl-id/applications/app-Id/containers</om2m:containersReference> | ||
+ | <om2m:groupsReference>scl-id/applications/app-Id/groups</om2m:groupsReference> | ||
+ | <om2m:accessRightsReference>scl-id/applications/app-Id/accessRights</om2m:accessRightsReference> | ||
+ | <om2m:subscriptionsReference>scl-id/applications/app-Id/subscriptions</om2m:subscriptionsReference> | ||
+ | <om2m:notificationChannelsReference>scl-id/applications/app-Id/notificationChannels</om2m:notificationChannelsReference> | ||
+ | </om2m:application> | ||
+ | </pre> | ||
+ | |||
+ | == Update Application == | ||
'''Example Request''' | '''Example Request''' | ||
<pre> | <pre> | ||
− | + | PUT /scl-id/applications/app-Id | |
Host: om2m.laas.fr | Host: om2m.laas.fr | ||
Authorization: Basic xxxxxxxxxxxxxxxxxxx | Authorization: Basic xxxxxxxxxxxxxxxxxxx | ||
+ | Body: | ||
+ | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
+ | <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" > | ||
+ | <om2m:accessRightID>gscl/accessRights/AR_ADMIN</om2m:accessRightID> | ||
+ | <om2m:searchStrings> | ||
+ | <om2m:searchString>Type/sensor</om2m:searchString> | ||
+ | <om2m:searchString>Category/temperature</om2m:searchString> | ||
+ | <om2m:searchString>Location/Home</om2m:searchString> | ||
+ | <om2m:searchString>Unit/Celsus</om2m:searchString> | ||
+ | </om2m:searchStrings> | ||
+ | </om2m:application> | ||
</pre> | </pre> | ||
Line 177: | Line 207: | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
− | <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" appId=" | + | <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" appId="app-Id"> |
<om2m:accessRightID>gscl/accessRights/AR_ADMIN</om2m:accessRightID> | <om2m:accessRightID>gscl/accessRights/AR_ADMIN</om2m:accessRightID> | ||
<om2m:searchStrings> | <om2m:searchStrings> | ||
Line 183: | Line 213: | ||
<om2m:searchString>Category/temperature</om2m:searchString> | <om2m:searchString>Category/temperature</om2m:searchString> | ||
<om2m:searchString>Location/Home</om2m:searchString> | <om2m:searchString>Location/Home</om2m:searchString> | ||
+ | <om2m:searchString>Unit/Celsus</om2m:searchString> | ||
</om2m:searchStrings> | </om2m:searchStrings> | ||
<om2m:expirationTime>2045-12-23T16:15:11.981+01:00</om2m:expirationTime> | <om2m:expirationTime>2045-12-23T16:15:11.981+01:00</om2m:expirationTime> | ||
<om2m:creationTime>2014-04-16T15:28:32.981+02:00</om2m:creationTime> | <om2m:creationTime>2014-04-16T15:28:32.981+02:00</om2m:creationTime> | ||
− | <om2m:lastModifiedTime>2014-04- | + | <om2m:lastModifiedTime>2014-04-16T16:44:33.180+02:00</om2m:lastModifiedTime> |
<om2m:announceTo> | <om2m:announceTo> | ||
<om2m:activated>false</om2m:activated> | <om2m:activated>false</om2m:activated> | ||
<om2m:global>false</om2m:global> | <om2m:global>false</om2m:global> | ||
</om2m:announceTo> | </om2m:announceTo> | ||
− | <om2m:containersReference> | + | <om2m:containersReference>scl-id/applications/app-Id/containers</om2m:containersReference> |
− | <om2m:groupsReference> | + | <om2m:groupsReference>scl-id/applications/app-Id/groups</om2m:groupsReference> |
− | <om2m:accessRightsReference> | + | <om2m:accessRightsReference>scl-id/applications/app-Id/accessRights</om2m:accessRightsReference> |
− | <om2m:subscriptionsReference> | + | <om2m:subscriptionsReference>scl-id/applications/app-Id/subscriptions</om2m:subscriptionsReference> |
− | <om2m:notificationChannelsReference> | + | <om2m:notificationChannelsReference>scl-id/applications/app-Id/notificationChannels</om2m:notificationChannelsReference> |
</om2m:application> | </om2m:application> | ||
</pre> | </pre> | ||
− | == | + | == Delete Application == |
− | + | '''Example Request''' | |
+ | |||
+ | <pre> | ||
+ | DELETE /scl-id/applications/app-Id | ||
+ | Host: om2m.laas.fr | ||
+ | Authorization: Basic xxxxxxxxxxxxxxxxxxx | ||
+ | </pre> | ||
+ | |||
+ | '''Example Response''' | ||
+ | |||
+ | <pre> | ||
+ | HTTP/1.1 204 No Content | ||
+ | </pre> |
Latest revision as of 04:38, 20 May 2014
Contents
Application resource
This resource represents a registered application.
Name | Type | Multiplicity | Create | Update | Response |
appId | NMTOKEN | 1 | O | NP | M |
accessRightID | AnyURI | 0..1 | O | O | O |
creationTime | DateTime | 1 | NP | NP | M |
lastModifiedTime | DateTime | 1 | NP | NP | M |
expirationTime | DateTime | 1 | O | O | M* |
searchStrings | searchStrings | 1 | O | O | M |
announceTo | AnnounceTo | 0..unbounded | O | O | M* |
aPoC | AnyURI | 0..1 | O | O | O |
aPoCPaths | aPocPaths | 0..1 | O | O | O |
Iocrequester | String | 0..1 | O | O | O |
containersReference | AnyURI | 1 | NP | NP | M |
groupsReference | AnyURI | 1 | NP | NP | M |
accessRightsReference | NamedReferencecollection | 1 | NP | NP | M |
subscriptionsReference | AnyURI | 1 | NP | NP | M |
notificationChannelsReference | AnyURI | 1 | NP | NP | M |
Application XSD schema
<?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://uri.etsi.org/m2m" xmlns:tns="http://uri.etsi.org/m2m"> <include schemaLocation="common.xsd" /> <element name="application" type="tns:Application" /> <complexType name="Application"> <all> <element ref="tns:expirationTime" minOccurs="0" /> <element ref="tns:accessRightID" minOccurs="0" /> <element ref="tns:searchStrings" minOccurs="0" /> <element ref="tns:creationTime" minOccurs="0" /> <element ref="tns:lastModifiedTime" minOccurs="0" /> <element ref="tns:announceTo" minOccurs="0" /> <element ref="tns:aPoC" minOccurs="0" /> <element ref="tns:aPoCPaths" minOccurs="0" /> <element ref="tns:locRequestor" minOccurs="0" /> <!-- subresources --> <element ref="tns:containersReference" minOccurs="0" /> <element ref="tns:groupsReference" minOccurs="0" /> <element ref="tns:accessRightsReference" minOccurs="0" /> <element ref="tns:subscriptionsReference" minOccurs="0" /> <element ref="tns:notificationChannelsReference" minOccurs="0" /> </all> <attribute name="appId" type="anyURI"/> </complexType> <element name="applicationStatus" type="tns:ApplicationStatus" /> <element name="aPoC" type="anyURI" /> <element name="aPoCPaths" type="tns:APoCPaths" /> <element name="locRequestor" type="anySimpleType" /> <simpleType name="ApplicationStatus"> <restriction base="string"> <enumeration value="ONLINE"></enumeration> <enumeration value="OFFLINE"></enumeration> <enumeration value="NOT_REACHABLE"></enumeration> </restriction> </simpleType> <complexType name="APoCPaths"> <sequence> <element ref="tns:aPoCPath" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element name="aPoCPath" type="tns:APoCPath" /> <complexType name="APoCPath"> <all> <element ref="tns:path"/> <element ref="tns:accessRightID" minOccurs="0" /> <element ref="tns:searchStrings" minOccurs="0" /> </all> </complexType> <element name="path" type="anyURI" /> </schema>
Create Application
Example Request
POST /scl-id/applications Host: om2m.laas.fr Authorization: Basic xxxxxxxxxxxxxxxxxxx Body: <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" appId="app-Id"> <om2m:searchStrings> <om2m:searchString>Type/sensor</om2m:searchString> <om2m:searchString>Category/temperature</om2m:searchString> <om2m:searchString>Location/Home</om2m:searchString> </om2m:searchStrings> </om2m:application>
Example Response
HTTP/1.1 201 Created Content-Type: text/xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" appId="MY_SENSOR"> <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID> <om2m:searchStrings> <om2m:searchString>Type/sensor</om2m:searchString> <om2m:searchString>Category/temperature</om2m:searchString> <om2m:searchString>Location/Home</om2m:searchString> </om2m:searchStrings> <om2m:expirationTime>2045-12-23T16:15:11.981+01:00</om2m:expirationTime> <om2m:creationTime>2014-04-16T15:28:32.981+02:00</om2m:creationTime> <om2m:lastModifiedTime>2014-04-16T15:28:32.981+02:00</om2m:lastModifiedTime> <om2m:announceTo> <om2m:activated>false</om2m:activated> <om2m:global>false</om2m:global> </om2m:announceTo> <om2m:containersReference>scl-id/applications/app-Id/containers</om2m:containersReference> <om2m:groupsReference>scl-id/applications/app-Id/groups</om2m:groupsReference> <om2m:accessRightsReference>scl-id/applications/app-Id/accessRights</om2m:accessRightsReference> <om2m:subscriptionsReference>scl-id/applications/app-Id/subscriptions</om2m:subscriptionsReference> <om2m:notificationChannelsReference>scl-id/applications/app-Id/notificationChannels</om2m:notificationChannelsReference> </om2m:application>
Retrieve Application
Example Request
GET /scl-id/applications/app-Id Host: om2m.laas.fr Authorization: Basic xxxxxxxxxxxxxxxxxxx
Example Response
HTTP/1.1 200 OK Content-Type: text/xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" appId="app-Id"> <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID> <om2m:searchStrings> <om2m:searchString>Type/sensor</om2m:searchString> <om2m:searchString>Category/temperature</om2m:searchString> <om2m:searchString>Location/Home</om2m:searchString> </om2m:searchStrings> <om2m:expirationTime>2045-12-23T16:15:11.981+01:00</om2m:expirationTime> <om2m:creationTime>2014-04-16T15:28:32.981+02:00</om2m:creationTime> <om2m:lastModifiedTime>2014-04-16T15:28:32.981+02:00</om2m:lastModifiedTime> <om2m:announceTo> <om2m:activated>false</om2m:activated> <om2m:global>false</om2m:global> </om2m:announceTo> <om2m:containersReference>scl-id/applications/app-Id/containers</om2m:containersReference> <om2m:groupsReference>scl-id/applications/app-Id/groups</om2m:groupsReference> <om2m:accessRightsReference>scl-id/applications/app-Id/accessRights</om2m:accessRightsReference> <om2m:subscriptionsReference>scl-id/applications/app-Id/subscriptions</om2m:subscriptionsReference> <om2m:notificationChannelsReference>scl-id/applications/app-Id/notificationChannels</om2m:notificationChannelsReference> </om2m:application>
Update Application
Example Request
PUT /scl-id/applications/app-Id Host: om2m.laas.fr Authorization: Basic xxxxxxxxxxxxxxxxxxx Body: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" > <om2m:accessRightID>gscl/accessRights/AR_ADMIN</om2m:accessRightID> <om2m:searchStrings> <om2m:searchString>Type/sensor</om2m:searchString> <om2m:searchString>Category/temperature</om2m:searchString> <om2m:searchString>Location/Home</om2m:searchString> <om2m:searchString>Unit/Celsus</om2m:searchString> </om2m:searchStrings> </om2m:application>
Example Response
HTTP/1.1 200 OK Content-Type: text/xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <om2m:application xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" appId="app-Id"> <om2m:accessRightID>gscl/accessRights/AR_ADMIN</om2m:accessRightID> <om2m:searchStrings> <om2m:searchString>Type/sensor</om2m:searchString> <om2m:searchString>Category/temperature</om2m:searchString> <om2m:searchString>Location/Home</om2m:searchString> <om2m:searchString>Unit/Celsus</om2m:searchString> </om2m:searchStrings> <om2m:expirationTime>2045-12-23T16:15:11.981+01:00</om2m:expirationTime> <om2m:creationTime>2014-04-16T15:28:32.981+02:00</om2m:creationTime> <om2m:lastModifiedTime>2014-04-16T16:44:33.180+02:00</om2m:lastModifiedTime> <om2m:announceTo> <om2m:activated>false</om2m:activated> <om2m:global>false</om2m:global> </om2m:announceTo> <om2m:containersReference>scl-id/applications/app-Id/containers</om2m:containersReference> <om2m:groupsReference>scl-id/applications/app-Id/groups</om2m:groupsReference> <om2m:accessRightsReference>scl-id/applications/app-Id/accessRights</om2m:accessRightsReference> <om2m:subscriptionsReference>scl-id/applications/app-Id/subscriptions</om2m:subscriptionsReference> <om2m:notificationChannelsReference>scl-id/applications/app-Id/notificationChannels</om2m:notificationChannelsReference> </om2m:application>
Delete Application
Example Request
DELETE /scl-id/applications/app-Id Host: om2m.laas.fr Authorization: Basic xxxxxxxxxxxxxxxxxxx
Example Response
HTTP/1.1 204 No Content