#!/bin/bash

# /*
# Licensed Materials - Property of IBM
# 5900-A2A
# © Copyright IBM Corporation 2020. All Rights Reserved.
# This sample program is provided AS IS and may be used, executed, copied and modified without royalty payment by customer
# (a) for its own instruction and study, (b) in order to develop applications designed to run with an IBM product,
# either for customer's own internal use or for redistribution by customer, as part of such an application, in customer's
# own products.
# */


curl -X POST -k -i 'https://vhostxxx.com/instance/services/groups' -H 'Content-Type: application/json' -H 'Authorization: Basic <Token>' -H 'IBM-CSRF-TOKEN: <csrf_token>' --data '{ 
    "name": "test2924", 
    "base_dn": "cn=groups,O=IBM,C=US", 
    "members": [ 
        { "member_id": "test@us.ibm.com", 
          "type": "user", 
          "base_dn": "cn=users,O=IBM,C=US" 
        },
        { "member_id": "testgroup", 
          "type": "group", 
          "base_dn": "cn=groups,O=IBM,C=US" 
        } 
      ]
    }'
