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/Container"

(Update Container)
(Delete Container)
Line 213: Line 213:
  
 
== Delete Container ==
 
== Delete Container ==
 +
 +
'''Delete a container resource'''
 +
 +
* Synopsis: DELETE {Well Known URI of the Service}
 +
* Request Headers: Authorization, Accept.
 +
* Request Body: N/A.
 +
* Response Headers: None.
 +
* Response Message No content.
 +
* Response Status: 204, 402, 404, 501.
 +
 +
'''Example Request'''
 +
 +
<pre>
 +
DELETE /scl-id/containers/Id
 +
Host: om2m.laas.fr
 +
Authorization: Basic xxxxxxxxxxxxxxxxxxx
 +
</pre>
 +
 +
'''Example Response'''
 +
 +
<pre>
 +
HTTP/1.1 204 No Content
 +
</pre>

Revision as of 11:11, 17 April 2014

Container resource

This resource represents a container for instances.


Name Type Multiplicity Create Update Response
Id AnyURI 1 O NP M
expirationTime DateTime 1 O O M*
accessRightID URI 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*
maxNrOfInstances Long 1 O O M*
maxByteSize Long 1 O O M*
maxInstanceAge Duration 1 O O M*
contentInstancesReference NamedReferenceCollection 1 NP NP M
subscriptionsReference NamedReferenceCollection 1 NP NP M

Container 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="container" type="tns:Container" />
  <complexType name="Container">
    <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:maxNrOfInstances" minOccurs="0" />
      <element ref="tns:maxByteSize" minOccurs="0" />
      <element ref="tns:maxInstanceAge" minOccurs="0" />
      <!--  not defined yet element ref="tns:containerType" minOccurs="0"  -->
      <!-- subresources -->
      <element ref="tns:contentInstancesReference" minOccurs="0" />
      <element ref="tns:subscriptionsReference" minOccurs="0" />
    </all>
    <attribute ref="tns:id"/>
  </complexType>
 
  <element name="maxNrOfInstances" type="long"/>
  <element name="maxByteSize" type="long"/>
  <element name="maxInstanceAge" type="long"/>
</schema>

Create Container

Create a container resource

  • Synopsis: POST {Well Known URI of the Service}
  • Request Headers: Authorization, Accept.
  • Request Body: M.
  • Response Headers: Content-Type, Content-Length.
  • Response Message Body: Application.
  • Response Status: 201, 402, 404, 501.

Example Request

POST /scl-id/containers
Host: om2m.laas.fr
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Body:
<om2m:container xmlns:om2m="http://uri.etsi.org/m2m" om2m:id=Id> 
</om2m:container> 

Example Response

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<om2m:container xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" om2m:id=Id>
    <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID>
    <om2m:searchStrings>
        <om2m:searchString>ResourceType/Container</om2m:searchString>
        <om2m:searchString>ResourceID/Id</om2m:searchString>
    </om2m:searchStrings>
    <om2m:expirationTime>2045-12-24T17:41:05.778+01:00</om2m:expirationTime>
    <om2m:creationTime>2014-04-17T16:54:26.778+02:00</om2m:creationTime>
    <om2m:lastModifiedTime>2014-04-17T16:54:26.778+02:00</om2m:lastModifiedTime>
    <om2m:announceTo>
        <om2m:activated>false</om2m:activated>
        <om2m:global>false</om2m:global>
    </om2m:announceTo>
    <om2m:maxNrOfInstances>10</om2m:maxNrOfInstances>
    <om2m:contentInstancesReference>scl-id/containers/Id/contentInstances</om2m:contentInstancesReference>
    <om2m:subscriptionsReference>scl-id/containers/Id/subscriptions</om2m:subscriptionsReference>
</om2m:container>

Retrieve Container

Retrieve information about a container resource

  • 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: Application.
  • Response Status: 200, 402, 404, 501.

Example Request

GET /scl-id/containers/Id
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:container xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" om2m:id=Id>
    <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID>
    <om2m:searchStrings>
        <om2m:searchString>ResourceType/Container</om2m:searchString>
        <om2m:searchString>ResourceID/Id</om2m:searchString>
    </om2m:searchStrings>
    <om2m:expirationTime>2045-12-24T17:41:05.778+01:00</om2m:expirationTime>
    <om2m:creationTime>2014-04-17T16:54:26.778+02:00</om2m:creationTime>
    <om2m:lastModifiedTime>2014-04-17T16:54:26.778+02:00</om2m:lastModifiedTime>
    <om2m:announceTo>
        <om2m:activated>false</om2m:activated>
        <om2m:global>false</om2m:global>
    </om2m:announceTo>
    <om2m:maxNrOfInstances>10</om2m:maxNrOfInstances>
    <om2m:contentInstancesReference>scl-id/containers/Id/contentInstances</om2m:contentInstancesReference>
    <om2m:subscriptionsReference>scl-id/containers/Id/subscriptions</om2m:subscriptionsReference>
</om2m:container>

Update Container

Update information about a container resource

  • Synopsis: PUT {Well Known URI of the Service}
  • Request Headers: Authorization, Accept.
  • Request Body: M.
  • Response Headers: Content-Type, Content-Length.
  • Response Message Body: Application.
  • Response Status: 200, 402, 404, 501.

Example Request

PUT /scl-id/containers/Id
Host: om2m.laas.fr
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<om2m:container 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:searchStrings>
        <om2m:searchString>ResourceType/Container</om2m:searchString>
        <om2m:searchString>ResourceID/DESCRIPTOR</om2m:searchString>
    </om2m:searchStrings>
    <om2m:maxNrOfInstances>20</om2m:maxNrOfInstances>
</om2m:container>

Example Response

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<om2m:container xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" om2m:id=Id>
    <om2m:accessRightID>scl-id/accessRights/AR_ADMIN</om2m:accessRightID>
    <om2m:searchStrings>
        <om2m:searchString>ResourceType/Container</om2m:searchString>
        <om2m:searchString>ResourceID/Id</om2m:searchString>
    </om2m:searchStrings>
    <om2m:expirationTime>2045-12-24T17:41:05.778+01:00</om2m:expirationTime>
    <om2m:creationTime>2014-04-17T16:54:26.778+02:00</om2m:creationTime>
    <om2m:lastModifiedTime>2014-04-17T17:08:55.530+02:00</om2m:lastModifiedTime>
    <om2m:announceTo>
        <om2m:activated>false</om2m:activated>
        <om2m:global>false</om2m:global>
    </om2m:announceTo>
    <om2m:maxNrOfInstances>10</om2m:maxNrOfInstances>
    <om2m:contentInstancesReference>gscl/containers/Id/contentInstances</om2m:contentInstancesReference>
    <om2m:subscriptionsReference>scl-id/containers/Id/subscriptions</om2m:subscriptionsReference>
</om2m:container>

Delete Container

Delete a container resource

  • Synopsis: DELETE {Well Known URI of the Service}
  • Request Headers: Authorization, Accept.
  • Request Body: N/A.
  • Response Headers: None.
  • Response Message No content.
  • Response Status: 204, 402, 404, 501.

Example Request

DELETE /scl-id/containers/Id
Host: om2m.laas.fr
Authorization: Basic xxxxxxxxxxxxxxxxxxx

Example Response

HTTP/1.1 204 No Content

Back to the top