Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] webservice to get custom attributes on a group ?

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] webservice to get custom attributes on a group ?


Chronological Thread 
  • From: Shilen Patel <>
  • To: Mathieu HETRU <>
  • Cc: grouper-users <>, "Hyzer, Chris" <>
  • Subject: Re: [grouper-users] webservice to get custom attributes on a group ?
  • Date: Wed, 20 Jun 2018 17:29:03 +0000
  • Accept-language: en-US
  • Authentication-results: oit.duke.edu; spf=none
  • Ironport-phdr: 9a23:wPV0sxDHj/lupsLYAbD6UyQJP3N1i/DPJgcQr6AfoPdwSPX9osbcNUDSrc9gkEXOFd2Cra4c1qyO6+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglUhDexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfOpWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnMVhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Qiqp4bt1RxD0iScHLz85/3/Risxsl6JQvRatqwViz4LIfI2ZMfxzdb7fc9wHX2pMRsZfWTJcDIOgYYUBDOQBMuRWoIn8u1QBogCzBROwCOPq0DJEmmX70K883u88EQ/GxgsgH9cWvXrJrNX1NaMSXv6zzKLV1zvMde9W1in56IPVdR0huvGMXbN0ccXPz0kiDB7KjkiTqYP7JT+ayPkCs3WC4udmSOmhhWknqwRrrTiuwMchkpTJhoQUylDa7Cl5xIc1Jdm8SEFle9KkHoFQuzmVN4tsRcMiXnlotzggyrEct5+7ZzAGyIw9xx7YbPyHfZCI4hXiVOaXPTd0nm5qeLW6hxqq7EigzOz8Vtet3FpUsyVFltjMtnQJ1xPN8MSHROF980G80jiMzwDe8vxILEAqmabBJZMt2KM8m5kXvEjZACP7lkT7gLeLekgk5OSk8erqbq/oq5KTLYN5hBnyMqowlcG8Heg1Nw0DU3ab9Oig1rDu+Ff2TbpWgfIql6TZvpHXKtgaq6O8BwJV3Jos5wu5Ajy7ytoXh2MHI0hAeB+fj4jmJVXOIPfgAPe6mVuskTNry+nJPrzvG5nBM2TPnK3mfbZ8905Q0hc8zc1c551KEL0OPu/8WlLpuNzZCB82LRC0zv76BNh9yI8SQ2yCDrWEPK7RtVKE/PwjLueNaYMNvTbyMfkl5/rgjX8jnl8deLGk3YAXaHC5GvRpPUOZbGHxjdccEmcFoBAyQ/L3h12fSTJTfWq9X7og5jEnD4KrFYjDRpqqgLycxCe0AIdWanlbClCXD3jobZ6EVuwIaCKTOc9hjicEWaa7R48g0xGuqBH1y6BhLuXK5i0Uq4jv28Zo6O3OxlkO8mlRBtid0myQB0FZolk1D2sz1bx/oEFgjFeOzbJlq+FeFMIW4/JNVgp8O4SKnMJgDNWnYQLAetqPAG6vXtiiSWUqTtM1ztkmb1t+FpOvgg2VjHniOKMci7HeXM98yanbxXWkYp8lk3s=
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

First get the attribute assignment.  Note that this is not the assignment of the nom-liste, cn-ldap, etc attributes.  Those are assignments on assignments.  This is the assignment of the overall GroupeUdl marker attribute on the group.

 

POST http://localhost:8080/grouper-ws/servicesRest/v2_3_000/attributeAssignments

 

<WsRestGetAttributeAssignmentsRequest>

  <attributeAssignType>group</attributeAssignType>

  <wsOwnerGroupLookups>

    <WsGroupLookup>

      <groupName>UDL:ACT:APP:APPTEST</groupName>

    </WsGroupLookup>

  </wsOwnerGroupLookups>

  <includeAssignmentsOnAssignments>T</includeAssignmentsOnAssignments>

</WsRestGetAttributeAssignmentsRequest>

 

Response:

 

<?xml version="1.0" encoding="UTF-8"?>

<WsGetAttributeAssignmentsResults>

   <wsAttributeDefs>

      <WsAttributeDef>

         <idIndex>10030</idIndex>

         <extension>legacyGroupTypeDef_GroupeUdl</extension>

         <name>etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl</name>

         <uuid>d800b1b1a7e94f4f93333b7b960b6b0f</uuid>

         <attributeDefType>attr</attributeDefType>

         <multiAssignable>F</multiAssignable>

         <multiValued>F</multiValued>

         <valueType>marker</valueType>

         <assignToAttributeDef>F</assignToAttributeDef>

         <assignToAttributeDefAssignment>F</assignToAttributeDefAssignment>

         <assignToEffectiveMembership>F</assignToEffectiveMembership>

         <assignToEffectiveMembershipAssignment>F</assignToEffectiveMembershipAssignment>

         <assignToGroup>F</assignToGroup>

         <assignToGroupAssignment>F</assignToGroupAssignment>

         <assignToImmediateMembership>F</assignToImmediateMembership>

         <assignToImmediateMembershipAssignment>F</assignToImmediateMembershipAssignment>

         <assignToMember>F</assignToMember>

         <assignToMemberAssignment>F</assignToMemberAssignment>

         <assignToStem>F</assignToStem>

         <assignToStemAssignment>F</assignToStemAssignment>

      </WsAttributeDef>

   </wsAttributeDefs>

   <wsAttributeDefNames>

      <WsAttributeDefName>

         <idIndex>10151</idIndex>

         <extension>legacyGroupType_GroupeUdl</extension>

         <displayExtension>legacyGroupType_GroupeUdl</displayExtension>

         <displayName>etc:legacy:attribute:legacyGroupType_GroupeUdl</displayName>

         <name>etc:legacy:attribute:legacyGroupType_GroupeUdl</name>

         <uuid>4c5f48911d884861a9ff411d7d7d5fc9</uuid>

         <attributeDefId>d800b1b1a7e94f4f93333b7b960b6b0f</attributeDefId>

         <attributeDefName>etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl</attributeDefName>

      </WsAttributeDefName>

   </wsAttributeDefNames>

   <wsAttributeAssigns>

      <WsAttributeAssign>

         <disallowed>F</disallowed>

         <attributeAssignActionType>immediate</attributeAssignActionType>

         <attributeAssignDelegatable>FALSE</attributeAssignDelegatable>

         <attributeAssignActionId>1d7a1277ae9742cd89864cca3945bdee</attributeAssignActionId>

         <attributeAssignActionName>assign</attributeAssignActionName>

         <attributeAssignType>group</attributeAssignType>

         <attributeDefNameId>4c5f48911d884861a9ff411d7d7d5fc9</attributeDefNameId>

         <attributeDefNameName>etc:legacy:attribute:legacyGroupType_GroupeUdl</attributeDefNameName>

         <attributeDefId>d800b1b1a7e94f4f93333b7b960b6b0f</attributeDefId>

         <attributeDefName>etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl</attributeDefName>

         <createdOn>2018/06/20 12:54:40.935</createdOn>

         <enabled>T</enabled>

         <id>da21c356427e45c58c576b2c38d7e167</id>

         <lastUpdated>2018/06/20 12:54:40.935</lastUpdated>

         <ownerGroupId>2a158c7d01d54d068bf51b68981f206f</ownerGroupId>

         <ownerGroupName>UDL:ACT:APP:APPTEST</ownerGroupName>

      </WsAttributeAssign>

   </wsAttributeAssigns>

   <resultMetadata>

      <resultCode>SUCCESS</resultCode>

      <resultMessage>, Found 1 results.</resultMessage>

      <success>T</success>

   </resultMetadata>

   <responseMetadata>

      <resultWarnings />

      <millis>500</millis>

      <serverVersion>2.4.0</serverVersion>

   </responseMetadata>

   <wsGroups>

      <WsGroup>

         <extension>APPTEST</extension>

         <typeOfGroup>group</typeOfGroup>

         <displayExtension>APPTEST</displayExtension>

         <displayName>UDL:ACT:APP:APPTEST</displayName>

         <name>UDL:ACT:APP:APPTEST</name>

         <uuid>2a158c7d01d54d068bf51b68981f206f</uuid>

         <idIndex>10005</idIndex>

      </WsGroup>

   </wsGroups>

   <wsStems />

   <wsMemberships />

   <wsSubjects />

