Skip to main content
Jump to: navigation, search

OM2M/Group

Group resource

The group resource is used to define and access groups of other resources. The group resource can be used to do bulk manipulations on the resources represented by the members.


Attribute Name Type Multiplicity Create Update Response
expirationTime DateTime 1 O O M*
accessRightID AnyURI 0..1 O O O
searchStrings searchStrings 1 O O M
creationTime DateTime 1 NP NP M
lastModifiedTime DateTime 1 NP NP M
announceTo AnnounceTo 1 O O M*
memberType MemberType 1 M NP M
currentNrOfMembers Long 1 NP NP M
maxNrOfMembers Long 1 O O M
members AnyURIList 1 O O M
id NMTOKEN 1 O NP M*
membersContentReference AnyURI 1 NP NP M
subscriptionsReference AnyURI 1 NP NP M

Group 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"
    xmlns:xmlmime="http://www.w3.org/2005/05/xmlmime">
    <include schemaLocation="common.xsd" />
    <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="xmlmime.xsd" />
    <element name="group" type="tns:Group" />
    <complexType name="Group">
        <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:memberType" minOccurs="0" />
            <element ref="tns:currentNrOfMembers" minOccurs="0" />
            <element ref="tns:maxNrOfMembers" minOccurs="0" />
            <element ref="tns:members" minOccurs="0" />
            <!-- subresources -->
            <element ref="tns:membersContentReference" minOccurs="0" />
            <element ref="tns:subscriptionsReference" minOccurs="0" />
        </all>
        <attribute ref="tns:id"/>
    </complexType>
    <element name="memberType" type="tns:MemberType" />
    <element name="currentNrOfMembers" type="long" />
    <element name="maxNrOfMembers" type="long" />
    <element name="members" type="tns:AnyURIList" />
    <element name="membersContentReference" type="anyURI"/>
    <simpleType name="MemberType">
        <restriction base="string">
            <enumeration value="APPLICATION" />
            <enumeration value="CONTAINER" />
            <enumeration value="ACCESS_RIGHT" />
            <enumeration value="SERVER_CAPABILITY_LAYER" />
            <enumeration value="SCL" />
        </restriction>
    </simpleType>
</schema>

Create Group

Example Request

POST /scl-id/groups
Host: om2m.laas.fr
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Body:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<om2m:group xmlns:om2m="http://uri.etsi.org/m2m" om2m:id="GROUP_GET">
  <om2m:memberType>APPLICATION</om2m:memberType>
  <om2m:members>
      <reference>scl-id/applications/APP_1</reference>
      <reference>scl-id/applications/APP_2</reference>
      <reference>scl-id/applications/APP_3</reference>
  </om2m:members>
</om2m:group>

Example Response

HTTP/1.1 201 Created
Content-Type: text/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<om2m:group xmlns:om2m="http://uri.etsi.org/m2m" om2m:id="GROUP_GET">
  <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID>
  <om2m:searchStrings>
        <om2m:searchString>ResourceType/Group</om2m:searchString>
        <om2m:searchString>ResourceID/GROUP_GET</om2m:searchString>
  </om2m:searchStrings>
  <om2m:expirationTime>2045-12-24T17:02:29.370+01:00</om2m:expirationTime>
  <om2m:creationTime>2014-04-17T16:15:50.371+02:00</om2m:creationTime>
  <om2m:lastModifiedTime>2014-04-17T16:15:50.371+02:00</om2m:lastModifiedTime>
  <om2m:announceTo>
        <om2m:activated>false</om2m:activated>
        <om2m:global>false</om2m:global>
  </om2m:announceTo>
  <om2m:memberType>APPLICATION</om2m:memberType>
  <om2m:currentNrOfMembers>3</om2m:currentNrOfMembers>
  <om2m:maxNrOfMembers>-1</om2m:maxNrOfMembers>
  <om2m:members>
        <reference>scl-id/applications/APP_1</reference>
        <reference>scl-id/applications/APP_2</reference>
        <reference>scl-id/applications/APP_3</reference>
  </om2m:members>
  <om2m:membersContentReference>scl-id/groups/GROUP_GET/membersContent</om2m:membersContentReference>
  <om2m:subscriptionsReference>scl-id/groups/GROUP_GET/subscriptions</om2m:subscriptionsReference>
