# Bulk configuration of the IBM MQ endpoints

**URL:** <https://community.dynatrace.com/t/bulk-configuration-of-the-ibm-mq-endpoints/35124>\
**Category:** Extensions\
**Tags:** extensions, ibm-mq\
**Created:** [May 12, 2022, 10:19am UTC](https://community.dynatrace.com/t/bulk-configuration-of-the-ibm-mq-endpoints/35124 "2022-05-12T10:19:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [May 12, 2022, 10:19am UTC](https://community.dynatrace.com/t/bulk-configuration-of-the-ibm-mq-endpoints/35124/1 "2022-05-12T10:19:05Z")

</div>

Dear All,

Is there a way to perform a bulk configuration of the IBM MQ endpoints?  
The customer has to configure 1000+ endpoints with the different names of groups.

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [May 12, 2022, 11:04am UTC](https://community.dynatrace.com/t/bulk-configuration-of-the-ibm-mq-endpoints/35124/2 "2022-05-12T11:04:39Z")

</div>

Yes. As it’s an extension you can write a smalls script that utilizes the&nbsp;[Extensions API](https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/extensions-api/post-instance)&nbsp;to add Endpoints.

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [May 12, 2022, 11:23am UTC](https://community.dynatrace.com/t/bulk-configuration-of-the-ibm-mq-endpoints/35124/3 "2022-05-12T11:23:57Z")

</div>

Hello&nbsp;[@pahofmann](https://community.dynatrace.com/user/22796)

Thank you for your comments. Do you have such type of a script?

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [May 13, 2022, 8:05am UTC](https://community.dynatrace.com/t/bulk-configuration-of-the-ibm-mq-endpoints/35124/4 "2022-05-13T08:05:49Z")

</div>

Nothing I could share really, but it depends on the format the data is in anyway.

It’s a pretty straight forward script and should require only a few lines of code.

1. Create a JSON/YAML with the payload data as a template that you can read as a base for the request payload (can be copied from API explorer)
2. Read the data for the endoints (from a csv/cmdb or where ever it is)
3. Iterate over data
  1. replace values in template
  2. send the request

---

<div class="post-metadata">

**Author:** ![techean](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/techean/32/227_2.png) [@techean](https://community.dynatrace.com/u/techean)\
**Post date:** [May 13, 2022, 9:49am UTC](https://community.dynatrace.com/t/bulk-configuration-of-the-ibm-mq-endpoints/35124/5 "2022-05-13T09:49:04Z")

</div>

we can try an sh similar like below if we support curl operation on api end points

url=“apiendpoint/?q=”

for i in&nbsp;&nbsp;$(caturl.txt);do  
content=“$(curl -s “$url/$i”)”  
echo “$content” \>\> output.txt  
done

Where caturl.txt will include all endpoints that needed to be updated in next lines.
