Skip to main content
Jump to: navigation, search

OM2M/ContentInstances

ContentInstances resource

The contentInstances resource represents the collection of content instances in a container. It keep track of the newest and the oldest instance. we note that the ContentInstances resource does not have its own AccessRights. Instead the accessRights of the parent container resource shall apply.


Name Type Multiplicity Create Update Response
creationTime DateTime 1 N/A NA M*
lastModifiedTime DateTime 1 N/A NA M*
currentNrOfInstances Long 1 N/A NA M*
currentByteSize Long 1 N/A NA M*
contentInstanceCollection contentInstanceCollection 0..unbounded N/A NA O
latest contentInstanceCollection 0..1 N/A NA O
oldest contentInstanceCollection 0..1 N/A NA O
subscriptionReference AnyURI 1 N/A NA M*

ContentInstances 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" />
  <include schemaLocation="contentInstance.xsd" />
  <element name="contentInstances" type="tns:ContentInstances" />
  <complexType name="ContentInstances">
    <all>
      <element ref="tns:creationTime" minOccurs="0" />
      <element ref="tns:lastModifiedTime" minOccurs="0" />
      <element ref="tns:currentNrOfInstances" minOccurs="0" />
      <element ref="tns:currentByteSize" minOccurs="0" />
      <!-- subresources -->
      <element ref="tns:contentInstanceCollection" minOccurs="0" />
      <element ref="tns:latest" minOccurs="0" />
      <element ref="tns:oldest" minOccurs="0" />
      <element ref="tns:subscriptionsReference" minOccurs="0" />
    </all>
  </complexType>
  <element name="currentNrOfInstances" type="long" />
  <element name="currentByteSize" type="long" />
  <element name="latest" type="tns:ReferenceToNamedResource" />
  <element name="oldest" type="tns:ReferenceToNamedResource" />
  <element name="contentInstanceCollection" type="tns:ContentInstanceCollection" />
  <complexType name="ContentInstanceCollection">
    <sequence>
      <element ref="tns:contentInstance" minOccurs="0" maxOccurs="unbounded" />
    </sequence>
  </complexType>
  <complexType name="ContentInstanceFilterCriteriaType">
    <complexContent>
      <extension base="tns:FilterCriteriaType">
        <all>
          <element name="creator" type="anyURI" minOccurs="0"/>
          <element name="searchString" type="string" minOccurs="0" maxOccurs="unbounded"/>
          <element name="createdSince" type="dateTime" minOccurs="0"/>
          <element name="createdUntil" type="dateTime" minOccurs="0"/>
          <element name="sizeFrom" type="int" minOccurs="0"/>
          <element name="sizeUntil" type="int" minOccurs="0"/>
          <element name="contentType" type="string" minOccurs="0" maxOccurs="unbounded"/>
          <element name="metaDataOnly" type="boolean" minOccurs="0" maxOccurs="1"/>
          <element name="attributeAccessor" type="anyURI" minOccurs="0" maxOccurs="1"/>
        </all>
      </extension>
    </complexContent>
  </complexType>
</schema>

Create ContentInstances

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

Retrieve ContentInstances

Example Request

GET /scl-id/containers/Id/contentInstances
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:contentInstances xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
    <om2m:creationTime>2014-04-17T17:38:27.880+02:00</om2m:creationTime>
    <om2m:lastModifiedTime>2014-04-17T17:38:27.880+02:00</om2m:lastModifiedTime>
    <om2m:currentNrOfInstances>0</om2m:currentNrOfInstances>
    <om2m:currentByteSize>0</om2m:currentByteSize>
    <om2m:contentInstanceCollection/>
    <om2m:subscriptionsReference>scl-id/containers/Id/contentInstances/subscriptions</om2m:subscriptionsReference>
</om2m:contentInstances>

Update ContentInstances

Delete ContentInstances

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

Back to the top