Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "OM2M/AccessRights"
< OM2M
(→AccessRights representation) |
(→AccessRights resource) |
||
Line 3: | Line 3: | ||
== AccessRights resource == | == AccessRights resource == | ||
− | The accessRights resource is a collection of | + | The accessRights resource is a collection of accessRight resources and/or accessRightAnnc resources. It can reside in the following targets: |
− | * < | + | * <sclBase>/accessRights: contains only local accessRight resources. |
− | * < | + | * <sclBase>/scls/<scl>/accessRights: contains accessRightAnnc resource announced by an accessRight resource in the remote <scl>. |
− | * < | + | * <sclBase>/applications/<app>/accessRights: contains only [[OM2M/AccessRight|accessRight]] resource created by the <application> corresponding to <app>. |
− | * < | + | * <sclBase>/scls/<scl>/applications/<applicationAnnc>/accessRights: contains only accessRightAnnc resource representing the announcement of an accessRight resource residing in the remote <scl>. |
{{CTable}} | {{CTable}} |
Revision as of 04:49, 20 May 2014
Contents
AccessRights resource
The accessRights resource is a collection of accessRight resources and/or accessRightAnnc resources. It can reside in the following targets:
- <sclBase>/accessRights: contains only local accessRight resources.
- <sclBase>/scls/<scl>/accessRights: contains accessRightAnnc resource announced by an accessRight resource in the remote <scl>.
- <sclBase>/applications/<app>/accessRights: contains only accessRight resource created by the <application> corresponding to <app>.
- <sclBase>/scls/<scl>/applications/<applicationAnnc>/accessRights: contains only accessRightAnnc resource representing the announcement of an accessRight resource residing in the remote <scl>.
Attribute Name | Type | Multiplicity | Create | Update | Response |
accessRightCollection | NamedReferenceCollection | 0..unbounded | N/A | NP | M |
accessRightAnncCollection | NamedReferenceCollection | 0..unbounded | N/A | NP | M |
subscriptionReference | AnyURI | 1 | N/A | NP | M |
accessRightID | AnyURI | 0..1 | N/A | O | O |
creationTime | DateTime | 1 | N/A | NP | M |
lastModifiedTime | DateTime | 1 | N/A | NP | M |
AccessRights 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="accessRights" type="tns:AccessRights" /> <complexType name="AccessRights"> <all> <element ref="tns:accessRightID" minOccurs="0" /> <element ref="tns:creationTime" minOccurs="0" /> <element ref="tns:lastModifiedTime" minOccurs="0" /> <!-- subresources --> <element ref="tns:accessRightCollection" minOccurs="0" /> <element ref="tns:accessRightAnncCollection" minOccurs="0" /> <element ref="tns:subscriptionsReference" minOccurs="0" /> </all> </complexType> <element name="accessRightCollection" type="tns:NamedReferenceCollection" /> <element name="accessRightAnncCollection" type="tns:NamedReferenceCollection" /> </schema>
Create AccessRights
This resource shall not be created via the API, it is created as a part of the parent resource.
Retrieve AccessRights
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: AccessRights.
- Response Status: 200, 402, 404, 501.
Example Request
GET /scl-id/accessRights 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:accessRights 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-14T22:03:50.667+02:00</om2m:creationTime> <om2m:lastModifiedTime>2014-04-14T22:03:50.686+02:00</om2m:lastModifiedTime> <om2m:accessRightCollection> <om2m:namedReference id="AR_ADMIN">nscl/accessRights/AR_ADMIN</om2m:namedReference> </om2m:accessRightCollection> <om2m:accessRightAnncCollection/> <om2m:subscriptionsReference>scl-id/accessRights/subscriptions</om2m:subscriptionsReference> </om2m:accessRights>
Update AccessRights
Update information about accessible resources
- Synopsis: PUT {Well Known URI of the Service}
- Request Headers: Authorization, Accept.
- Request Body: AccessRights.
- Response Headers: Content-Type, Content-Length.
- Response Message Body: AccessRights.
- Response Status: 200, 402, 404, 501.
Example Request
PUT /scl-id/accessRights Host: om2m.laas.fr Authorization: Basic xxxxxxxxxxxxxxxxxxx <?xml version="1.0" encoding="UTF-8"?> <om2m:accessRights xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime"> <om2m:accessRightID>scl-id/accessRights/AR_ADMIN_2</om2m:accessRightID> </om2m:accessRights>
Example Response
HTTP/1.1 200 OK Content-Type: text/xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <om2m:accessRights xmlns:om2m="http://uri.etsi.org/m2m" xmlns:xmime="http://www.w3.org/2005/05/xmlmime"> <om2m:accessRightID>scl-id/accessRights/AR_ADMIN_2</om2m:accessRightID> <om2m:creationTime>2014-04-14T22:03:50.667+02:00</om2m:creationTime> <om2m:lastModifiedTime>2014-04-14T22:06:20.675+02:00</om2m:lastModifiedTime> <om2m:accessRightCollection> <om2m:namedReference id="AR_ADMIN">nscl/accessRights/AR_ADMIN</om2m:namedReference> <om2m:namedReference id="AR_ADMIN_2">nscl/accessRights/AR_ADMIN_2</om2m:namedReference> </om2m:accessRightCollection> <om2m:accessRightAnncCollection/> <om2m:subscriptionsReference>scl-id/accessRights/subscriptions</om2m:subscriptionsReference> </om2m:accessRights>
Delete AccessRights
This resource shall not be deleted via the API. It is deleted when the parent resource is deleted.