Compare commits

...

2 Commits

Author SHA1 Message Date
db424f620d Updated examples 2024-04-30 00:41:28 +02:00
326f683e64 Added MQ upgrade 2024-04-29 18:37:44 +02:00
3 changed files with 105 additions and 24 deletions

View File

@@ -1,17 +1,74 @@
## POST /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue
```bash
# New queue from scratch
curl --insecure --header 'Content-Type: application/json' \
-X POST --header 'Accept: application/json' \
-d '{ \
"name": "RLN.TEST.QUEUE", \
"type": "QLOCAL" \
}' \
'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue'
curl -X POST 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue' \
--insecure \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'ibm-mq-rest-csrf-token: value' \
-u admin:passw0rd \
--data-binary @- << EOF
{
"name": "API.QUEUE.1",
"type": "local"
}
EOF
```
## POST /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue&like={existing queue name}
```bash
# New queue like DEV.QUEUE.1
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \
"name": "RLN.TEST.QUEUE", \
"type": "QLOCAL" \
}' 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?like=DEV.QUEUE.1'
```
curl -X POST 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?like=DEV.QUEUE.1' \
--insecure \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'ibm-mq-rest-csrf-token: value' \
-u admin:passw0rd \
--data-binary @- << EOF
{
"name": "API.QUEUE.2",
"type": "local"
}
EOF
```
## POST /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue&like=<existing queue name>
```bash
# New queue like DEV.QUEUE.1 replacing a few values
curl -X POST 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?like=DEV.QUEUE.1' \
--insecure \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'ibm-mq-rest-csrf-token: value' \
-u admin:passw0rd \
--data-binary @- << EOF
{
"name": "API.QUEUE.3",
"type": "local",
"storage": {
"maximumDepth": 10,
"pageSet": 5,
"maximumMessageLength": 50,
"messageDeliverySequence": "FIFO"
},
"trigger": {
"depth": 1,
"processName": "API.QUEUE.2.PROCESS",
"enabled": true
},
"events": {
"depth": {
"lowPercentage": 0,
"highPercentage": 0,
"lowEnabled": true,
"fullEnabled": true,
"highEnabled": true
}
}
}
EOF
```
## Expected result
Status: 201 Created
Status: 400 Bad Request

View File

@@ -1,20 +1,24 @@
### GET /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue
## GET /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue
```bash
# Get all queues
curl -X GET \
--insecure --header 'Accept: application/json' \
-u admin:passw0rd \
'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue'
curl -X GET 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue' \
--insecure \
--header 'Accept: application/json' \
-u admin:passw0rd
```
## GET /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue?name={queue name or wildcard}
```bash
# Get all DEV* queues
curl -X GET \
--insecure --header 'Accept: application/json' \
-u admin:passw0rd \
'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?name=DEV*'
curl -X GET 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?name=DEV*' \
--insecure \
--header 'Accept: application/json' \
-u admin:passw0rd
```
## Expected output
### Search for all queues, or queues that does exist.
### A search for all queues, or queues that does exist.
Status: 200 OK
```json
{
@@ -39,7 +43,7 @@ Status: 200 OK
}
```
### Search for queue that doesn't exist
### A search for queue that doesn't exist
Status: 200 OK
```json
{

View File

@@ -21,8 +21,9 @@ docker run \
--publish 1414:1414 \
--publish 9157:9157 \
--publish 9443:9443 \
--restart unless-stopped \
--volume qm1data:/mnt/mqm \
icr.io/ibm-messaging/mq:latest
icr.io/ibm-messaging/mq:9.3.5.1-r1
# Inside the container
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
@@ -36,6 +37,25 @@ exit
# Restart container
docker restart QM1
# Upgrade MQ
docker stop QM1
docker rm QM1
docker run \
--detach \
--env LICENSE=accept \
--env MQ_ADMIN_PASSWORD=passw0rd \
--env MQ_APP_PASSWORD=passw0rd \
--env MQ_DEV=true \
--env MQ_ENABLE_METRICS=true \
--env MQ_QMGR_NAME=QM1 \
--name QM1 \
--publish 1414:1414 \
--publish 9157:9157 \
--publish 9443:9443 \
--restart unless-stopped \
--volume qm1data:/mnt/mqm \
icr.io/ibm-messaging/mq:9.3.5.1-r1 # Use a newer version.
```
## Webconsole / Swagger UI
* https://localhost:9443/ibmmq/console/#/