</WsGetAttributeAssignmentsResults>

 

 

2.  You can see the assignment id above in bold.  Use that to make the assignment on assignment.  I used nom-liste in this example.

 

POST http://localhost:8080/grouper-ws/servicesRest/v2_3_000/attributeAssignments

 

<WsRestAssignAttributesRequest>

  <attributeAssignOperation>assign_attr</attributeAssignOperation>

  <attributeAssignValueOperation>replace_values</attributeAssignValueOperation>

  <wsOwnerAttributeAssignLookups>

    <WsAttributeAssignLookup>

      <uuid>da21c356427e45c58c576b2c38d7e167</uuid>

    </WsAttributeAssignLookup>

  </wsOwnerAttributeAssignLookups>

  <values>

    <WsAttributeAssignValue>

      <valueSystem>my value</valueSystem>

    </WsAttributeAssignValue>

  </values>

  <attributeAssignType>group_asgn</attributeAssignType>

  <wsAttributeDefNameLookups>

    <WsAttributeDefNameLookup>

      <name>etc:legacy:attribute:legacyAttribute_nom-liste</name>

    </WsAttributeDefNameLookup>

  </wsAttributeDefNameLookups>

</WsRestAssignAttributesRequest>

 

 

Does that help?

 

Thanks!

 

- Shilen

 

From: <> on behalf of Mathieu HETRU <>
Date: Tuesday, June 19, 2018 at 1:25 PM
To: "Hyzer, Chris" <>
Cc: grouper-users <>
Subject: Re: [grouper-users] webservice to get custom attributes on a group ?

 

Hello,

I just want to set a value on attribute "archive-liste", or "cn-ldap", or "date-fin", or "externe-liste", or "groupe-sender", or "nom-liste" or "type-liste" (see the picture on attached file)

with grouper webservice attributeAssignments.

The version of my grouper is 2.3.0.

Thanks.

Matthew


niversité de Lille

Mathieu HETRU
Responsable du bureau Web/ENT

Université de Lille - Campus Cité Scientifique
Direction des Systèmes d'Information
Service Intégration / Exploitation
Cellule Web/ENT

Bureau 47 - Bâtiment A3
Domaine universitaire de la Cité Scientifique
Avenue Carl Von Limé
BP 90179 59653 Villeneuve d'Ascq

Tél. :+33 (0)3 62 26 83 81 (numéro interne : 68381)

| www.univ-lille.fr

Le 18/06/2018 à 05:12, Hyzer, Chris a écrit :

Can you please simply but thoroughly describe what you want to do?  Also please include a diagram.

 

And let me know what version of grouper you have is and if you have upgrade plans.

 

Thanks

Chris

 

From: Mathieu Hetru []
Sent: Saturday, June 16, 2018 8:01 AM
To: Hyzer, Chris
Cc: grouper-users
Subject: Re: [grouper-users] webservice to get custom attributes on a group ?

 

But on the classic interface i can see the attributes (see the picture on attachment file).

 

Thanks for your help!

 

Matthew

 


De: "Mathieu Hetru" <>
À: "Chris Hyzer" <>
Cc: "grouper-users" <>
Envoyé: Samedi 16 Juin 2018 13:54:48
Objet: Re: [grouper-users] webservice to get custom attributes on a group ?

 

When i request the group UDL:ACT:APP:APPTEST :

 

POST /grouper-ws/servicesRest/v2_2_000/attributeAssignments

 

{"WsRestGetAttributeAssignmentsRequest":

 {"attributeAssignType":"group",

  "includeAssignmentsOnAssignments":"T",

  "wsOwnerGroupLookups":[

    {"uuid":"f85e213692954e49a2e56043f0e1ba05"}

  ]

 }

}

 

 

The response is :

{
  "WsGetAttributeAssignmentsResults": {
    "responseMetadata": {
      "millis": "267",
      "serverVersion": "2.3.0"
    },
    "resultMetadata": {
      "resultCode": "SUCCESS",
      "resultMessage": ", Found 2 results.",
      "success": "T"
    },
    "wsAttributeAssigns": [
      {
        "attributeAssignActionId": "d7cc76d21e314f7d956c38a89d705f24",
        "attributeAssignActionName": "assign",
        "attributeAssignActionType": "immediate",
        "attributeAssignDelegatable": "FALSE",
        "attributeAssignType": "group",
        "attributeDefId": "77274cdcf3c649659da5f20c890c8d6b",
        "attributeDefName": "etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl",
        "attributeDefNameId": "ec1cc04cf68142fea5e7622228307288",
        "attributeDefNameName": "etc:legacy:attribute:legacyGroupType_GroupeUdl",
        "createdOn": "2017\/04\/26 13:40:38.865",
        "disallowed": "F",
        "enabled": "T",
        "id": "f6e4d69c5ddb4c3a895830f68a3c1608",
        "lastUpdated": "2017\/04\/26 13:40:38.865",
        "ownerGroupId": "f85e213692954e49a2e56043f0e1ba05",
        "ownerGroupName": "UDL:ACT:APP:APPTEST"
      },
      {
        "attributeAssignActionId": "37500428684141c693898b28c5453367",
        "attributeAssignActionName": "assign",
        "attributeAssignActionType": "immediate",
        "attributeAssignDelegatable": "FALSE",
        "attributeAssignType": "group_asgn",
        "attributeDefId": "d0192ecb2a18415c8b91057fc09178af",
        "attributeDefName": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
        "attributeDefNameId": "db15d0125cbc446e8e33fdc2ec1e83c5",
        "attributeDefNameName": "etc:legacy:attribute:legacyAttribute_cn-ldap",
        "createdOn": "2017\/04\/26 13:40:38.903",
        "disallowed": "F",
        "enabled": "T",
        "id": "5b75c531bc404bb28dd263f3c2c08530",
        "lastUpdated": "2017\/04\/26 13:40:38.903",
        "ownerAttributeAssignId": "f6e4d69c5ddb4c3a895830f68a3c1608",
        "wsAttributeAssignValues": [
          {
            "id": "9796e69938d64d209163c3c95dc33c9d",
            "valueSystem": "APP:APPTEST"
          }
        ]
      }
    ],
    "wsAttributeDefNames": [
      {
        "attributeDefId": "d0192ecb2a18415c8b91057fc09178af",
        "attributeDefName": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
        "displayExtension": "legacyAttribute_cn-ldap",
        "displayName": "etc:legacy:attribute:legacyAttribute_cn-ldap",
        "extension": "legacyAttribute_cn-ldap",
        "idIndex": "10124",
        "name": "etc:legacy:attribute:legacyAttribute_cn-ldap",
        "uuid": "db15d0125cbc446e8e33fdc2ec1e83c5"
      },
      {
        "attributeDefId": "77274cdcf3c649659da5f20c890c8d6b",
        "attributeDefName": "etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl",
        "displayExtension": "legacyGroupType_GroupeUdl",
        "displayName": "etc:legacy:attribute:legacyGroupType_GroupeUdl",
        "extension": "legacyGroupType_GroupeUdl",
        "idIndex": "10117",
        "name": "etc:legacy:attribute:legacyGroupType_GroupeUdl",
        "uuid": "ec1cc04cf68142fea5e7622228307288"
      }
    ],
    "wsAttributeDefs": [
      {
        "assignToAttributeDef": "F",
        "assignToAttributeDefAssignment": "F",
        "assignToEffectiveMembership": "F",
        "assignToEffectiveMembershipAssignment": "F",
        "assignToGroup": "F",
        "assignToGroupAssignment": "F",
        "assignToImmediateMembership": "F",
        "assignToImmediateMembershipAssignment": "F",
        "assignToMember": "F",
        "assignToMemberAssignment": "F",
        "assignToStem": "F",
        "assignToStemAssignment": "F",
        "attributeDefType": "attr",
        "extension": "legacyAttributeDef_GroupeUdl",
        "idIndex": "10030",
        "multiAssignable": "F",
        "multiValued": "F",
        "name": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
        "uuid": "d0192ecb2a18415c8b91057fc09178af",
        "valueType": "string"
      },
      {
        "assignToAttributeDef": "F",
        "assignToAttributeDefAssignment": "F",
        "assignToEffectiveMembership": "F",
        "assignToEffectiveMembershipAssignment": "F",
        "assignToGroup": "F",
        "assignToGroupAssignment": "F",
        "assignToImmediateMembership": "F",
        "assignToImmediateMembershipAssignment": "F",
        "assignToMember": "F",
        "assignToMemberAssignment": "F",
        "assignToStem": "F",
        "assignToStemAssignment": "F",
        "attributeDefType": "attr",
        "extension": "legacyGroupTypeDef_GroupeUdl",
        "idIndex": "10028",
        "multiAssignable": "F",
        "multiValued": "F",
        "name": "etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl",
        "uuid": "77274cdcf3c649659da5f20c890c8d6b",
        "valueType": "marker"
      }
    ],
    "wsGroups": [
      {
        "description": "Groupe pour tester le partage windows metiers2016 avec l'AD",
        "displayExtension": "APPTEST",
        "displayName": "Groupes de Lille:Groupes Activit\u00e9s:Groupes Applications:APPTEST",
        "extension": "APPTEST",
        "idIndex": "21691",
        "name": "UDL:ACT:APP:APPTEST",
        "typeOfGroup": "group",
        "uuid": "f85e213692954e49a2e56043f0e1ba05"
      }
    ],
    "wsMemberships": [
      
    ],
    "wsStems": [
      
    ],
    "wsSubjects": [
      
    ]
  }
}
 
