0

i have an issue using the Users: Patch - API. I try to patch the name of the primary organization of a user using the following Request Body:

{
"organizations":[
    {
     "name":"Org. Name",
     "primary":true,
     "type":work
    }
]
}

The values of the users entry get patched, but the result looks like:

{
"organizations":[
    {
    "name": "\"Org. Name\"",
    "primary": true,
    "type": "work"
    }
]
}

The problem: the VCard entry of the user shows "Org. Name" instead of Org. Name as it should.

Is it possible to prevent the string getting formatted as a string again by the API?

Thank you for your help!

Lukas

  • That's unexpected. It would be helpful I think if you added the code necessary to create a [minimal and verifiable example](http://stackoverflow.com/help/mcve) of the problem. – Peter Jan 22 '17 at 23:16
  • @PeterHerrmann I just experienced the same thing when using the "try it" functionality on [https://developers.google.com/admin-sdk/directory/v1/reference/users/update](the API documentation page], as well as when using a php script to do so. Posting a body of `{ "organizations": [{ "title": "Senior Developer" }] }` becomes "\"Senior Developer\"" in the resulting postback. – MueR Jan 23 '17 at 21:04
  • 1
    @MueR I can reproduce this too. This appears to be a bug. You can log bugs on the Apps API issue tracker here: https://code.google.com/a/google.com/p/apps-api-issues/issues/list – Peter Jan 23 '17 at 22:25
  • 1
    @MueR I logged this as a bug here: https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=5080 Please "star" it to follow progress. – Peter Jan 23 '17 at 22:41

0 Answers0