Subject: [core] #373 (resource-directory): Fix the registration update interface

From: "core issue tracker" <[email-masked]>
Date: Wed, 23 Jul 2014 18:37:52 -0000

#373: Fix the registration update interface

 The registration update interface has been in need of a final update for
 some time proposed as follows:

 - Change to a POST for better REST semantics
 - Removal of Endpoint Type update
 - Links can be included, and such links are either added or modify an
 existing link (NOTE: Section needed on when a link matches for such an
 update)

 With these proposed changes, the section would look like:

 5.3.  Update

    The update interface is used by an endpoint to refresh or update its
    registration with an RD.  To use the interface, the endpoint sends a
    POST request to the resource returned in the Location option in the
    response to the first registration.  An update MAY update the
    lifetime or context parameters if they have changed since the last
    registration or update.  Parameters that have not changed SHOULD NOT
    be included in an update.  Upon receiving an update request, the RD
    resets the timeout for that endpoint and updates the scheme, IP
    address and port of the endpoint (using the source address of the
    update, or the context parameter if present).

    An update MAY optionally add or replace links for the endpoint by
    including those links in the payload of the update as a CoRE Link
    Format document.  Including links in an update message greatly
    increases the load on an RD and SHOULD be done infrequently.  A link
    is replaced only if both the target URI and relation type match
    (TODO: Section on what is a unique link in an RD needed.)

    The update request interface is specified as follows:

    Interaction:  EP -> RD

    Method:  POST

    URI Template:  /{+location}{?lt,con}

    URI Template Variables:

       location :=   This is the Location path returned by the RD as a
          result of a successful registration.

       lt :=   Lifetime (optional).  Lifetime of the registration in
          seconds.  Range of 60-4294967295.  If no lifetime is included,
          a default value of 86400 (24 hours) SHOULD be assumed.

       con :=   Context (optional).  This parameter sets the scheme,
          address and port at which this server is available in the form
          scheme://host:port.  Optional.  In the absence of this
          parameter the scheme of the protocol, source IP address and
          source port used to register are assumed.

    Content-Type:  application/link-format (optional)

    Content-Type:  application/link-format+json (optional)

    The following response codes are defined for this interface:

    Success:  2.04 "Changed" in the update was successfully processed.

    Failure:  4.00 "Bad Request".  Malformed request.

    Failure:  5.03 "Service Unavailable".  Service could not perform the
       operation.

    The following example shows an endpoint updating a new set of
    resources to an RD using this interface.

         EP                                                RD
         |                                                 |
         | --- POST /rd/4521  -------------------------->   |
         |                                                 |
         |                                                 |
         | <-- 2.04 Changed  ----------------------------  |
         |                                                 |

    Req: POST /rd/4521

    Res: 2.04 Changed

-- 
-------------------------+-------------------------------------------------
 Reporter:               |      Owner:  draft-ietf-core-resource-
  [email-masked]     |  [email-masked]
     Type:  protocol     |     Status:  new
  enhancement            |  Milestone:
 Priority:  major        |    Version:
Component:  resource-    |   Keywords:
  directory              |
 Severity:  -            |
-------------------------+-------------------------------------------------

Ticket URL: <http://trac.tools.ietf.org/wg/core/trac/ticket/373>
core <http://tools.ietf.org/core/>