Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-2365

Google Drive API bug - Response of permission insert operation mostly does not contain 'emailAddress' property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • Future
    • jboss-fuse-6.2
    • Camel
    • None
    • % %

    Description

      Response of permission insert operation sometimes does not return emailAddress property even if the value of request property type was set to user. Nevertheless the permission is successfully inserted. When you send the request second time (but permission is already created), the response is correct.

      The Google Drive API documentation says:

      Property:
      emailAddress - string - The email address of the user this permission refers to. This is an output-only field which is present when the permission type is user.

      Request:

      POST https://www.googleapis.com/drive/v2/files/FILE_ID/permissions?access_token=ACCESS_TOKEN
      
      Content-Type: application/json
      {
        "role": "reader",
        "type": "user",
        "value": "fuse.salesforce@gmail.com"
      }
      

      Response:

      {
       "kind": "drive#permission",
       "etag": "\"Lie3Y624-6bAlCGsnUSYyb6P-dU/UIjiGw1Fka3NLCzU08DWihpk0m8\"",
       "id": "03171240407236930839",
       "selfLink": "https://www.googleapis.com/drive/v2/files/0B6w8rYOdxgEHeEJZdmdFb0lkS0k/permissions/03171240407236930839",
       "role": "reader",
       "type": "user"
      }
      

      Response 2:

      {
       "kind": "drive#permission",
       "etag": "\"Lie3Y624-6bAlCGsnUSYyb6P-dU/QyAkx3EvZskilI7B0C4EtTn_tj4\"",
       "id": "03171240407236930839",
       "selfLink": "https://www.googleapis.com/drive/v2/files/0B6w8rYOdxgEHeEJZdmdFb0lkS0k/permissions/03171240407236930839",
       "name": "fuse salesforce",
       "emailAddress": "fuse.salesforce@gmail.com",
       "domain": "gmail.com",
       "role": "reader",
       "type": "user"
      }
      

      Result is nondeterministic. Mostly (for me) email address is not set in the response, but sometimes it is.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbasovni Martin Basovnik (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: