Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-5107

PUT with no "If-Match" header fails to update an object with the Google Apps Connector

    Details

      Description

      Running through the Google Apps sample, I attempt to update an object on the Google resource with the following command:

      curl  --header "X-OpenIDM-Username: openidm-admin" \
             --header "X-OpenIDM-Password: openidm-admin" \
             --header "Content-Type: application/json" \
             --request PUT "http://localhost:8080/openidm/system/google/__ACCOUNT__/103567435255251233551" \
             --data   '{
                         "__NAME__": "samcarter@example.com",
                         "__PASSWORD__"  : "password",
                         "givenName" : "Sam",
                         "familyName": "Carter",
                         "agreedToTerms": true,
                         "changePasswordAtNextLogin" : false,
                         "phones" :
                           [
                               {
                                   "value": "1234567890",
                                   "type": "home"
                               },
                               {
                                   "value": "0987654321",
                                   "type":"work"
                               }
                           ]
                       }' | jq .
      

      The update fails with the following error:

      {
        "code": 500,
        "reason": "Internal Server Error",
        "message": "Operation CREATE failed with ConnectorException on system object: 103567435255251233551"
      }
      

      If I include the If-Match : * header, the command succeeds.

      This does not seem to be in line with the contract for PUT:

      • If-Match => I want to update. If it does not exist, it fails
      • If-None-Match => I want to create. If it exists, it fails
      • no header => I want to create if it does not exist, otherwise I want to update

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jason.vincent jason vincent
                Reporter:
                Lana Lana Frost
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: