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.
Difference between revisions of "OM2M/Groups"
< OM2M
(→Groups representation) |
|||
Line 47: | Line 47: | ||
</schema> | </schema> | ||
</source> | </source> | ||
+ | |||
+ | == Create Groups == | ||
+ | |||
+ | 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''' | ||
+ | |||
+ | <pre> | ||
+ | GET /scl-id/groups | ||
+ | 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:groups xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime"> | ||
+ | <om2m:accessRightID>nscl/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="LAMP_0">gscl/applications/LAMP_0</om2m:namedReference> | ||
+ | <om2m:namedReference id="LAMP_1">gscl/applications/LAMP_1</om2m:namedReference> | ||
+ | </om2m:groupCollection> | ||
+ | <om2m:groupAnncCollection/> | ||
+ | <om2m:subscriptionsReference>gscl/groups/subscriptions</om2m:subscriptionsReference> | ||
+ | </om2m:groups> | ||
+ | |||
+ | == Update Groups == | ||
+ | |||
+ | == Delete Groups == |
Revision as of 13:59, 16 April 2014
Groups resource
The Groups resource is a collection of group resources and/or groupAnnc resources. The following combinations are possible:
- < sclBase>/ groups: contains only local group resource.
- < sclBase>/ scls/< scl>/ groups: contains groupAnnc resource announced by 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 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 representation
<?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
The groups resource shall no be created via the API, it is created as a part of the parent resource.
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
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>nscl/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="LAMP_0">gscl/applications/LAMP_0</om2m:namedReference> <om2m:namedReference id="LAMP_1">gscl/applications/LAMP_1</om2m:namedReference> </om2m:groupCollection> <om2m:groupAnncCollection/> <om2m:subscriptionsReference>gscl/groups/subscriptions</om2m:subscriptionsReference> </om2m:groups> == Update Groups == == Delete Groups ==