I can see that the attribute etc:legacy:attribute:legacyAttribute_nom-liste is not present by default and depends from etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl
 
Thanks for your help !
 
Matthew

 


De: "Mathieu Hetru" <>
À: "Chris Hyzer" <>
Cc: "grouper-users" <>
Envoyé: Samedi 16 Juin 2018 13:43:03
Objet: Re: [grouper-users] webservice to get custom attributes on a group ?

 

Hello,

 

Yes i am sure, because i use the GrouperSystem login which is administrator...

 

I have tested to add the attribute etc:legacy:attribute:legacyAttribute_nom-liste with the value "" on the group UDL:ACT:APP:APPTEST :

 

POST /grouper-ws/servicesRest/v2_2_000/attributeAssignments

 

{

  "WsRestAssignAttributesRequest":{

    "attributeAssignOperation":"assign_attr",

    "attributeAssignType":"group",

    "attributeAssignValueOperation":"add_value",

    "values":[

      {

        "valueSystem":""

      }

    ]

    ,

    "wsAttributeDefNameLookups":[

      {

        "name":"etc:legacy:attribute:legacyAttribute_nom-liste",

        "uuid":""

      }

    ]

    ,

    "wsOwnerGroupLookups":[

      {

        "groupName":"UDL:ACT:APP:APPTEST"

      }

    ]

  }

}

 

but the response is :

 

{
  "WsAssignAttributesResults": {
    "responseMetadata": {
      "millis": "660",
      "serverVersion": "2.3.0"
    },
    "resultMetadata": {
      "resultCode": "INVALID_QUERY",
      "resultMessage": "Problem with AttributeDefName[name=etc:legacy:attribute:legacyAttribute_nom-liste,uuid=1cba276c64114458a1e13272fa0981de], action: assign, owner: Group[name=UDL:ACT:APP:APPTEST,uuid=f85e213692954e49a2e56043f0e1ba05], edu.internet2.middleware.grouper.exception.AttributeOwnerNotInScopeException: Cant find a scope definition that fits this assignment: AttributeDef[name=etc:legacy:attribute:legacyAttributeDef_GroupeUdl,uuid=d0192ecb2a18415c8b91057fc09178af], Group[name=UDL:ACT:APP:APPTEST,uuid=f85e213692954e49a2e56043f0e1ba05]\n\tat edu.internet2.middleware.grouper.attr.assign.AttributeAssignBaseDelegate.assertScopeOk(AttributeAssignBaseDelegate.java:939)\n\tat edu.internet2.middleware.grouper.attr.assign.AttributeAssignBaseDelegate.internal_assignAttributeHelper(AttributeAssignBaseDelegate.java:518)\n\tat edu.internet2.middleware.grouper.attr.assign.AttributeAssignBaseDelegate.assignAttribute(AttributeAssignBaseDelegate.java:466)\n\tat edu.internet2.middleware.grouper.ws.rest.attribute.WsAssignAttributeLogic.attributeAssignOnOwnerHelper(WsAssignAttributeLogic.java:756)\n\tat edu.internet2.middleware.grouper.ws.rest.attribute.WsAssignAttributeLogic.assignAttributesHelper(WsAssignAttributeLogic.java:590)\n\tat edu.internet2.middleware.grouper.ws.GrouperServiceLogic.assignAttributes(GrouperServiceLogic.java:6376)\n\tat edu.internet2.middleware.grouper.ws.coresoap.GrouperService.assignAttributes(GrouperService.java:3296)\n\tat edu.internet2.middleware.grouper.ws.rest.GrouperServiceRest.assignAttributes(GrouperServiceRest.java:1685)\n\tat edu.internet2.middleware.grouper.ws.rest.method.GrouperWsRestPut$3.service(GrouperWsRestPut.java:194)\n\tat edu.internet2.middleware.grouper.ws.rest.method.GrouperRestHttpMethod$3.service(GrouperRestHttpMethod.java:104)\n\tat edu.internet2.middleware.grouper.ws.rest.GrouperRestServlet.service(GrouperRestServlet.java:199)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:727)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat edu.internet2.middleware.grouper.ws.GrouperServiceJ2ee.doFilter(GrouperServiceJ2ee.java:670)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:612)\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)\n\tat org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)\n\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)\n\tat org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n\tat java.lang.Thread.run(Thread.java:745)\n.  , Found 0 results.",
      "success": "F"
    },
    "wsAttributeDefNames": [
      {
        "attributeDefId": "d0192ecb2a18415c8b91057fc09178af",
        "attributeDefName": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
        "displayExtension": "legacyAttribute_nom-liste",
        "displayName": "etc:legacy:attribute:legacyAttribute_nom-liste",
        "extension": "legacyAttribute_nom-liste",
        "idIndex": "10122",
        "name": "etc:legacy:attribute:legacyAttribute_nom-liste",
        "uuid": "1cba276c64114458a1e13272fa0981de"
      }
    ],
    "wsAttributeDefs": [
      {
        "assignToAttributeDef": "F",
        "assignToAttributeDefAssignment": "F",
        "assignToEffectiveMembership": "F",
        "assignToEffectiveMembershipAssignment": "F",
        "assignToGroup": "F",
        "assignToGroupAssignment": "F",
        "assignToImmediateMembership": "F",
        "assignToImmediateMembershipAssignment": "F",
        "assignToMember": "F",
        "assignToMemberAssignment": "F",
        "assignToStem": "F",
        "assignToStemAssignment": "F",
        "attributeDefType": "attr",
        "extension": "legacyAttributeDef_GroupeUdl",
        "idIndex": "10030",
        "multiAssignable": "F",
        "multiValued": "F",
        "name": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
        "uuid": "d0192ecb2a18415c8b91057fc09178af",
        "valueType": "string"
      }
    ],
    "wsGroups": [
      {
        "description": "Groupe pour tester le partage windows metiers2016 avec l'AD",
        "displayExtension": "APPTEST",
        "displayName": "Groupes de Lille:Groupes Activit\u00e9s:Groupes Applications:APPTEST",
        "extension": "APPTEST",
        "idIndex": "21691",
        "name": "UDL:ACT:APP:APPTEST",
        "typeOfGroup": "group",
        "uuid": "f85e213692954e49a2e56043f0e1ba05"
      }
    ],
    "wsMemberships": [
      
    ],
    "wsStems": [
      
    ],
    "wsSubjects": [
      
    ]
  }
}
 
 
I think that my attributeetc:legacy:attribute:legacyAttribute_nom-liste is not present by default my group if i not set a value...
 
How can i set it with the webservices? i am lost with the grouper architecture... with attributeassignid etc...
 
Wow! the grouper architecture is not easy and it is complicated to manipulate datas through the webservices......
 
Thanks for your help...

Matthew

 


De: "Hyzer, Chris" <>
À: "Mathieu Hetru" <>,
Envoyé: Dimanche 27 Mai 2018 23:11:52
Objet: RE: [grouper-users] webservice to get custom attributes on a group ?

 

