update schema field that has a space in the name

729 views
Skip to first unread message

Menko Johnson

unread,
Mar 15, 2018, 4:11:03 PM3/15/18
to GAM for G Suite
Hi everyone,

We had to create a new user schema, and are now trying to use GAM to mass update the fields of that schema.  The problem is the schema and field have spaces in the name.  Is there a way to specify these names with spaces?  I tried using " ' brackets and other characters and using the "_" 

Is there a way to specify these with spaces to update the value?

Schema: AWS Attributes
Field: Appstream Role

When I query custom schemas, GAM shows those names with an _ at the space (AWS_Attributes).  However, when I try to use the command

gam update user username@ourdomain AWS_Attributes.Appstream_Role value

GAM says updating user... then error: ERROR: 400: Invalid Input: custom_schema - invalid

I just can't figure out how to do this.  Thanks!

Ross Scroggs

unread,
Mar 15, 2018, 4:30:39 PM3/15/18
to google-ap...@googlegroups.com
Menko,

How did you create the schema? The API won't let you make a schema with spaces in the name or in the field names.

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/7e14941f-384f-4396-b774-6e4a06127bab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Ross Scroggs

unread,
Mar 15, 2018, 5:00:37 PM3/15/18
to google-ap...@googlegroups.com
Menko,

The admin console will let you make a schema with a space in the name, Google replaces the space with a _.

$gam info schema Space_Schema

Schema: Space_Schema

 schemaId: ru4bhIwPThmPiyBRbqBT7Q==

 Field: Space_Field

  fieldType: BOOL

  readAccessType: ADMINS_AND_SELF

  fieldId: zf72j1xeSa2kllLcX-VYQA==

  multiValued: False


$gam update user test...@rdschool.org Space_Schema.Space_Field true

updating user test...@rdschool.org...


Do the following, check for spelling issues: gam print schemas


Ross




On Thu, Mar 15, 2018 at 1:30 PM, Ross Scroggs <ross.s...@gmail.com> wrote:
Menko,

How did you create the schema? The API won't let you make a schema with spaces in the name or in the field names.

Ross
On Thu, Mar 15, 2018 at 1:11 PM, Menko Johnson <menko_...@fuhsd.org> wrote:
Hi everyone,

We had to create a new user schema, and are now trying to use GAM to mass update the fields of that schema.  The problem is the schema and field have spaces in the name.  Is there a way to specify these names with spaces?  I tried using " ' brackets and other characters and using the "_" 

Is there a way to specify these with spaces to update the value?

Schema: AWS Attributes
Field: Appstream Role

When I query custom schemas, GAM shows those names with an _ at the space (AWS_Attributes).  However, when I try to use the command

gam update user username@ourdomain AWS_Attributes.Appstream_Role value

GAM says updating user... then error: ERROR: 400: Invalid Input: custom_schema - invalid

I just can't figure out how to do this.  Thanks!

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.com.



--



--

Menko Johnson

unread,
Mar 15, 2018, 6:09:19 PM3/15/18
to GAM for G Suite

Thanks Ross for your replies,

You're correct, we generated the schema in the admin console.  When I tried to do it with the API it wouldn't work.  Amazon Web Services needs those names with a space.

When I pulled the schema name, I saw the underscores.  However, the gam update schema fails.  I ended up deleting and recreating the schema and now it works with the underscores.  Not sure why that is, but atleast we can mass update with GAM.  Thanks for your help!

$gam show schemaa

Schema: AWS_Attributes

 schemaId: y45MTc2HQfG05IVcumTXkA==

 Field: Appstream_Role

  fieldType: STRING

  readAccessType: ADMINS_AND_SELF

  fieldId: UfgSGcqPQA-UasHHYcY1GA==

  multiValued: False





To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.



--



--
Reply all
Reply to author
Forward
0 new messages