Develop > API calls > Artifact APIs > Add groups to an organization

Add groups to an organization

Add groups to an organization.

URI Method Parameters Returns
http://[host]:[port]/csa/rest/artifact/{organizationID}/group POST
  • Organization ID
  • User ID - Required; the user ID you want to use as credentials for this API call.
  • XML request body

200 - successful
401 - not authorized
404 - object not found
500 - internal server error

Note that the role must be specified for each group in the request body. The following are valid roles:

  • CODAR_APPLICATION_ARCHITECT
  • CODAR_APPLICATION_DEVELOPER
  • CODAR_APPLICATION_QA
  • CODAR_APPLICATION_RELEASE_MANAGER

Example

The following URL was sent:

https://localhost:port/csa/rest/artifact/8a81818f3d1421e7013d1423635a0003/group?userIdentifier=90d96588360da0c701360da0f1d5f483

The following XML was sent:

<GroupList>
  <group>
   <displayName>My-Group-Name</displayName>
   <distinguishedName>
      cn=TestConsumer,ou=CodarApplicationDeveloper,ou=CodarGroups
    </distinguishedName>
   <role>
      <name>CODAR_APPLICATION_DEVELOPER</name>
   </role>
  </group>
  <group>
    <displayName>Another-Group-Name</displayName>
    <distinguishedName>
     cn=TestConsumer2,ou=CodarApplicationDeveloper,ou=CodarGroups
   </distinguishedName>
   <role>
     <name>CODAR_APPLICATION_DEVELOPER</name>
   </role>
 </group>
</GroupList>

The following XML was returned:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GroupList>
  <count>2</count>
  <limit>2</limit>
  <group>
    <isCriticalSystemObject>false</isCriticalSystemObject>
    <name>My-Group-Name</name>
     <displayName>My-Group-Name</displayName>
    <disabled>false</disabled>
     <distinguishedName>
      cn=TestConsumer,ou=CodarApplicationDeveloper,ou=CodarGroups
     </distinguishedName>
     <role>
       <isCriticalSystemObject>false</isCriticalSystemObject>
       <name>CODAR_APPLICATION_DEVELOPER</name>
       <disabled>false</disabled>
     </role>
   </group>
   <group>
      <isCriticalSystemObject>false</isCriticalSystemObject>
     <name>Another-Group-Name</name>
     <displayName>Another-Group-Name</displayName>
     <disabled>false</disabled>
     <distinguishedName>
       cn=TestConsumer2,ou=CodarApplicationDeveloper,ou=CodarGroups
    </distinguishedName>
     <role>
       <isCriticalSystemObject>false</isCriticalSystemObject>
       <name>CODAR_APPLICATION_DEVELOPER</name>
       <disabled>false</disabled>
     </role>
   </group>
</GroupList>