diff --git a/create-qlocal.md b/create-qlocal.md index 7861f23..889ceb8 100644 --- a/create-qlocal.md +++ b/create-qlocal.md @@ -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' -``` \ No newline at end of file +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= +```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 \ No newline at end of file diff --git a/display-qlocal.md b/display-qlocal.md index 24aa5ea..d7a207d 100644 --- a/display-qlocal.md +++ b/display-qlocal.md @@ -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 {