From 81c96e1ee959697c1aecf5c28f2344454b7b1305 Mon Sep 17 00:00:00 2001 From: MartinezAvellan Date: Mon, 23 Sep 2024 18:32:11 +0200 Subject: [PATCH] refactor: update postman renamed references of instrument to asset :hammer: --- postman/MIDAZ DEV.postman_environment.json | 6 +- postman/MIDAZ DOCKER.postman_environment.json | 63 ++++++++++++++ postman/MIDAZ.postman_collection.json | 85 ++++++++++--------- 3 files changed, 111 insertions(+), 43 deletions(-) create mode 100644 postman/MIDAZ DOCKER.postman_environment.json diff --git a/postman/MIDAZ DEV.postman_environment.json b/postman/MIDAZ DEV.postman_environment.json index 23aaf7bc..7fec2dc1 100644 --- a/postman/MIDAZ DEV.postman_environment.json +++ b/postman/MIDAZ DEV.postman_environment.json @@ -1,5 +1,5 @@ { - "id": "4226f211-ca04-48d4-a479-2326811f4ab0", + "id": "a4de639e-e165-487b-9174-72453f9461cb", "name": "MIDAZ DEV", "values": [ { @@ -46,6 +46,6 @@ } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2024-05-09T13:40:41.474Z", - "_postman_exported_using": "Postman/11.0.6" + "_postman_exported_at": "2024-09-23T16:28:46.351Z", + "_postman_exported_using": "Postman/11.13.1" } \ No newline at end of file diff --git a/postman/MIDAZ DOCKER.postman_environment.json b/postman/MIDAZ DOCKER.postman_environment.json new file mode 100644 index 00000000..ec94f3ca --- /dev/null +++ b/postman/MIDAZ DOCKER.postman_environment.json @@ -0,0 +1,63 @@ +{ + "id": "434adbd7-a34f-40e5-b444-7e3346ff23aa", + "name": "MIDAZ DOCKER", + "values": [ + { + "key": "url", + "value": "http://127.0.0.1:3000", + "type": "default", + "enabled": true + }, + { + "key": "url_transaction", + "value": "http://127.0.0.1:3005", + "type": "default", + "enabled": true + }, + { + "key": "organization_id", + "value": "", + "type": "default", + "enabled": true + }, + { + "key": "ledger_id", + "value": "", + "type": "default", + "enabled": true + }, + { + "key": "product_id", + "value": "", + "type": "default", + "enabled": true + }, + { + "key": "portfolio_id", + "value": "", + "type": "default", + "enabled": true + }, + { + "key": "asset_id", + "value": "", + "type": "default", + "enabled": true + }, + { + "key": "account_id", + "value": "", + "type": "default", + "enabled": true + }, + { + "key": "transaction_id", + "value": "", + "type": "default", + "enabled": true + } + ], + "_postman_variable_scope": "environment", + "_postman_exported_at": "2024-09-23T16:28:39.204Z", + "_postman_exported_using": "Postman/11.13.1" +} \ No newline at end of file diff --git a/postman/MIDAZ.postman_collection.json b/postman/MIDAZ.postman_collection.json index 5610c4fa..29139299 100644 --- a/postman/MIDAZ.postman_collection.json +++ b/postman/MIDAZ.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "4af684d1-4e4d-4e08-89c8-97988f119d9d", + "_postman_id": "ec34e093-8513-46c6-8d9c-c82f2c467d95", "name": "MIDAZ", "description": "# ๐Ÿš€ Get started here\n\nThis template guides you through CRUD operations (GET, POST, PUT, DELETE), variables, and tests.\n\n## ๐Ÿ”– **How to use this template**\n\n#### **Step 1: Send requests**\n\nRESTful APIs allow you to perform CRUD operations using the POST, GET, PUT, and DELETE HTTP methods.\n\nThis collection contains each of these [request](https://learning.postman.com/docs/sending-requests/requests/) types. Open each request and click \"Send\" to see what happens.\n\n#### **Step 2: View responses**\n\nObserve the response tab for status code (200 OK), response time, and size.\n\n#### **Step 3: Send new Body data**\n\nUpdate or add new data in \"Body\" in the POST request. Typically, Body data is also used in PUT request.\n\n```\n{\n \"name\": \"Add your name in the body\"\n}\n\n ```\n\n#### **Step 4: Update the variable**\n\nVariables enable you to store and reuse values in Postman. We have created a [variable](https://learning.postman.com/docs/sending-requests/variables/) called `base_url` with the sample request [https://postman-api-learner.glitch.me](https://postman-api-learner.glitch.me). Replace it with your API endpoint to customize this collection.\n\n#### **Step 5: Add tests in the \"Tests\" tab**\n\nTests help you confirm that your API is working as expected. You can write test scripts in JavaScript and view the output in the \"Test Results\" tab.\n\n\n\n## ๐Ÿ’ช Pro tips\n\n- Use folders to group related requests and organize the collection.\n- Add more [scripts](https://learning.postman.com/docs/writing-scripts/intro-to-scripts/) in \"Tests\" to verify if the API works as expected and execute workflows.\n \n\n## ๐Ÿ’กRelated templates\n\n[API testing basics](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=e9a37a28-055b-49cd-8c7e-97494a21eb54&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719) \n[API documentation](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=e9c28f47-1253-44af-a2f3-20dce4da1f18&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719) \n[Authorization methods](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=31a9a6ed-4cdf-4ced-984c-d12c9aec1c27&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719)", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", @@ -341,7 +341,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers?metadata.chave=teste&limit=5&page=1", + "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers?limit=5&page=1", "host": [ "{{url}}" ], @@ -355,7 +355,8 @@ { "key": "metadata.chave", "value": "teste", - "description": "Search on MongoDB" + "description": "Search on MongoDB", + "disabled": true }, { "key": "limit", @@ -541,7 +542,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/assets?metadata.chave=bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlf&limit=2&page=1", + "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/assets?limit=2&page=1", "host": [ "{{url}}" ], @@ -557,7 +558,8 @@ { "key": "metadata.chave", "value": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlf", - "description": "Search on MongoDB" + "description": "Search on MongoDB", + "disabled": true }, { "key": "limit", @@ -603,33 +605,6 @@ } }, "response": [] - }, - { - "name": "Accounts", - "request": { - "method": "DELETE", - "header": [], - "body": { - "mode": "formdata", - "formdata": [] - }, - "url": { - "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/assets/{{asset_id}}", - "host": [ - "{{url}}" - ], - "path": [ - "v1", - "organizations", - "{{organization_id}}", - "ledgers", - "{{ledger_id}}", - "assets", - "{{asset_id}}" - ] - } - }, - "response": [] } ] }, @@ -734,7 +709,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/portfolios?metadata.chave=teste&limit=2&page=1", + "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/portfolios?limit=10&page=1", "host": [ "{{url}}" ], @@ -750,11 +725,12 @@ { "key": "metadata.chave", "value": "teste", - "description": "Search on MongoDB" + "description": "Search on MongoDB", + "disabled": true }, { "key": "limit", - "value": "2", + "value": "10", "description": "Default 10" }, { @@ -934,7 +910,7 @@ "formdata": [] }, "url": { - "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/products?metadata.chave=metadata_chave&limit=5&page=1", + "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/products?limit=5&page=1", "host": [ "{{url}}" ], @@ -950,7 +926,8 @@ { "key": "metadata.chave", "value": "metadata_chave", - "description": "Search on MongoDB" + "description": "Search on MongoDB", + "disabled": true }, { "key": "limit", @@ -1053,7 +1030,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"assetCode\": \"BRL\",\n \"name\": \"{{$randomBankAccountName}}\",\n \"alias\": \"Wallet {{$randomBankAccount}}\",\n \"type\": \"deposit\",\n //\"parentAccountId\": \"{{account_id}}\",\n //\"entityId\": \"{{$randomUUID}}\", //optional\n \"productId\": \"{{product_id}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Account\",\n \"allowSending\": true,\n \"allowReceiving\": false\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", + "raw": "{\n \"assetCode\": \"BRL\",\n \"name\": \"{{$randomBankAccountName}}\",\n \"alias\": \"Wallet {{$randomBankAccount}}\",\n \"type\": \"deposit\",\n //\"parentAccountId\": \"{{account_id}}\",\n //\"entityId\": \"{{$randomUUID}}\", //optional\n \"productId\": \"{{product_id}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Account\",\n \"allowSending\": true,\n \"allowReceiving\": true\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -1131,7 +1108,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/portfolios/{{portfolio_id}}/accounts?metadata.chave=xuxa&limit=2&page=1", + "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/portfolios/{{portfolio_id}}/accounts?limit=2&page=1", "host": [ "{{url}}" ], @@ -1149,7 +1126,8 @@ { "key": "metadata.chave", "value": "xuxa", - "description": "Search on MongoDB" + "description": "Search on MongoDB", + "disabled": true }, { "key": "limit", @@ -1226,6 +1204,33 @@ } }, "response": [] + }, + { + "name": "Accounts by by asset id", + "request": { + "method": "DELETE", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "url": { + "raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/assets/{{asset_id}}", + "host": [ + "{{url}}" + ], + "path": [ + "v1", + "organizations", + "{{organization_id}}", + "ledgers", + "{{ledger_id}}", + "assets", + "{{asset_id}}" + ] + } + }, + "response": [] } ] }