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

Line 48: Line 48:
  
 
== Retrieve SclBase ==
 
== Retrieve SclBase ==
 
'''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: SclBase.
 
* Response Status: 200, 402, 404, 501.
 
  
 
'''Example Request'''
 
'''Example Request'''
Line 92: Line 83:
  
 
== Update SclBase ==
 
== Update SclBase ==
 
'''Update information about accessible resources'''
 
 
* Synopsis: PUT {Well Known URI of the Service}
 
* Request Headers: Authorization, Accept.
 
* Request Body: M.
 
* Response Headers: Content-Type, Content-Length.
 
* Response Message Body: SclBase.
 
* Response Status: 200, 402, 404, 501.
 
  
 
'''Example Request'''
 
'''Example Request'''

Revision as of 05:40, 4 May 2014

SclBase resource

The sclBase resource shall contain all other resources of the hosting SCL. An sclBase resource is the root of all other resources it contains.


Name Type Multiplicity Create Update Response
accessRightID URI 0..1 NP NP M
searchStrings 1 NP NP M
... ... ... ... ... ...

SclBase 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="sclBase" type="tns:SclBase"/>
  <complexType name="SclBase">
    <all>
      <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:aPocHandling" minOccurs="0" />
      <!-- subresources -->
      <element ref="tns:sclsReference" minOccurs="0" />
      <element ref="tns:applicationsReference" minOccurs="0" />
      <element ref="tns:containersReference" minOccurs="0" />
      <element ref="tns:groupsReference" minOccurs="0" />
      <element ref="tns:accessRightsReference" minOccurs="0" />
      <element ref="tns:subscriptionsReference" minOccurs="0" />
      <element ref="tns:discoveryReference" minOccurs="0" />
    </all>
  </complexType>
  <element name="sclsReference" type="anyURI" />
  <element name="discoveryReference" type="anyURI" />
</schema>

Create SclBase

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

Retrieve SclBase

Example Request

GET /scl-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"?>
<om2m:sclBase xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
    <om2m:accessRightID>scl-id/accessRights/ar-id</om2m:accessRightID>
    <om2m:searchStrings>
        <om2m:searchString>ResourceType/SclBase</om2m:searchString>
        <om2m:searchString>ResourceID/scl-id</om2m:searchString>
    </om2m:searchStrings>
    <om2m:creationTime>2014-04-07T14:45:33.935+02:00</om2m:creationTime>
    <om2m:lastModifiedTime>2014-04-07T14:45:33.991+02:00</om2m:lastModifiedTime>
    <om2m:sclsReference>scl-id/scls</om2m:sclsReference>
    <om2m:applicationsReference>scl-id/applications</om2m:applicationsReference>
    <om2m:containersReference>sclId/containers</om2m:containersReference>
    <om2m:groupsReference>scl-id/groups</om2m:groupsReference>
    <om2m:accessRightsReference>scl-id/accessRights</om2m:accessRightsReference>
    <om2m:subscriptionsReference>scl-id/subscriptions</om2m:subscriptionsReference>
    <om2m:discoveryReference>scl-id/discovery</om2m:discoveryReference>
</om2m:sclBase>

Update SclBase

Example Request

PUT /scl-id
Host: om2m.laas.fr
Authorization: Basic xxxxxxxxxxxxxxxxxxx

<?xml version="1.0" encoding="UTF-8"?>
<om2m:sclBase xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
    <om2m:accessRightID>scl-id/accessRights/ar-id</om2m:accessRightID>
    <om2m:searchStrings>
        <om2m:searchString>ResourceType/SclBase</om2m:searchString>
        <om2m:searchString>ResourceID/scl-id</om2m:searchString>
        <om2m:searchString>Location/Home</om2m:searchString>
    </om2m:searchStrings>
</om2m:sclBase>

Example Response

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

<?xml version="1.0" encoding="UTF-8"?>
<om2m:sclBase xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
    <om2m:accessRightID>scl-id/accessRights/ar-id</om2m:accessRightID>
    <om2m:searchStrings>
        <om2m:searchString>ResourceType/SclBase</om2m:searchString>
        <om2m:searchString>ResourceID/scl-id</om2m:searchString>
        <om2m:searchString>Location/Home</om2m:searchString>
    </om2m:searchStrings>
    <om2m:creationTime>2014-04-07T14:45:33.935+02:00</om2m:creationTime>
    <om2m:lastModifiedTime>2014-04-07T14:45:33.991+02:00</om2m:lastModifiedTime>
    <om2m:sclsReference>scl-id/scls</om2m:sclsReference>
    <om2m:applicationsReference>scl-id/applications</om2m:applicationsReference>
    <om2m:containersReference>sclId/containers</om2m:containersReference>
    <om2m:groupsReference>scl-id/groups</om2m:groupsReference>
    <om2m:accessRightsReference>scl-id/accessRights</om2m:accessRightsReference>
    <om2m:subscriptionsReference>scl-id/subscriptions</om2m:subscriptionsReference>
    <om2m:discoveryReference>scl-id/discovery</om2m:discoveryReference>
</om2m:sclBase>

Delete SclBase

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

Back to the top