Do you have the right privileges to see it?  you sure the attributes are on that group?

 

From: [] On Behalf Of Mathieu HETRU
Sent: Sunday, May 27, 2018 2:51 PM
To:
Subject: Re: [grouper-users] webservice to get custom attributes on a group ?

 

Hello,

I have tested your solution in XML (with a group TEST) :

POST /grouper-ws/servicesRest/v2_3_000/attributeAssignments

<WsRestGetAttributeAssignmentsRequest>
  <attributeAssignType>group</attributeAssignType>
  <wsOwnerGroupLookups>
    <WsGroupLookup>
      <groupName>UDL:ACT:APP:TEST</groupName>
    </WsGroupLookup>
  </wsOwnerGroupLookups>
  <includeAssignmentsOnAssignments>T</includeAssignmentsOnAssignments>
</WsRestGetAttributeAssignmentsRequest>


but all the attributes are not in the result response (i found only cn-ldap) :

<WsGetAttributeAssignmentsResults>
    <wsAttributeDefs>
        <WsAttributeDef>
            <idIndex>10023</idIndex>
            <extension>legacyAttributeDef_GroupeUdl</extension>
            <name>etc:legacy:attribute:legacyAttributeDef_GroupeUdl</name>
            <uuid>2a8e63a0b7904e09b1ed60a191aa9f23</uuid>
            <attributeDefType>attr</attributeDefType>
            <multiAssignable>F</multiAssignable>
            <multiValued>F</multiValued>
            <valueType>string</valueType>
            <assignToAttributeDef>F</assignToAttributeDef>
            <assignToAttributeDefAssignment>F</assignToAttributeDefAssignment>
            <assignToEffectiveMembership>F</assignToEffectiveMembership>
            <assignToEffectiveMembershipAssignment>F</assignToEffectiveMembershipAssignment>
            <assignToGroup>F</assignToGroup>
            <assignToGroupAssignment>F</assignToGroupAssignment>
            <assignToImmediateMembership>F</assignToImmediateMembership>
            <assignToImmediateMembershipAssignment>F</assignToImmediateMembershipAssignment>
            <assignToMember>F</assignToMember>
            <assignToMemberAssignment>F</assignToMemberAssignment>
            <assignToStem>F</assignToStem>
            <assignToStemAssignment>F</assignToStemAssignment>
        </WsAttributeDef>
        <WsAttributeDef>
            <idIndex>10022</idIndex>
            <extension>legacyGroupTypeDef_GroupeUdl</extension>
            <name>etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl</name>
            <uuid>31b1437c0db84a62ba746a91d5e72589</uuid>
            <attributeDefType>attr</attributeDefType>
            <multiAssignable>F</multiAssignable>
            <multiValued>F</multiValued>
            <valueType>marker</valueType>
            <assignToAttributeDef>F</assignToAttributeDef>
            <assignToAttributeDefAssignment>F</assignToAttributeDefAssignment>
            <assignToEffectiveMembership>F</assignToEffectiveMembership>
            <assignToEffectiveMembershipAssignment>F</assignToEffectiveMembershipAssignment>
            <assignToGroup>F</assignToGroup>
            <assignToGroupAssignment>F</assignToGroupAssignment>
            <assignToImmediateMembership>F</assignToImmediateMembership>
            <assignToImmediateMembershipAssignment>F</assignToImmediateMembershipAssignment>
            <assignToMember>F</assignToMember>
            <assignToMemberAssignment>F</assignToMemberAssignment>
            <assignToStem>F</assignToStem>
            <assignToStemAssignment>F</assignToStemAssignment>
        </WsAttributeDef>
    </wsAttributeDefs>
    <wsAttributeDefNames>
        <WsAttributeDefName>
            <idIndex>10110</idIndex>
            <extension>legacyAttribute_cn-ldap</extension>
            <displayExtension>legacyAttribute_cn-ldap</displayExtension>
            <displayName>etc:legacy:attribute:legacyAttribute_cn-ldap</displayName>
            <name>etc:legacy:attribute:legacyAttribute_cn-ldap</name>
            <uuid>a6a9dd385e004dbaa9003e1caa8eb385</uuid>
            <attributeDefId>2a8e63a0b7904e09b1ed60a191aa9f23</attributeDefId>
            <attributeDefName>etc:legacy:attribute:legacyAttributeDef_GroupeUdl</attributeDefName>
        </WsAttributeDefName>
        <WsAttributeDefName>
            <idIndex>10109</idIndex>
            <extension>legacyGroupType_GroupeUdl</extension>
            <displayExtension>legacyGroupType_GroupeUdl</displayExtension>
            <displayName>etc:legacy:attribute:legacyGroupType_GroupeUdl</displayName>
            <name>etc:legacy:attribute:legacyGroupType_GroupeUdl</name>
            <uuid>f8c151b5a4b148d59c2b27fd2108f060</uuid>
            <attributeDefId>31b1437c0db84a62ba746a91d5e72589</attributeDefId>
            <attributeDefName>etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl</attributeDefName>
        </WsAttributeDefName>
    </wsAttributeDefNames>
    <wsAttributeAssigns>
        <WsAttributeAssign>
            <disallowed>F</disallowed>
            <attributeAssignActionType>immediate</attributeAssignActionType>
            <attributeAssignDelegatable>FALSE</attributeAssignDelegatable>
            <attributeAssignActionId>4f13846014244b31a807ccc34ebb9bd0</attributeAssignActionId>
            <attributeAssignActionName>assign</attributeAssignActionName>
            <attributeAssignType>group</attributeAssignType>
            <attributeDefNameId>f8c151b5a4b148d59c2b27fd2108f060</attributeDefNameId>
            <attributeDefNameName>etc:legacy:attribute:legacyGroupType_GroupeUdl</attributeDefNameName>
            <attributeDefId>31b1437c0db84a62ba746a91d5e72589</attributeDefId>
            <attributeDefName>etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl</attributeDefName>
            <createdOn>2017/02/02 09:56:44.891</createdOn>
            <enabled>T</enabled>
            <id>d42ed00331cb40f6a34a88391c165d9e</id>
            <lastUpdated>2017/02/02 09:56:44.891</lastUpdated>
            <ownerGroupId>b7a7e6ecd49249a492290ce5e99cde84</ownerGroupId>
            <ownerGroupName>UDL:ACT:APP:TEST</ownerGroupName>
        </WsAttributeAssign>
        <WsAttributeAssign>
            <disallowed>F</disallowed>
            <attributeAssignActionType>immediate</attributeAssignActionType>
            <attributeAssignDelegatable>FALSE</attributeAssignDelegatable>
            <attributeAssignActionId>08b5b5c036644014bcf4d0a34fb37420</attributeAssignActionId>
            <attributeAssignActionName>assign</attributeAssignActionName>
            <attributeAssignType>group_asgn</attributeAssignType>
            <attributeDefNameId>a6a9dd385e004dbaa9003e1caa8eb385</attributeDefNameId>
            <attributeDefNameName>etc:legacy:attribute:legacyAttribute_cn-ldap</attributeDefNameName>
            <attributeDefId>2a8e63a0b7904e09b1ed60a191aa9f23</attributeDefId>
            <attributeDefName>etc:legacy:attribute:legacyAttributeDef_GroupeUdl</attributeDefName>
            <wsAttributeAssignValues>
                <WsAttributeAssignValue>
                    <id>ffb8131751a84a04914ab772433df9ab</id>
                    <valueSystem>APP:TEST</valueSystem>
                </WsAttributeAssignValue>
            </wsAttributeAssignValues>
            <createdOn>2017/02/02 09:56:44.958</createdOn>
            <enabled>T</enabled>
            <id>51a0f471efcd4e909a5d081bd719e021</id>
            <lastUpdated>2017/02/02 09:56:44.958</lastUpdated>
            <ownerAttributeAssignId>d42ed00331cb40f6a34a88391c165d9e</ownerAttributeAssignId>
        </WsAttributeAssign>
    </wsAttributeAssigns>
    <resultMetadata>
        <resultCode>SUCCESS</resultCode>
        <resultMessage>, Found 2 results.</resultMessage>
        <success>T</success>
    </resultMetadata>
    <responseMetadata>
        <resultWarnings/>
        <millis>1305</millis>
        <serverVersion>2.3.0</serverVersion>
    </responseMetadata>
    <wsGroups>
        <WsGroup>
            <extension>TEST</extension>
            <typeOfGroup>group</typeOfGroup>
            <displayExtension>TEST</displayExtension>
            <description>TEST Stéphane</description>
            <displayName>Groupes Université de Lille:Groupes Activités:Groupes Applications:TEST</displayName>
            <name>UDL:ACT:APP:TEST</name>
            <uuid>b7a7e6ecd49249a492290ce5e99cde84</uuid>
            <idIndex>10035</idIndex>
        </WsGroup>
    </wsGroups>
    <wsStems/>
    <wsMemberships/>
    <wsSubjects/>
