Updated examples
This commit is contained in:
@@ -1,17 +1,74 @@
|
|||||||
## POST /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue
|
## POST /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue
|
||||||
```bash
|
```bash
|
||||||
# New queue from scratch
|
# New queue from scratch
|
||||||
curl --insecure --header 'Content-Type: application/json' \
|
curl -X POST 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue' \
|
||||||
-X POST --header 'Accept: application/json' \
|
--insecure \
|
||||||
-d '{ \
|
--header 'Content-Type: application/json' \
|
||||||
"name": "RLN.TEST.QUEUE", \
|
--header 'Accept: application/json' \
|
||||||
"type": "QLOCAL" \
|
--header 'ibm-mq-rest-csrf-token: value' \
|
||||||
}' \
|
-u admin:passw0rd \
|
||||||
'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue'
|
--data-binary @- << EOF
|
||||||
|
{
|
||||||
# New queue like DEV.QUEUE.1
|
"name": "API.QUEUE.1",
|
||||||
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \
|
"type": "local"
|
||||||
"name": "RLN.TEST.QUEUE", \
|
}
|
||||||
"type": "QLOCAL" \
|
EOF
|
||||||
}' 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?like=DEV.QUEUE.1'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## POST /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue&like={existing queue name}
|
||||||
|
```bash
|
||||||
|
# New 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
|
||||||
@@ -1,20 +1,24 @@
|
|||||||
### GET /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue
|
## GET /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue
|
||||||
```bash
|
```bash
|
||||||
# Get all queues
|
# Get all queues
|
||||||
curl -X GET \
|
curl -X GET 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue' \
|
||||||
--insecure --header 'Accept: application/json' \
|
--insecure \
|
||||||
-u admin:passw0rd \
|
--header 'Accept: application/json' \
|
||||||
'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue'
|
-u admin:passw0rd
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## GET /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue?name={queue name or wildcard}
|
||||||
|
```bash
|
||||||
# Get all DEV* queues
|
# Get all DEV* queues
|
||||||
curl -X GET \
|
curl -X GET 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?name=DEV*' \
|
||||||
--insecure --header 'Accept: application/json' \
|
--insecure \
|
||||||
-u admin:passw0rd \
|
--header 'Accept: application/json' \
|
||||||
'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?name=DEV*'
|
-u admin:passw0rd
|
||||||
```
|
```
|
||||||
|
|
||||||
## Expected output
|
## Expected output
|
||||||
### Search for all queues, or queues that does exist.
|
### A search for all queues, or queues that does exist.
|
||||||
Status: 200 OK
|
Status: 200 OK
|
||||||
```json
|
```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
|
Status: 200 OK
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user