From 69b211933d4a9ac47a77f39b3d8b6c50f4561125 Mon Sep 17 00:00:00 2001
From: Farshid Tavakolizadeh Registration
- - The Registration API MUST provide interfaces to - create, retrieve, update, delete, and list (CRUDL) TDs. - + + The Things API provides interfaces to + create, retrieve, update, delete, and list (CRUDL) TDs. + + It is MANDATORY to implement the interface to list TDs. + Useful for static directories. + Useful when other operations are available via non-HTTP protocols. + Filtering provided via search API. + It is recommended that the + create, retrieve, update, delete (CRUD) interfaces are + provided together. + Need to update the TM. + + + + + The operations are described below:
From dee8609b57604e2969a973c1519aa23d4f8c0cd4 Mon Sep 17 00:00:00 2001 From: Farshid Tavakolizadeh- The Registration API is a RESTful HTTP API in accordance with the recommendations + The Things API is a RESTful HTTP API served at the `/things` endpoint. + The design of this API is in accordance with the recommendations defined in [[RFC7231]] and [[?REST-IOT]]. +
+
The default serialization format for all request and success response bodies MUST be
JSON, with JSON-LD 1.1 [[JSON-LD11]] syntax to support extensions and semantic
processing.
+ Certain applications may require serializations other than JSON.
Directories MAY accept additional representations based on request's indicated
Content-Type or Content-Encoding, and provide additional representations through
@@ -896,34 +900,34 @@ Registration
The Things API provides interfaces to
create, retrieve, update, delete, and list (CRUDL) TDs.
+
+ Implementing the interface to list TDs over HTTP is REQUIRED. - It is MANDATORY to implement the interface to list TDs. - Useful for static directories. - Useful when other operations are available via non-HTTP protocols. - Filtering provided via search API. - It is recommended that the - create, retrieve, update, delete (CRUD) interfaces are - provided together. - Need to update the TM. - - - + All other create, retrieve, update, and delete (CRUD) interfaces are OPTIONAL. +
++ For directories that serve the resources from a static collection, + it is practical to only implement interfaces to list and retrieve TDs + but not to create, update, and delete. + This is also useful for directories that only intend to expose + retrieval over HTTP, and allow other operations over non-HTTP protocols. - - + For other directories, it is recommended to implement list, as well as the + four CRUD interfaces. + Additional control over the CRUD interfaces should + be enforced via access control mechanisms. +
+The operations are described below:
- - The API MUST allow registration of a TD object passed as request body. - - - The request SHOULD contain `application/td+json` Content-Type header for - JSON serialization of TD. - + Creation refers to the registration of a new TD inside the directory. +
+The TD object is validated in accordance with [[[#validation]]]. Note that a TD may or may not be generated by the Thing it describes. For brownfield devices in particular a separate Discoverer process @@ -940,9 +944,16 @@
- The API MUST allow retrieval of an existing TD using an HTTP `GET` request
+ The retrieval of an existing TD MUST be done using an HTTP `GET` request
at `/things/{id}` endpoint, where `id` is the unique TD identifier.
@@ -1129,9 +1145,9 @@
-
- The API MUST allow modifications to an existing TD as full replacement or partial updates.
-
+ The update operations are to replace or partially modify an existing TD.
+
The update operations are described below:
- A TD MUST be removed from the directory when an HTTP `DELETE` request is submitted
+ A delete operation MUST be done using an HTTP `DELETE` request is submitted
at `/things/{id}`, where `id` is the identifier of the existing TD.
@@ -1550,7 +1566,7 @@
To do: Other administrative functions not having to do with CRUD of individual records,
for example, security configuration.
@@ -1559,7 +1575,7 @@ Retrieval
Update
Update
Deletion
Validation
Management
+ Management API
Management
The Notification API is to notify clients about the changes to TDs maintained within the directory. @@ -1762,7 +1778,7 @@
Sub-API to search a directory, e.g. issue a query.
From 73303e1ed5b0b6f2f7d7578c9c8756819c876c71 Mon Sep 17 00:00:00 2001
From: Farshid Tavakolizadeh
- The Things API is a RESTful HTTP API served at the `/things` endpoint.
- The design of this API is in accordance with the recommendations
- defined in [[RFC7231]] and [[?REST-IOT]].
-
-
- The default serialization format for all request and success response bodies MUST be
- JSON, with JSON-LD 1.1 [[JSON-LD11]] syntax to support extensions and semantic
- processing.
-
- Certain applications may require serializations other than JSON.
-
- Directories MAY accept additional representations based on request's indicated
- Content-Type or Content-Encoding, and provide additional representations through
- server-driven content negotiation.
-
-
-
- The Things API provides interfaces to
+ The Things API is a RESTful HTTP API served at the `/things` endpoint
+ providing interfaces to
create, retrieve, update, delete, and list (CRUDL) TDs.
+ The design of this API is in accordance with [[RFC7231]] and [[?REST-IOT]].
- Implementing the interface to list TDs over HTTP is REQUIRED.
-
- All other create, retrieve, update, and delete (CRUD) interfaces are OPTIONAL.
-
- For directories that serve the resources from a static collection,
- it is practical to only implement interfaces to list and retrieve TDs
- but not to create, update, and delete.
- This is also useful for directories that only intend to expose
- retrieval over HTTP, and allow other operations over non-HTTP protocols.
+ The HTTP API follows these general rules:
+ Directory Service API
Things API
+
- The operations are described below: + The CRUDL operations are described below:
- To do: add a - Thing Model - (`directory.tm.json`) - that can derive to - this TD - as an example. - The TM should describe all interaction affordances and indicate which ones - are required (i.e. mandatory by this spec). Moreover, it should use placeholders - for deployment-specific attributes. -
++ The directory APIs include mandatory, recommended, and optional + features. + Directories that don't offer recommended or optional features + inform the clients about the absence of those features + according to the following rules: +
@@ -1899,7 +1926,6 @@
- The CRUDL operations are described below: + The CRUDL operations are described in the following sections:
The HTTP API follows these general rules:
The HTTP API follows these general rules:
+ To do: add a + Thing Model + (`directory.tm.json`) + that can derive to + this TD + as an example. + The TM should describe all interaction affordances and indicate which ones + are required (i.e. mandatory by this spec). Moreover, it should use placeholders + for deployment-specific attributes. + Informative affordances (JSONPath and XPath) should be defined as such. +
+ The API of the directory is specified as a Thing Model. The Thing Model alone should not be considered as the reference to implement or interact with a directory. From ce069e52327b3185c2a9604cbc8d1be71270f89f Mon Sep 17 00:00:00 2001 From: Farshid Tavakolizadeh
- A delete operation MUST be done using an HTTP `DELETE` request is submitted
+ A delete operation MUST be done using an HTTP `DELETE` request
at `/things/{id}`, where `id` is the identifier of the existing TD.
From cc78d7355ffc386e607c5064c859698ea0afb517 Mon Sep 17 00:00:00 2001
From: Farshid Tavakolizadeh Creation
Validation
- To do: Other administrative functions not having to do with CRUD of individual records, - for example, security configuration. - Also, administrator roles may expand the capabilities of administrators for - management of records (for instance, the ability to delete a record they did not create). -
-
From f5851b1cf9abc9903c8af36de961b31fabf4c74d Mon Sep 17 00:00:00 2001
From: Farshid Tavakolizadeh Things API
It is practical to implement only the interfaces to read and list
if the directory serves a static collection of TDs.
This is also useful for directories that intend to expose only
- retrieval operations over HTTP, and perform other interactions via out-of-band mechanisms.
+ retrieval operations over HTTP, and perform other operations via out-of-band mechanisms.
To expose read-only access, the directory MUST enforce access control
on create, update, and delete interfaces.