Child pages
  • Assign Attributes Batch
Skip to end of metadata
Go to start of metadata

Grouper Web Services


This operation is available in servers v2.1.2+. 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 pass in multiple of these operations in one batch which can be transactional or not (default).  This is what differentiates assignAttributesBatch with assignAttributes.  There is no Lite version of this operation, since you can just use assignAttributesLite.

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 one owner, definition, action, etc, though you can pass in multiple assignments.

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, replace_attrs.  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.
  • Lookup owner or other objects by object lookup (by id, name, etc)
  • Note, if you have an assignment that is to a group, stem, etc (not on an assignment), then you can pass in another assignment in the batch that refers to the ID of a previous item in the batch.  You do this with the WsAttributeAssignLookup.batchIndex (0 indexed).  This means you can assign a marker attribute to an owner, along with metadata on that assignment, all in one web service operation.
  • Returns group / subject information, can be detailed or not
  • Can actAs another user

Assign attributes service

  • Accepts multiple groups or subjects or membershipIds (or combination) etc, attribute definitions, actions, etc to assign
  • Documentation: SOAP (click on assignAttributesBatch), REST (click on assignAttributesBatch)
  • REST request (colon is escaped to %3A):
    • POST /grouper-ws/servicesRest/v2_1_002/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)
  • No labels