</om2m:group>

Retrieve Group

Example Request

GET /scl-id/groups/GROUP_GET
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:group xmlns:om2m="http://uri.etsi.org/m2m" om2m:id="GROUP_GET">
  <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID>
  <om2m:searchStrings>
        <om2m:searchString>ResourceType/Group</om2m:searchString>
        <om2m:searchString>ResourceID/GROUP_GET</om2m:searchString>
  </om2m:searchStrings>
  <om2m:expirationTime>2045-12-24T17:02:29.370+01:00</om2m:expirationTime>
  <om2m:creationTime>2014-04-17T16:15:50.371+02:00</om2m:creationTime>
  <om2m:lastModifiedTime>2014-04-17T16:15:50.371+02:00</om2m:lastModifiedTime>
  <om2m:announceTo>
        <om2m:activated>false</om2m:activated>
        <om2m:global>false</om2m:global>
  </om2m:announceTo>
  <om2m:memberType>APPLICATION</om2m:memberType>
  <om2m:currentNrOfMembers>3</om2m:currentNrOfMembers>
  <om2m:maxNrOfMembers>-1</om2m:maxNrOfMembers>
  <om2m:members>
        <reference>scl-id/applications/APP_1</reference>
        <reference>scl-id/applications/APP_2</reference>
        <reference>scl-id/applications/APP_3</reference>
  </om2m:members>
  <om2m:membersContentReference>scl-id/groups/GROUP_GET/membersContent</om2m:membersContentReference>
  <om2m:subscriptionsReference>scl-id/groups/GROUP_GET/subscriptions</om2m:subscriptionsReference>
</om2m:group>

Update Group

Example Request

PUT /scl-id/groups/GROUP_GET
Host: om2m.laas.fr
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<om2m:group xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
  <om2m:maxNrOfMembers>5</om2m:maxNrOfMembers>
</om2m:group>

Example Response

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

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<om2m:group xmlns:om2m="http://uri.etsi.org/m2m" om2m:id="GROUP_GET">
  <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID>
  <om2m:searchStrings>
        <om2m:searchString>ResourceType/Group</om2m:searchString>
        <om2m:searchString>ResourceID/GROUP_GET</om2m:searchString>
  </om2m:searchStrings>
  <om2m:expirationTime>2045-12-24T17:02:29.370+01:00</om2m:expirationTime>
  <om2m:creationTime>2014-04-17T16:15:50.371+02:00</om2m:creationTime>
  <om2m:lastModifiedTime>2014-04-17T16:17:25.061+02:00</om2m:lastModifiedTime>
  <om2m:announceTo>
        <om2m:activated>false</om2m:activated>
        <om2m:global>false</om2m:global>
  </om2m:announceTo>
  <om2m:memberType>APPLICATION</om2m:memberType>
  <om2m:currentNrOfMembers>3</om2m:currentNrOfMembers>
  <om2m:maxNrOfMembers>5</om2m:maxNrOfMembers>
  <om2m:members>
        <reference>scl-id/applications/APP_1</reference>
        <reference>scl-id/applications/APP_2</reference>
        <reference>scl-id/applications/APP_3</reference>
  </om2m:members>
  <om2m:membersContentReference>scl-id/groups/GROUP_GET/membersContent</om2m:membersContentReference>
  <om2m:subscriptionsReference>scl-id/groups/GROUP_GET/subscriptions</om2m:subscriptionsReference>
</om2m:group>

Delete Group

Example Request

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

Example Response

HTTP/1.1 204 No Content

Back to the top