</WsGetAttributeAssignmentsResults>

 

How can i set an attribute that is not present in the result response when i query the assignments on a specific group?

Thanks!

Mathew


niversité de Lille

Mathieu HETRU
Responsable du bureau Web/ENT

Université de Lille - Campus Cité Scientifique
Direction des Systèmes d'Information
Service Intégration / Exploitation
Cellule Web/ENT

Bureau 47 - Bâtiment A3
Domaine universitaire de la Cité Scientifique
Avenue Carl Von Limé
BP 90179 59653 Villeneuve d'Ascq

Tél. :+33 (0)3 62 26 83 81 (numéro interne : 68381)

| www.univ-lille.fr

Le 23/04/2018 à 15:21, Hyzer, Chris a écrit :

If this is an assignment on an assignment, you first need to query to get the attribute assign id where the value is

 

 

[mchyzer@flash pennGroupsClient-2.3.0]$ java -jar grouperClient.jar --operation=getAttributeAssignmentsWs --attributeAssignType=group --includeAssignmentsOnAssignments=true --ownerGroupNames=a:b:c:groupName --debug=true

 

POST /grouperWs/servicesRest/v2_3_000/attributeAssignments HTTP/1.1

Connection: close

Authorization: Basic xxxxxxxxxxxxxxxx

User-Agent: Jakarta Commons-HttpClient/3.1

Host: grouperws.apps.upenn.edu:-1

Content-Length: 321

Content-Type: text/xml; charset=UTF-8

 

<WsRestGetAttributeAssignmentsRequest>

  <attributeAssignType>group</attributeAssignType>

  <wsOwnerGroupLookups>

    <WsGroupLookup>

      <groupName>a:b:c:groupName</groupName>

    </WsGroupLookup>

  </wsOwnerGroupLookups>

  <includeAssignmentsOnAssignments>T</includeAssignmentsOnAssignments>

</WsRestGetAttributeAssignmentsRequest>

 

################ RESPONSE START (indented) ###############

 

HTTP/1.1 200 OK

Date: Mon, 23 Apr 2018 12:43:25 GMT

Set-Cookie: JSESSIONID=xxxxxxxxxxxx; Path=/grouperWs

X-Grouper-resultCode: SUCCESS

X-Grouper-success: T

X-Grouper-resultCode2: NONE

Content-Type: text/xml;charset=UTF-8

Vary: Accept-Encoding

Connection: close

Transfer-Encoding: chunked

Set-Cookie: BIGipServerPFA-grouperws_pool=3810792620.20480.0000; expires=Mon, 23-Apr-2018 18:43:26 GMT; path=/; Httponly; Secure

 

<WsGetAttributeAssignmentsResults>

    <WsAttributeDefName>

      <idIndex>12892</idIndex>

      <extension>legacyAttribute_grouperLoaderQuartzCron</extension>

      <displayExtension>legacyAttribute_grouperLoaderQuartzCron</displayExtension>

      <displayName>etc:legacy:attribute:legacyAttribute_grouperLoaderQuartzCron</displayName>

      <name>etc:legacy:attribute:legacyAttribute_grouperLoaderQuartzCron</name>

      <uuid>ff79e20c06314ee380bb492def9de796</uuid>

      <attributeDefId>ef7039cf58b34783b6b012cc4799073e</attributeDefId>

      <attributeDefName>etc:legacy:attribute:legacyAttributeDef_grouperLoader</attributeDefName>

    </WsAttributeDefName>

    <WsAttributeAssign>

      <disallowed>F</disallowed>

      <attributeAssignActionType>immediate</attributeAssignActionType>

      <attributeAssignDelegatable>FALSE</attributeAssignDelegatable>

      <attributeAssignActionId>d459f64e432e4820a4b79de775fd0ab1</attributeAssignActionId>

      <attributeAssignActionName>assign</attributeAssignActionName>

      <attributeAssignType>group_asgn</attributeAssignType>

      <attributeDefNameId>ff79e20c06314ee380bb492def9de796</attributeDefNameId>

      <attributeDefNameName>etc:legacy:attribute:legacyAttribute_grouperLoaderQuartzCron</attributeDefNameName>

      <attributeDefId>ef7039cf58b34783b6b012cc4799073e</attributeDefId>

      <attributeDefName>etc:legacy:attribute:legacyAttributeDef_grouperLoader</attributeDefName>

      <wsAttributeAssignValues>

        <WsAttributeAssignValue>

          <id>285dd3e3e3bf4f78955a67395de7e8df</id>

          <valueSystem>0 15 7 * * ?</valueSystem>

        </WsAttributeAssignValue>

      </wsAttributeAssignValues>

      <createdOn>2016/07/09 23:06:37.253</createdOn>

      <enabled>T</enabled>

      <id>781992a9dc0e4b58a0202e9b24e94f87</id>

      <lastUpdated>2016/07/09 23:06:37.253</lastUpdated>

      <ownerAttributeAssignId>ddf1e57538af4b3aaf4b0673b5803511</ownerAttributeAssignId>

    </WsAttributeAssign>

  </wsAttributeAssigns>

  <resultMetadata>

    <resultCode>SUCCESS</resultCode>

    <resultMessage>, Found 11 results.  </resultMessage>

    <success>T</success>

  </resultMetadata>

  <responseMetadata>

    <resultWarnings></resultWarnings>

    <millis>590</millis>

    <serverVersion>2.3.0</serverVersion>

  </responseMetadata>

  <wsGroups>

    <WsGroup>

      <extension>groupName</extension>

      <typeOfGroup>group</typeOfGroup>

      <displayExtension>groupName</displayExtension>

      <displayName>a:b:c:groupName</displayName>

      <name> a:b:c:groupName </name>

      <uuid>d836336699e24404a442a1cfb2027a6c</uuid>

      <idIndex>194760</idIndex>

    </WsGroup>

  </wsGroups>

  <wsStems/>

  <wsMemberships/>

  <wsSubjects/>

</WsGetAttributeAssignmentsResults>

 

 

####################################################

Then assign the value:

 

 

[mchyzer@flash pennGroupsClient-2.3.0]$ java -jar grouperClient.jar --operation=assignAttributesWs --attributeAssignOperation=assign_attr --attributeAssignType=group_asgn --ownerAttributeAssignUuids=ddf1e57538af4b3aaf4b0673b5803511 --attributeDefNameNames=penn:etc:legacy:attribute:legacyAttribute_grouperLoaderQuartzCron --attributeAssignValueOperation=replace_values --values0System="0 16 7 * * ?" --debug=true

 

################ REQUEST START (indented) ###############

 

POST /grouperWs/servicesRest/v2_3_000/attributeAssignments HTTP/1.1

Connection: close

Authorization: Basic xxxxxxxxxxxxxxxx

User-Agent: Jakarta Commons-HttpClient/3.1

Host: grouperws.apps.upenn.edu:-1

Content-Length: 707

Content-Type: text/xml; charset=UTF-8

 

<WsRestAssignAttributesRequest>

  <attributeAssignOperation>assign_attr</attributeAssignOperation>

  <attributeAssignValueOperation>replace_values</attributeAssignValueOperation>

  <wsOwnerAttributeAssignLookups>

    <WsAttributeAssignLookup>

      <uuid>ddf1e57538af4b3aaf4b0673b5803511</uuid>

    </WsAttributeAssignLookup>

  </wsOwnerAttributeAssignLookups>

  <values>

    <WsAttributeAssignValue>

      <valueSystem>0 16 7 * * ?</valueSystem>

    </WsAttributeAssignValue>

  </values>

  <attributeAssignType>group_asgn</attributeAssignType>

  <wsAttributeDefNameLookups>

    <WsAttributeDefNameLookup>

      <name>penn:etc:legacy:attribute:legacyAttribute_grouperLoaderQuartzCron</name>

    </WsAttributeDefNameLookup>

  </wsAttributeDefNameLookups>

