Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "OM2M/Groups"

(Retrieve Groups)
(Groups resource)
 
(18 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
== Groups resource ==
 
== Groups resource ==
  
The Groups resource is a collection of [[OM2M/Group | group]] resources and/or [[OM2M/GroupAnnc | groupAnnc]] resources. The following combinations are possible:
+
The groups resource is a collection of group resources and/or groupAnnc resources. It can reside in the following targets:
* <[[OM2M/SclBase | sclBase]]>/[[OM2M/Groups | groups]]: contains only local [[OM2M/Group | group]] resource.
+
* <sclBase>/groups: contains only local group resources.
* <[[OM2M/SclBase | sclBase]]>/[[OM2M/Scls | scls]]/<[[OM2M/Scl | scl]]>/[[OM2M/Groups | groups]]: contains [[OM2M/GroupAnnc | groupAnnc]] resource announced by the remote <[[OM2M/Scl | scl]]>.
+
* <sclBase>/scls/<scl>/groups: contains groupAnnc resource announced by a group resource in the remote <scl>.
* <[[OM2M/SclBase | sclBase]]>/[[OM2M/Applications | applications]]/<[[OM2M/Application | app]]>/[[OM2M/Groups | groups]]: contains only [[OM2M/Group | group]] resource created by the application corresponding to <[[OM2M/Application | app]]>.
+
* <sclBase>/applications/<app>/groups: contains only group resource created by the application corresponding to <app>.
* <[[OM2M/SclBase | sclBase]]>/[[OM2M/Scls | scls]]/<[[OM2M/Scl | scl]]>/[[OM2M/Applications | applications]]/<[[OM2M/ApplicationAnnc | applicationAnnc]]>/[[OM2M/Groups | groups]]: contains only [[OM2M/GroupAnnc | groupAnnc]] resource, representing the announcement of a [[OM2M/Group | group]] residing in the remote <[[OM2M/Scl | scl]]>.
+
* <sclBase>/scls/<scl>/applications/<applicationAnnc>/groups: contains only groupAnnc resource representing the announcement of a group resource residing in the remote <scl>.
  
 
{{CTable}}
 
{{CTable}}
Line 25: Line 25:
 
|}
 
|}
  
== Groups representation ==
+
== Groups XSD schema  ==
  
 
<source lang="xml">
 
<source lang="xml">
Line 49: Line 49:
  
 
== Create Groups ==
 
== Create Groups ==
 
+
This resource shall not be created via the API, it is created as a part of the parent resource.
The groups resource shall no be created via the API, it is created as a part of the parent resource.
+
  
 
== Retrieve Groups ==
 
== Retrieve Groups ==
 
'''Retrieve information about accessible resources'''
 
 
* Synopsis: GET {Well Known URI of the Service}
 
* Request Headers: Authorization, Accept.
 
* Request Body: N/A.
 
* Response Headers: Content-Type, Content-Length.
 
* Response Message Body: Groups.
 
* Response Status: 200, 402, 404, 501.
 
  
 
'''Example Request'''
 
'''Example Request'''
Line 79: Line 69:
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 
<om2m:groups xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
 
<om2m:groups 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:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID>
 
     <om2m:creationTime>2014-04-14T22:03:50.667+02:00</om2m:creationTime>
 
     <om2m:creationTime>2014-04-14T22:03:50.667+02:00</om2m:creationTime>
 
     <om2m:lastModifiedTime>2014-04-14T22:03:50.686+02:00</om2m:lastModifiedTime>
 
     <om2m:lastModifiedTime>2014-04-14T22:03:50.686+02:00</om2m:lastModifiedTime>
 
     <om2m:groupCollection>
 
     <om2m:groupCollection>
         <om2m:namedReference id="GROUP_ON">gscl/groups/GROUP_ON</om2m:namedReference>
+
         <om2m:namedReference id="GROUP_ON">scl-id/groups/GROUP_ON</om2m:namedReference>
         <om2m:namedReference id="GROUP_OFF">gscl/groups/GROUP_OFF</om2m:namedReference>
+
         <om2m:namedReference id="GROUP_OFF">scl-id/groups/GROUP_OFF</om2m:namedReference>
 
     </om2m:groupCollection>
 
     </om2m:groupCollection>
 
     <om2m:groupAnncCollection/>
 
     <om2m:groupAnncCollection/>
     <om2m:subscriptionsReference>gscl/groups/subscriptions</om2m:subscriptionsReference>
+
     <om2m:subscriptionsReference>scl-id/groups/subscriptions</om2m:subscriptionsReference>
 
</om2m:groups>
 
</om2m:groups>
 
</pre>
 
</pre>
  
 
== Update Groups ==
 
== Update Groups ==
 +
 +
'''Example Request'''
 +
 +
<pre>
 +
PUT /scl-id/groups
 +
Host: om2m.laas.fr
 +
Authorization: Basic xxxxxxxxxxxxxxxxxxx
 +
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<om2m:groups xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
 +
    <om2m:accessRightID>scl-id/accessRights/AR_ADMIN_2</om2m:accessRightID>
 +
</om2m:groups>
 +
</pre>
 +
 +
'''Example Response'''
 +
 +
