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

(ContentInstance update)
(ContentInstance delete)
Line 117: Line 117:
  
 
== ContentInstance delete ==
 
== ContentInstance delete ==
 +
 +
'''Delete a contentInstance 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/contentInstances/id
 +
Host: om2m.laas.fr
 +
Authorization: Basic xxxxxxxxxxxxxxxxxxx
 +
</pre>
 +
 +
'''Example Response'''
 +
 +
<pre>
 +
HTTP/1.1 204 No Content
 +
</pre>

Revision as of 15:03, 17 April 2014

contentInstance resource

The contentInstance resource represents a data instance in the container.

The contentInstance resource cannot be modified once created.

A contentInstance may be deleted explicitly or it may be deleted by the platform.


Name Type Multiplicity Create Update Response
id NMTOKEN 1 O N/A M*
href AnyURI 1 NP N/A O
contentTypes ContentTypes 1 O N/A O
contentSize Long 1 NP N/A M
creationTime DateTime 1 NP N/A M
lastModifiedTime DateTime 1 NP N/A M
delayTolerance DateTime 1 O N/A M*
content Content 1 M N/A M

contentInstance 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" 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="contentInstance" type="tns:ContentInstance" />
  <complexType name="ContentInstance">
    <all>
      <element ref="tns:creationTime" minOccurs="0" />
      <element ref="tns:lastModifiedTime" minOccurs="0" />
      <element ref="tns:delayTolerance" minOccurs="0" />
      <element ref="tns:contentTypes" minOccurs="0" />
      <element ref="tns:contentSize" minOccurs="0" />
      <element ref="tns:content" minOccurs="0" />
    </all>
    <attribute ref="tns:id" />
    <attribute name="href" type="anyURI" />
  </complexType>
  <element name="content" type="xmlmime:base64Binary" />
  <element name="contentSize" type="long" />
  <element name="contentTypes" type="tns:ContentTypes" />
  <complexType name="ContentTypes">
    <sequence>
      <element ref="tns:contentType" maxOccurs="unbounded" />
    </sequence>
  </complexType>
</schema>

contentInstance create

Create a container' contentInstance 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/Id/contentInstances/
Host: om2m.laas.fr
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Body:

Example Response

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

contentInstance retrieve

Retrieve information about contentInstance data value

  • 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/contentInstances/id
Host: om2m.laas.fr
Authorization: Basic xxxxxxxxxxxxxxxxxxx

Example Response

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


ContentInstance update

This operation is not allowed, the contentInstance resource cannot be modified once created.

ContentInstance delete

Delete a contentInstance 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/contentInstances/id
Host: om2m.laas.fr
Authorization: Basic xxxxxxxxxxxxxxxxxxx

Example Response

HTTP/1.1 204 No Content

Back to the top