</WsRestAssignAttributesRequest>

 

################ REQUEST END ###############

 

################ RESPONSE START (indented) ###############

 

HTTP/1.1 200 OK

Date: Mon, 23 Apr 2018 13:09:14 GMT

Set-Cookie: JSESSIONID=xxxxxxxxxxxx; Path=/grouperWs

X-Grouper-resultCode: SUCCESS

X-Grouper-success: T

X-Grouper-resultCode2: NONE

Content-Type: text/xml;charset=UTF-8

Vary: Accept-Encoding

Connection: close

Transfer-Encoding: chunked

Set-Cookie: BIGipServerPFA-grouperws_pool=3861124268.20480.0000; expires=Mon, 23-Apr-2018 19:09:15 GMT; path=/; Httponly; Secure

 

<WsAssignAttributesResults>

  <wsAttributeDefs>

    <WsAttributeDef>

      <idIndex>10046</idIndex>

      <extension>legacyAttributeDef_grouperLoader</extension>

      <name>etc:legacy:attribute:legacyAttributeDef_grouperLoader</name>

      <uuid>ef7039cf58b34783b6b012cc4799073e</uuid>

      <attributeDefType>attr</attributeDefType>

      <multiAssignable>F</multiAssignable>

      <multiValued>F</multiValued>

      <valueType>string</valueType>

      <assignToAttributeDef>F</assignToAttributeDef>

      <assignToAttributeDefAssignment>F</assignToAttributeDefAssignment>

      <assignToEffectiveMembership>F</assignToEffectiveMembership>

      <assignToEffectiveMembershipAssignment>F</assignToEffectiveMembershipAssignment>

      <assignToGroup>F</assignToGroup>

      <assignToGroupAssignment>F</assignToGroupAssignment>

      <assignToImmediateMembership>F</assignToImmediateMembership>

      <assignToImmediateMembershipAssignment>F</assignToImmediateMembershipAssignment>

      <assignToMember>F</assignToMember>

      <assignToMemberAssignment>F</assignToMemberAssignment>

      <assignToStem>F</assignToStem>

      <assignToStemAssignment>F</assignToStemAssignment>

    </WsAttributeDef>

  </wsAttributeDefs>

  <wsAttributeDefNames>

    <WsAttributeDefName>

      <idIndex>12892</idIndex>

      <extension>legacyAttribute_grouperLoaderQuartzCron</extension>

      <displayExtension>legacyAttribute_grouperLoaderQuartzCron</displayExtension>

      <displayName>etc:legacy:attribute:legacyAttribute_grouperLoaderQuartzCron</displayName>

      <name>etc:legacy:attribute:legacyAttribute_grouperLoaderQuartzCron</name>

      <uuid>ff79e20c06314ee380bb492def9de796</uuid>

      <attributeDefId>ef7039cf58b34783b6b012cc4799073e</attributeDefId>

      <attributeDefName>etc:legacy:attribute:legacyAttributeDef_grouperLoader</attributeDefName>

    </WsAttributeDefName>

  </wsAttributeDefNames>

  <wsAttributeAssignResults>

    <WsAssignAttributeResult>

      <wsAttributeAssignValueResults>

        <WsAttributeAssignValueResult>

          <changed>T</changed>

          <deleted>T</deleted>

          <wsAttributeAssignValue>

            <id>285dd3e3e3bf4f78955a67395de7e8df</id>

            <valueSystem>0 15 7 * * ?</valueSystem>

          </wsAttributeAssignValue>

        </WsAttributeAssignValueResult>

        <WsAttributeAssignValueResult>

          <changed>T</changed>

          <deleted>F</deleted>

          <wsAttributeAssignValue>

            <id>4b6c8b5df143448994ceaf6aed68856c</id>

            <valueSystem>0 16 7 * * ?</valueSystem>

          </wsAttributeAssignValue>

        </WsAttributeAssignValueResult>

      </wsAttributeAssignValueResults>

      <wsAttributeAssigns>

        <WsAttributeAssign>

          <disallowed>F</disallowed>

          <attributeAssignActionType>immediate</attributeAssignActionType>

          <attributeAssignDelegatable>FALSE</attributeAssignDelegatable>

          <attributeAssignActionId>d459f64e432e4820a4b79de775fd0ab1</attributeAssignActionId>

          <attributeAssignActionName>assign</attributeAssignActionName>

          <attributeAssignType>group_asgn</attributeAssignType>

          <attributeDefNameId>ff79e20c06314ee380bb492def9de796</attributeDefNameId>

          <attributeDefNameName>etc:legacy:attribute:legacyAttribute_grouperLoaderQuartzCron</attributeDefNameName>

          <attributeDefId>ef7039cf58b34783b6b012cc4799073e</attributeDefId>

          <attributeDefName>etc:legacy:attribute:legacyAttributeDef_grouperLoader</attributeDefName>

          <wsAttributeAssignValues>

            <WsAttributeAssignValue>

              <id>4b6c8b5df143448994ceaf6aed68856c</id>

              <valueSystem>0 16 7 * * ?</valueSystem>

            </WsAttributeAssignValue>

          </wsAttributeAssignValues>

          <createdOn>2016/07/09 23:06:37.253</createdOn>

          <enabled>T</enabled>

          <id>781992a9dc0e4b58a0202e9b24e94f87</id>

          <lastUpdated>2016/07/09 23:06:37.253</lastUpdated>

          <ownerAttributeAssignId>ddf1e57538af4b3aaf4b0673b5803511</ownerAttributeAssignId>

        </WsAttributeAssign>

      </wsAttributeAssigns>

      <changed>F</changed>

      <valuesChanged>T</valuesChanged>

      <deleted>F</deleted>

    </WsAssignAttributeResult>

  </wsAttributeAssignResults>

  <resultMetadata>

    <resultCode>SUCCESS</resultCode>

    <resultMessage>, Found 1 results.  </resultMessage>

    <success>T</success>

  </resultMetadata>

  <responseMetadata>

    <resultWarnings></resultWarnings>

    <millis>1216</millis>

    <serverVersion>2.3.0</serverVersion>

  </responseMetadata>

  <wsGroups/>

  <wsStems/>

  <wsMemberships/>

  <wsSubjects/>

</WsAssignAttributesResults>

 

 

 

 

 

 

 

 

From: Mathieu HETRU []
Sent: Monday, April 23, 2018 3:58 AM
To: Hyzer, Chris ;
Subject: Re: [grouper-users] webservice to get custom attributes on a group ?

 

no.. in the sample, there is not an example with value for assignment.


niversité de Lille

Mathieu HETRU
Responsable du bureau Web/ENT

Université de Lille - Campus Cité Scientifique
Direction des Systèmes d'Information
Service Intégration / Exploitation
Cellule Web/ENT

Bureau 47 - Bâtiment A3
Domaine universitaire de la Cité Scientifique
Avenue Carl Von Limé
BP 90179 59653 Villeneuve d'Ascq

Tél. :+33 (0)3 62 26 83 81 (numéro interne : 68381)

| www.univ-lille.fr

Le 20/04/2018 à 23:21, Hyzer, Chris a écrit :

I think from your followup email you figured this out right?

 

From: [] On Behalf Of Mathieu HETRU
Sent: Friday, April 20, 2018 11:56 AM
To:
Subject: Re: [grouper-users] webservice to get custom attributes on a group ?

 

Thanks!

But i wish set a value for a specific attribute and the documentation don't show the value : https://github.com/Internet2/grouper/blob/master/grouper-ws/grouper-ws/doc/samples/assignAttributes/WsSampleAssignAttributesRest_json.txt

Any idea?

 

 


niversité de Lille

Mathieu HETRU
Responsable du bureau Web/ENT

Université de Lille - Campus Cité Scientifique
Direction des Systèmes d'Information
Service Intégration / Exploitation
Cellule Web/ENT