<pre>
 +
HTTP/1.1 200 OK
 +
Content-Type: text/xml
 +
 +
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 +
<om2m:groups xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
 +
    <om2m:accessRightID>scl-id/accessRights/AR_ADMIN_2</om2m:accessRightID>
 +
    <om2m:creationTime>2014-04-14T22:03:50.667+02:00</om2m:creationTime>
 +
    <om2m:lastModifiedTime>2014-04-14T22:04:36.627+02:00</om2m:lastModifiedTime>
 +
    <om2m:groupCollection>
 +
        <om2m:namedReference id="GROUP_ON">scl-id/groups/GROUP_ON</om2m:namedReference>
 +
        <om2m:namedReference id="GROUP_OFF">scl-id/groups/GROUP_OFF</om2m:namedReference>
 +
    </om2m:groupCollection>
 +
    <om2m:groupAnncCollection/>
 +
    <om2m:subscriptionsReference>scl-id/groups/subscriptions</om2m:subscriptionsReference>
 +
</om2m:groups>
 +
</pre>
  
 
== Delete Groups ==
 
== Delete Groups ==
 +
 +
This resource shall not be deleted via the API. It is deleted when the parent resource is deleted.

Latest revision as of 05:03, 20 May 2014

Groups resource

The groups resource is a collection of group resources and/or groupAnnc resources. It can reside in the following targets:

  • <sclBase>/groups: contains only local group resources.
  • <sclBase>/scls/<scl>/groups: contains groupAnnc resource announced by a group resource in the remote <scl>.
  • <sclBase>/applications/<app>/groups: contains only group resource created by the application corresponding to <app>.
  • <sclBase>/scls/<scl>/applications/<applicationAnnc>/groups: contains only groupAnnc resource representing the announcement of a group resource residing in the remote <scl>.


Attribute Name Type Multiplicity Create Update Response
groupCollection NamedReferenceCollection 0..unbounded N/A NP M
groupAnncCollection NamedReferenceCollection 0..unbounded N/A NP M
subscriptionReference AnyURI 1 N/A NP M
accessRightID AnyURI 0..1 N/A O O
creationTime DateTime 1 N/A NP M
lastModifiedTime DateTime 1 N/A NP M

Groups 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="groups" type="tns:Groups" />
  <complexType name="Groups">
    <all>
      <element ref="tns:accessRightID" minOccurs="0"/>
      <element ref="tns:creationTime" minOccurs="0"/>
      <element ref="tns:lastModifiedTime" minOccurs="0"/>
      <!-- subresources -->
      <element ref="tns:groupCollection" minOccurs="0" />
      <element ref="tns:groupAnncCollection" minOccurs="0" />
      <element ref="tns:subscriptionsReference" minOccurs="0"/>
    </all>
  </complexType>
  <element name="groupCollection" type="tns:NamedReferenceCollection" />
  <element name="groupAnncCollection" type="tns:NamedReferenceCollection" />
</schema>

Create Groups

This resource shall not be created via the API, it is created as a part of the parent resource.

Retrieve Groups

Example Request

GET /scl-id/groups
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:groups xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
    <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID>
    <om2m:creationTime>2014-04-14T22:03:50.667+02:00</om2m:creationTime>
    <om2m:lastModifiedTime>2014-04-14T22:03:50.686+02:00</om2m:lastModifiedTime>
    <om2m:groupCollection>
        <om2m:namedReference id="GROUP_ON">scl-id/groups/GROUP_ON</om2m:namedReference>
        <om2m:namedReference id="GROUP_OFF">scl-id/groups/GROUP_OFF</om2m:namedReference>
    </om2m:groupCollection>
    <om2m:groupAnncCollection/>
    <om2m:subscriptionsReference>scl-id/groups/subscriptions</om2m:subscriptionsReference>
</om2m:groups>

Update Groups

Example Request

PUT /scl-id/groups
Host: om2m.laas.fr
Authorization: Basic xxxxxxxxxxxxxxxxxxx

<?xml version="1.0" encoding="UTF-8"?>
<om2m:groups xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
    <om2m:accessRightID>scl-id/accessRights/AR_ADMIN_2</om2m:accessRightID>
</om2m:groups>

Example Response

HTTP/1.1 200 OK
Content-Type: text/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<om2m:groups xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
    <om2m:accessRightID>scl-id/accessRights/AR_ADMIN_2</om2m:accessRightID>
    <om2m:creationTime>2014-04-14T22:03:50.667+02:00</om2m:creationTime>
    <om2m:lastModifiedTime>2014-04-14T22:04:36.627+02:00</om2m:lastModifiedTime>
    <om2m:groupCollection>
        <om2m:namedReference id="GROUP_ON">scl-id/groups/GROUP_ON</om2m:namedReference>
        <om2m:namedReference id="GROUP_OFF">scl-id/groups/GROUP_OFF</om2m:namedReference>
    </om2m:groupCollection>
    <om2m:groupAnncCollection/>
    <om2m:subscriptionsReference>scl-id/groups/subscriptions</om2m:subscriptionsReference>
</om2m:groups>

Delete Groups

This resource shall not be deleted via the API. It is deleted when the parent resource is deleted.

Back to the top