Skip to Content.
Sympa Menu

grouper-dev - assign attributes web service

Subject: Grouper Developers Forum

List archive

assign attributes web service

Chronological Thread 
  • From: Chris Hyzer <>
  • To: Grouper Dev <>
  • Subject: assign attributes web service
  • Date: Thu, 15 Apr 2010 00:32:45 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

I finished the assign attributes web service.


Here is the jira:

Here is the confluence:



Assign or remove attributes and values of attribute assignments.  These attributes can be on groups, stems, members, memberships (immediate or any), attribute definitions, or on assignments of attributes (one level deep).

You can lookup attributes by attribute definition name, or attribute definition id

All assignments will be filtered for security based on the logged in or acted as user (security rules are on attribute framework wiki)

The returned data will include the attribute assignments, value(s) on those assignments, and a normalized list of references (owner objects e.g. group/stem/etc, attribute definitions, attribute names, etc), if things changed or were already assigned, etc

You can assign attributes to multiple owners, definitions, actions, etc

attributeAssignType is a required field, must be: group, member, stem, any_mem, imm_mem, attr_def, group_asgn, mem_asgn, stem_asgn, any_mem_asgn, imm_mem_asgn, attr_def_asgn

attributeAssignOperation is required and is the operation to perform for attribute on owners, from enum AttributeAssignOperation: assign_attr, add_attr, remove_attr.  In this case, assigning an attribute will not assign if already there.  add_attr will add this assignment even if it is already there (attribute definition must allow multi assignments)

attributeAssignValueOperation is required if passing values to assign.  It is the operation to perform for attribute value on attribute assignments: assign_value, add_value, remove_value, replace_values.  Like the attribute assign operation, assign_value will assign if not there, or ignore if already there.  add_value will add even if assigned.  And replace_values will remove orphans not in the assign list.


  • Can pass owners, actions, values, etc.  If multiples are passed, then each attribute def name will be assigned for each action on each owner.
  • Lookup owner or other objects by object lookup (by id, name, etc)
  • Returns group / subject information, can be detailed or not
  • Can actAs another user

Assign attributes lite service

  • Accepts one group, or one subject, or stem, one attribute definition name, one action to assign, one value (optional)
  • Documentation: SOAP (click on assignAttributesLite), REST (click on assignAttributesLite)
  • For REST, the request can put data in query string (in URL or request body)
  • REST request (colon is escaped to %3A):
    • PUT /grouper-ws/servicesRest/v1_6_000/assignAttributes
    • Note: if passing data in request body e.g. actAs, use a POST
  • (see documentation above for details): Request object, response object
  • Response codes
  • Samples (all files with "Lite" in them, click on "download" to see file)

Get attribute assignments service

  • Accepts multiple groups or subjects or memberhipIds (or combination) etc, attribute definitions, actions, etc to assign
  • Documentation: SOAP (click on assignAttributes), REST (click on assignAttributes)
  • REST request (colon is escaped to %3A):
    • POST /grouper-ws/servicesRest/v1_6_000/assignAttributes
  • (see documentation above for details): Request object, response object
  • Response codes overall
  • Returns an overall status
  • Samples (all files without "Lite" in them, click on "download" to see files)


Here is the client documentation:


assignAttributesWs web service usage:

  java -jar grouperClient.jar --operation=assignAttributesWs --attributeAssignType=group|member|stem|any_mem|imm_mem|attr_def --attributeAssignOperation=assign_attr|add_attr|remove_attr [--attributeDefNameNames=a:b,b:c] [--attributeDefNameUuids=1a,2b] [--ownerAttributeDefNames=a:b,b:c] [--ownerAttributeDefUuids=1a,2b] [--ownerGroupNames=a:b:c,a:b:d] [--ownerGroupUuids=1234,abcd] [--owner0SubjectId=subjId0] [--owner0SubjectIdentifier=subjIdent0] [--owner0SubjectSource=source0] [--ownerMembershipUuids=abc,bcd] [--ownerStemNames=a:b,b:c] [--ownerStemUuids=1a,2b] [--ownerMembershipAny0SubjectId=12] [--ownerMembershipAny0SubjectIdentifier=ab] [--ownerMembershipAny0SourceId=xyz] [--ownerMembershipAny0GroupName=3c] [--ownerMembershipAny0GroupUuid=1a] [--ownerAttributeAssignUuids=a1,b2] [--attributeAssignValueOperation=assign_value|add_value|remove_value|replace_values] [--values0Id=a1] [--values0Formatted=hey] [--values0System=there] [--attributeAssignUuids=a:b,b:c] [--actions=read,write] [--assignmentDisabledTime=2010/03/05_17:05:13.123] [--assignmentEnabledTime=2010/03/05_17:05:13.123] [--assignmentNotes=someNotes] [--delegatable=TRUE|FALSE|GRANT] [--includeGroupDetail=true|false] [--includeSubjectDetail=true|false] [--subjectAttributeNames=name0,name1] [--actAsSubjectId=subjId] [--actAsSubjectIdentifier=subjIdent] [--actAsSubjectSource=source] [--saveResultsToFile=fileName] [--outputTemplate=somePattern] [--paramName0=name0] [--paramValue0=value1] [--paramNameX=xthParamName] [--paramValueX=xthParamValue] [--debug=true] [--clientVersion=someVersion]


  e.g.: java -jar grouperClient.jar --operation=assignAttributesWs --attributeAssignType=group attributeAssignOperation=assign_attr --attributeDefNames=test:testAttributeAssignDefNameDef --ownerGroupNames=a:b:c


  output line: Index: 0: attributeAssignType: group, owner: test:groupTestAttrAssign, attributeDefNameName: test:testAttributeAssignDefName, action: assign, values: 15,5,5, enabled: T, id: a9c83eeb78c04ae5befcea36272d318c, changed: T, valuesChanged: F



Let me know any feedback.




  • assign attributes web service, Chris Hyzer, 04/15/2010

Archive powered by MHonArc 2.6.16.

Top of Page