Bureau 47 - Bâtiment A3
Domaine universitaire de la Cité Scientifique
Avenue Carl Von Limé
BP 90179 59653 Villeneuve d'Ascq

Tél. :+33 (0)3 62 26 83 81 (numéro interne : 68381)

| www.univ-lille.fr

Le 16/04/2018 à 16:23, Hyzer, Chris a écrit :

Thanks Carey!

 

This reminds me that using the grouperClient on the command line in debug mode is a great way to get examples of web service calls

> and next can i set a value of one parameter? you think?

You mean set the value of an attribute?  Yes, use the assign attribute

 

https://spaces.internet2.edu/display/Grouper/Assign+Attributes

 

Thanks

Chris

 

From: [] On Behalf Of Mathieu HETRU
Sent: Sunday, April 15, 2018 12:28 PM
To:
Subject: Re: [grouper-users] webservice to get custom attributes on a group ?

 

Yes!!!!!

It works!!!!!

 

POST /grouper-ws/servicesRest/v2_2_000/attributeAssignments

{
  "WsRestGetAttributeAssignmentsRequest":{
    "attributeAssignType":"group",
    "includeAssignmentsOnAssignments":"T",
    "wsOwnerGroupLookups":[
      {
        "uuid":"d23ba637504f47699f3265e28f9c262f"
      }
    ]
  }
}

 

 

and it returns :

{
    "WsGetAttributeAssignmentsResults": {
        "responseMetadata": {
            "millis": "247",
            "serverVersion": "2.3.0"
        },
        "resultMetadata": {
            "resultCode": "SUCCESS",
            "resultMessage": ", Found 4 results.",
            "success": "T"
        },
        "wsAttributeAssigns": [
            {
                "attributeAssignActionId": "4f13846014244b31a807ccc34ebb9bd0",
                "attributeAssignActionName": "assign",
                "attributeAssignActionType": "immediate",
                "attributeAssignDelegatable": "FALSE",
                "attributeAssignType": "group",
                "attributeDefId": "31b1437c0db84a62ba746a91d5e72589",
                "attributeDefName": "etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl",
                "attributeDefNameId": "f8c151b5a4b148d59c2b27fd2108f060",
                "attributeDefNameName": "etc:legacy:attribute:legacyGroupType_GroupeUdl",
                "createdOn": "2018/02/15 11:50:17.295",
                "disallowed": "F",
                "enabled": "T",
                "id": "c073b0f6fd144c0c867f35b28bdb1808",
                "lastUpdated": "2018/02/15 11:50:17.295",
                "ownerGroupId": "d23ba637504f47699f3265e28f9c262f",
                "ownerGroupName": "UDL:ACT:LISTE:DAF:daf-budget"
            },
            {
                "attributeAssignActionId": "08b5b5c036644014bcf4d0a34fb37420",
                "attributeAssignActionName": "assign",
                "attributeAssignActionType": "immediate",
                "attributeAssignDelegatable": "FALSE",
                "attributeAssignType": "group_asgn",
                "attributeDefId": "2a8e63a0b7904e09b1ed60a191aa9f23",
                "attributeDefName": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
                "attributeDefNameId": "a6a9dd385e004dbaa9003e1caa8eb385",
                "attributeDefNameName": "etc:legacy:attribute:legacyAttribute_cn-ldap",
                "createdOn": "2018/02/15 11:50:17.321",
                "disallowed": "F",
                "enabled": "T",
                "id": "37b535aaa83c4d259ff2e75fc9f3009e",
                "lastUpdated": "2018/02/15 11:50:17.321",
                "ownerAttributeAssignId": "c073b0f6fd144c0c867f35b28bdb1808",
                "wsAttributeAssignValues": [
                    {
                        "id": "ac7e88131ccd4a148caf65323a5ae3e5",
                        "valueSystem": "LISTE:daf-budget"
                    }
                ]
            },
            {
                "attributeAssignActionId": "08b5b5c036644014bcf4d0a34fb37420",
                "attributeAssignActionName": "assign",
                "attributeAssignActionType": "immediate",
                "attributeAssignDelegatable": "FALSE",
                "attributeAssignType": "group_asgn",
                "attributeDefId": "2a8e63a0b7904e09b1ed60a191aa9f23",
                "attributeDefName": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
                "attributeDefNameId": "748eaf7646f44615a895ae88173d37b1",
                "attributeDefNameName": "etc:legacy:attribute:legacyAttribute_nom-liste",
                "createdOn": "2018/02/15 12:41:23.981",
                "disallowed": "F",
                "enabled": "T",
                "id": "122c499dff5244ea93992d82cb31e311",
                "lastUpdated": "2018/02/15 12:41:23.981",
                "ownerAttributeAssignId": "c073b0f6fd144c0c867f35b28bdb1808",
                "wsAttributeAssignValues": [
                    {
                        "id": "5e9859ee6d1f4be69cb5d770bc3c969b",
                        "valueSystem":
                    }
                ]
            },
            {
                "attributeAssignActionId": "08b5b5c036644014bcf4d0a34fb37420",
                "attributeAssignActionName": "assign",
                "attributeAssignActionType": "immediate",
                "attributeAssignDelegatable": "FALSE",
                "attributeAssignType": "group_asgn",
                "attributeDefId": "2a8e63a0b7904e09b1ed60a191aa9f23",
                "attributeDefName": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
                "attributeDefNameId": "1a6e253e68484f72b011d38e1d7ed476",
                "attributeDefNameName": "etc:legacy:attribute:legacyAttribute_type-liste",
                "createdOn": "2018/02/15 12:41:24.019",
                "disallowed": "F",
                "enabled": "T",
                "id": "13e54f4a7d1d46728028e4966cd54bf6",
                "lastUpdated": "2018/02/15 12:41:24.019",
                "ownerAttributeAssignId": "c073b0f6fd144c0c867f35b28bdb1808",
                "wsAttributeAssignValues": [
                    {
                        "id": "1292545691004c618e14c9c942711287",
                        "valueSystem": "classique"
                    }
                ]
            }
        ],
        "wsAttributeDefNames": [
            {
                "attributeDefId": "2a8e63a0b7904e09b1ed60a191aa9f23",
                "attributeDefName": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
                "displayExtension": "legacyAttribute_cn-ldap",
                "displayName": "etc:legacy:attribute:legacyAttribute_cn-ldap",
                "extension": "legacyAttribute_cn-ldap",
                "idIndex": "10110",
                "name": "etc:legacy:attribute:legacyAttribute_cn-ldap",
                "uuid": "a6a9dd385e004dbaa9003e1caa8eb385"
            },
            {
                "attributeDefId": "2a8e63a0b7904e09b1ed60a191aa9f23",
                "attributeDefName": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
                "displayExtension": "legacyAttribute_nom-liste",
                "displayName": "etc:legacy:attribute:legacyAttribute_nom-liste",
                "extension": "legacyAttribute_nom-liste",
                "idIndex": "10113",
                "name": "etc:legacy:attribute:legacyAttribute_nom-liste",
                "uuid": "748eaf7646f44615a895ae88173d37b1"
            },
            {
                "attributeDefId": "2a8e63a0b7904e09b1ed60a191aa9f23",
                "attributeDefName": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
                "displayExtension": "legacyAttribute_type-liste",
                "displayName": "etc:legacy:attribute:legacyAttribute_type-liste",
                "extension": "legacyAttribute_type-liste",
                "idIndex": "10112",
                "name": "etc:legacy:attribute:legacyAttribute_type-liste",
                "uuid": "1a6e253e68484f72b011d38e1d7ed476"
            },
            {
                "attributeDefId": "31b1437c0db84a62ba746a91d5e72589",
                "attributeDefName": "etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl",
                "displayExtension": "legacyGroupType_GroupeUdl",
                "displayName": "etc:legacy:attribute:legacyGroupType_GroupeUdl",
                "extension": "legacyGroupType_GroupeUdl",
                "idIndex": "10109",
                "name": "etc:legacy:attribute:legacyGroupType_GroupeUdl",
                "uuid": "f8c151b5a4b148d59c2b27fd2108f060"
            }
        ],
        "wsAttributeDefs": [
            {
                "assignToAttributeDef": "F",
                "assignToAttributeDefAssignment": "F",
                "assignToEffectiveMembership": "F",
                "assignToEffectiveMembershipAssignment": "F",
                "assignToGroup": "F",
                "assignToGroupAssignment": "F",
                "assignToImmediateMembership": "F",
                "assignToImmediateMembershipAssignment": "F",
                "assignToMember": "F",
                "assignToMemberAssignment": "F",
                "assignToStem": "F",
                "assignToStemAssignment": "F",
                "attributeDefType": "attr",
                "extension": "legacyAttributeDef_GroupeUdl",
                "idIndex": "10023",
                "multiAssignable": "F",
                "multiValued": "F",
                "name": "etc:legacy:attribute:legacyAttributeDef_GroupeUdl",
                "uuid": "2a8e63a0b7904e09b1ed60a191aa9f23",
                "valueType": "string"
            },
            {
                "assignToAttributeDef": "F",
                "assignToAttributeDefAssignment": "F",
                "assignToEffectiveMembership": "F",
                "assignToEffectiveMembershipAssignment": "F",
                "assignToGroup": "F",
                "assignToGroupAssignment": "F",
                "assignToImmediateMembership": "F",
                "assignToImmediateMembershipAssignment": "F",
                "assignToMember": "F",
                "assignToMemberAssignment": "F",
                "assignToStem": "F",
                "assignToStemAssignment": "F",
                "attributeDefType": "attr",
                "extension": "legacyGroupTypeDef_GroupeUdl",
                "idIndex": "10022",
                "multiAssignable": "F",
                "multiValued": "F",
                "name": "etc:legacy:attribute:legacyGroupTypeDef_GroupeUdl",
                "uuid": "31b1437c0db84a62ba746a91d5e72589",
                "valueType": "marker"
            }
        ],
        "wsGroups": [
            {
                "description": "Membres du service Budget de la DAF",
                "displayExtension": "daf-budget",
                "displayName": "Groupes Université de Lille:Groupes Activités:Listes:DAF:daf-budget",
                "extension": "daf-budget",
                "idIndex": "12789",
                "name": "UDL:ACT:LISTE:DAF:daf-budget",
                "typeOfGroup": "group",
                "uuid": "d23ba637504f47699f3265e28f9c262f"
            }
        ],
        "wsMemberships": [
        ],
        "wsStems": [
        ],
        "wsSubjects": [
        ]
    }
}

 

 

