Subject: [scim] Proposed PATCH Change: 2 of 2

From: Phil Hunt <[email-masked]>
Date: Fri, 8 Aug 2014 09:50:18 -0700

Further to my last message, a second optimization to PATCH is to allow path to specify the resource itself (by omitting the value).  This allows clients to patch resources and add or replace more than one attribute in a single PATCH operation.  This greatly reduces verbosity when adding/replacing more than one attribute.

Please indicate your -1 if you have any questions or concerns.

Proposed text changes:

From the introduction section:
|   A "path" attribute value is a "String" containing an attribute path
|   describing the target of the operation.  A delete operation MUST have
|   one value.  An add or replace operation MAY have up to one value (see
|   operation descriptions below for more information).
From Add Operation:

    The result of the add operation depends upon what the target location
    indicated by "path" references:
 
|   o  If omitted, the target location is assumed to be the resource
|      itself.  The "value" parameter contains a set of attributes to be
|      added to the resource.
|
    o  If the target location does not exist, the attribute and value is
       added.
 
|   o  If the target location specifies a complex attribute, a set of
|      sub-attributes SHALL be specified in the "value" parameter.
|
and…
|   The following example shows how to add one or more attributes to a
|   User resource without using a "path" attribute.
|
|   PATCH /Users/2819c223-7f76-453a-919d-413861904646
|   Host: example.com
|   Accept: application/scim+json
|   Content-Type: application/scim+json
|   Authorization: Bearer h480djs93hd8
|   If-Match: W/"a330bc54f0671c9"
|
|   {
|     "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
|     [{
|       "op":"add",
|       "value":"{
|         "emails":[
|           {
|             "value":"[email-masked]",
|             "type":"home"
|           }
|         ],
|         "nickname":"Babs"
|     }]
|   }
|
|   In the above example, an additional value is added to the multi-
|   valued attribute "emails".  The second attribute, "nickname" is added
|   to the User resource.  If the resource already had an existing
|   "nickname", the value is replaced per the processing rules above for
|   single-valued attributes.
There is similar text for the replace operation.

Phil

@independentid
www.independentid.com
[email-masked]

---

From: Kelly Grizzle <[email-masked]>
Date: Fri, 8 Aug 2014 17:07:06 +0000

This adds some ambiguity to the syntax as to whether the value is a complex attribute (eg - name) or multiple attributes.  I guess the "path" will be enough to differentiate the two.  I think I'm alright with this change.

> An add or replace operation MAY have up to one value

Should this be something more like "An add or replace operation MUST have at least one value"?

I'm not sure if I'm reading that text correctly or not.

From: scim [mailto:[email-masked]] On Behalf Of Phil Hunt
Sent: Friday, August 08, 2014 11:50 AM
To: SCIM WG
Subject: [scim] Proposed PATCH Change: 2 of 2

|      added to the resource.

|

       added.

|
and...

|

|   Host: example.com<http://example.com>

|

|   {

|     [{

|       "op":"add",

|       "value":"{

|         "emails":[

|           {

|             "value":"[email-masked]<mailto:[email-masked]>",

|             "type":"home"

|           }

|         ],

|         "nickname":"Babs"

|     }]

|   }

|

Phil

@independentid
www.independentid.com<http://www.independentid.com>
[email-masked]<mailto:[email-masked]>

---

From: Phil Hunt <[email-masked]>
Date: Fri, 8 Aug 2014 10:10:48 -0700

See below..

Phil

@independentid
www.independentid.com
[email-masked]

On Aug 8, 2014, at 10:07 AM, Kelly Grizzle <[email-masked]> wrote:

> This adds some ambiguity to the syntax as to whether the value is a complex attribute (eg – name) or multiple attributes.  I guess the “path” will be enough to differentiate the two.  I think I’m alright with this change.
>  
> Should this be something more like “An add or replace operation MUST have at least one value”?
>  
> I’m not sure if I’m reading that text correctly or not.

The reason it is "MAY have up to one value" is so that it is permissible not to have a “path”. Still trying to figure a better way to express that in normative language. 8-)  It may be simpler to say it must always be provided, but that for add and replace, “path”:null is acceptable in order to reference the resource itself.

---

From: Kelly Grizzle <[email-masked]>
Date: Fri, 8 Aug 2014 17:15:18 +0000

I think that would make more sense to me.

From: Phil Hunt [mailto:[email-masked]]
Sent: Friday, August 08, 2014 12:11 PM
To: Kelly Grizzle
Cc: SCIM WG
Subject: Re: [scim] Proposed PATCH Change: 2 of 2

See below..

Phil

@independentid

On Aug 8, 2014, at 10:07 AM, Kelly Grizzle <[email-masked]<mailto:[email-masked]>> wrote:

The reason it is "MAY have up to one value" is so that it is permissible not to have a "path". Still trying to figure a better way to express that in normative language. 8-)  It may be simpler to say it must always be provided, but that for add and replace, "path":null is acceptable in order to reference the resource itself.

|      added to the resource.

|

       added.

|
and...

|

|   Host: example.com<http://example.com/>

|

|   {

|     [{

|       "op":"add",

|       "value":"{

|         "emails":[

|           {

|             "type":"home"

|           }

|         ],

|         "nickname":"Babs"

|     }]

|   }

|

Phil

@independentid
www.independentid.com<http://www.independentid.com/>
[email-masked]<mailto:[email-masked]>