Skip to main content
Jump to: navigation, search

OM2M/Containers

< OM2M
Revision as of 04:44, 20 May 2014 by Benalaya.sensinov.com (Talk | contribs) (Retrieve Containers)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Containers resource

The containers resource corresponds to a collection of container and containerAnnc resources. The first one corresponds to locally created containers while the second represents remote conatiners residing on the indicated resourceURI that are announced to the local resource. The following combinations are possible:

  • <sclBase>/containers: contains container ressources only created by local or remote entities.
  • <sclBase>/scls/<scl>/containers: contains containerAnnc ressources announced by the SCL corresponding to <scl> and /or container ressources.
  • <sclBase>/applications/<app>/containers: contains local container on locationContainer resources only, typically created by the Application corresponding to <app>.
  • <sclBase>/scls/<scl>/applications/<applicationsAnnc>/containers: contains <containerAnnc> or <locationContainer> ressources typically created by the SCL corresponding to <scl> or the Application on whose behalf <applicationAnnc> is created.


Name Type Multiplicity Create Update Response
accessRightID URI 1 N/A O O
creationTime DateTime 1 N/A NP M
lastModifiedTime DateTime 1 N/A NP M
containerCollection container 0..unbounded N/A NP M
containerAnncCollection containerAnnc 0..unbounded N/A NP M
locationCollection locationContainer 0..unbounded N/A NP M
locationAnncCollection locationContainerAnnc 0..unbounded N/A NP M
subscriptionsReference AnyURI 1 N/A NP M

Containers 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="containers" type="tns:Containers" />
  <complexType name="Containers">
    <all>
      <element ref="tns:accessRightID" minOccurs="0" />
      <element ref="tns:creationTime" minOccurs="0" />
      <element ref="tns:lastModifiedTime" minOccurs="0" />
      <!-- subresources -->
      <element ref="tns:containerCollection" minOccurs="0" />
      <element ref="tns:containerAnncCollection" minOccurs="0" />
      <element ref="tns:locationContainerCollection" minOccurs="0" />
      <element ref="tns:locationContainerAnncCollection" minOccurs="0" />
      <element ref="tns:subscriptionsReference" minOccurs="0" />
    </all>
  </complexType>
  <element name="containerCollection" type="tns:NamedReferenceCollection" />
  <element name="containerAnncCollection" type="tns:NamedReferenceCollection" />
  <element name="locationContainerCollection" type="tns:NamedReferenceCollection" />
  <element name="locationContainerAnncCollection" type="tns:NamedReferenceCollection" />
</schema>

Create Containers

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

Retrieve Containers

Example Request

GET /scl-id/containers
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:containers 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-16T15:24:45.763+02:00</om2m:creationTime>
    <om2m:lastModifiedTime>2014-04-16T15:24:45.765+02:00</om2m:lastModifiedTime>
    <om2m:containerCollection/>
    <om2m:containerAnncCollection/>
    <om2m:locationContainerCollection/>
    <om2m:locationContainerAnncCollection/>
    <om2m:subscriptionsReference>scl-id/containers/subscriptions</om2m:subscriptionsReference>
</om2m:containers>

Update Containers

Delete Containers

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

Back to the top