great! i can script a script perl in command line which calls the webservice grouper in rest protocol in order to get the value of one attribute in the parameter of the script command line...

i need the uuid of the group, i can get this from the webservice findgroups.

 

and next can i set a value of one parameter? you think?

 

Thanks!

 


niversité de Lille

Mathieu HETRU
Responsable du bureau Web/ENT

Université de Lille - Campus Cité Scientifique
Direction des Systèmes d'Information
Service Intégration / Exploitation
Cellule Web/ENT

Bureau 47 - Bâtiment A3
Domaine universitaire de la Cité Scientifique
Avenue Carl Von Limé
BP 90179 59653 Villeneuve d'Ascq

Tél. :+33 (0)3 62 26 83 81 (numéro interne : 68381)

| www.univ-lille.fr

Le 15/04/2018 à 14:21, Black, Carey M. a écrit :

Mathieu,

 

I have not tracked through he code… but… this part of the request looks very odd to me.:

 

{
  "WsRestGetAttributeAssignmentsRequest":{

    "wsOwnerGroupLookups":[
      {

        "uuid":""
      }
    ]
  }
}

 

 

Based on the v2.3 wsdl the uuid in the xs:complexType name="WsGroupLookup Is nillable. So you should be able to not include that in the request. ( Or set it to the right value. Whatever that is. )

 

Maybe the code is using the UUID supplied instead of the name? ( Both should be “primary keys”, but in this case they would not point to the same thing in grouper. So I don’t know what the code should/would do. )

 

Just a wild guess. YMMV.

 

--

Carey Matthew

 

From: On Behalf Of Mathieu HETRU
Sent: Sunday, April 15, 2018 6:22 AM
To:
Subject: Re: [grouper-users] webservice to get custom attributes on a group ?

 

I call the webservice with the local account GrouperSystem which is admin account.







Thanks.







Mathieu


Le 15 avr. 2018 à 07:04, Hyzer, Chris <> a écrit :

Are you calling that with a grouper admin account?  Or with an account which can ATTR_READ or ADMIN on the group and READ or ADMIN on the attribute definitions?

 

Thanks

Chris

 

From: [] On Behalf Of Mathieu HETRU
Sent: Saturday, April 14, 2018 6:15 AM
To:
Subject: Re: [grouper-users] webservice to get custom attributes on a group ?

 

i tried with this :

POST /grouper-ws/servicesRest/v2_2_000/attributeAssignments

{
  "WsRestGetAttributeAssignmentsRequest":{
    "attributeAssignType":"group",
    "includeAssignmentsOnAssignments":"T",
    "wsOwnerGroupLookups":[
      {
        "name":"UDL:ACT:LISTE:DAF:daf-budget",
        "uuid":""
      }
    ]
  }
}


but it returns empty response :

{
    "WsGetAttributeAssignmentsResults": {
        "responseMetadata": {
            "millis": "81",
            "serverVersion": "2.3.0"
        },
        "resultMetadata": {
            "resultCode": "SUCCESS",
            "resultMessage": ", Found 0 results.",
            "success": "T"
        },
        "wsAttributeDefNames": [
        ],
        "wsAttributeDefs": [
        ],
        "wsGroups": [
        ],
        "wsMemberships": [
        ],
        "wsStems": [
        ],
        "wsSubjects": [
        ]
    }
}


<image001.png>

Mathieu HETRU
Responsable du bureau Web/ENT

Université de Lille - Campus Cité Scientifique
Direction des Systèmes d'Information
Service Intégration / Exploitation
Cellule Web/ENT

Bureau 47 - Bâtiment A3
Domaine universitaire de la Cité Scientifique
Avenue Carl Von Limé
BP 90179 59653 Villeneuve d'Ascq

Tél. :+33 (0)3 62 26 83 81 (numéro interne : 68381)

| www.univ-lille.fr

Le 14/04/2018 à 11:28, Mathieu HETRU a écrit :

Thanks.

The version of my Grouper is 2.3

I have tested with findgroups webservice but i am not retrieved the custom attributes.

And with the get attribute assignments webservice i don't understand the documentation of the webservice :-(


<image001.png>

Mathieu HETRU
Responsable du bureau Web/ENT

Université de Lille - Campus Cité Scientifique
Direction des Systèmes d'Information
Service Intégration / Exploitation
Cellule Web/ENT

Bureau 47 - Bâtiment A3
Domaine universitaire de la Cité Scientifique
Avenue Carl Von Limé
BP 90179 59653 Villeneuve d'Ascq

Tél. :+33 (0)3 62 26 83 81 (numéro interne : 68381)

| www.univ-lille.fr

Le 13/04/2018 à 19:32, Hyzer, Chris a écrit :

What version of Grouper?

 

If they are the new attribute framework, and marker attributes, you can use:

 

https://spaces.internet2.edu/display/Grouper/Get+Attribute+Assignments

 

If they are legacy type, they will be in the group detail object in the group object with findgroups

 

https://spaces.internet2.edu/display/Grouper/Find+Groups

 

Thanks

Chris

 

 

 

From: [] On Behalf Of Mathieu HETRU
Sent: Friday, April 13, 2018 10:55 AM
To:
Subject: [grouper-users] webservice to get custom attributes on a group ?

 

Hello,

I have added some custom attributes on a group like list-name (for mailing list) and list-type..

I wish to get or set this custom attributes with webservices rest.

But i don't know which webservice to use?

Thanks for your help!

--

<image002.png>

Mathieu HETRU
Responsable du bureau Web/ENT

Université de Lille - Campus Cité Scientifique
Direction des Systèmes d'Information
Service Intégration / Exploitation
Cellule Web/ENT

Bureau 47 - Bâtiment A3
Domaine universitaire de la Cité Scientifique
Avenue Carl Von Limé
BP 90179 59653 Villeneuve d'Ascq

Tél. :+33 (0)3 62 26 83 81 (numéro interne : 68381)

| www.univ-lille.fr

 

 

 

 

 

 

 






Archive powered by MHonArc 2.6.19.

Top of Page