Skip to content

Commit

Permalink
Merge pull request #4042 from omnipresent07/update-readme-auth
Browse files Browse the repository at this point in the history
Update postman collection to work for localhost by default
  • Loading branch information
BarakStout authored Mar 18, 2021
2 parents ae8e8be + 2cb043d commit 67ece60
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 94 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1|Bank0|2019|4|Mr. Smug Pockets|555-555-5555|[email protected]|1234 Hocus Potato Way|Tatertown|UT|84096|7|100|01-0123456|B90YWS6AFX2LGWOXJ1LD
1|Bank0|2019|4|Mr. Smug Pockets|555-555-5555|[email protected]|1234 Hocus Potato Way|Tatertown|UT|84096|9|100|01-0123456|B90YWS6AFX2LGWOXJ1LD
2|B90YWS6AFX2LGWOXJ1LD|6U4K4PT78Q3WLZB382LQCB|20190228|2|1|2|2|2|162839|4|20190901|Exempt|Exempt|AR|Exempt|37119|37119002702|14|||||GIGS|2|1||||13NBXYYHPZ8JPD|2|1|27|5|2|3|1|VAFUA30X1C3P036BUSZJX8VVVPBCE46BXE|ND|W7V2I8BHVXH0ISWCFRJO6NYPP|26|1|23||42|6CVRGJ09AT3EPZ58WQ8GTY2MIWBFIBQFUFQ1I5HXC9ERX3H6SWLE47O32TDOIPO7G1H5RCX9BXGZKPP6U873P4|UN0IDMDDFU30Q5NKJHCR430O6U9XN62PDSRFXVYF5R869PS50WFW8CT7LG2MJEVE3NO5VO87TFEUAPWP5SVK4FQ|QY7E5MZ0R7TXJZ7Y3HJD03OV|2|2|1|2|1|2|104|10|NA|0|NA|3|1|8888|8888|9||9||10|||||NA|NA|NA|NA|NA|NA|9|NA|NA|308|1|1111|1111|1111|1111|NA|3|5|11|10|1111|1111|NA|4||3|1|2||16||23|16|9|HGALRTXUQPDXAYMLHCZ753UUEYW1UFBECZHNJC3EE65WZLELANPBZXV9GW2YHP|1111|1111|1111
2|B90YWS6AFX2LGWOXJ1LD|1GA36DLWP2LRX7X3D4G211|20190526|1|1|2|2|1|236609|5|20191014|1234 Hocus Potato Way|Tatertown|AK|09758|06037|06037108101|14|1|11|13|2|V151FZME822HOKN7RW5UYHVL5F7HUT0SAFT2XCW34CO43WA6PEXVH3D4JMIZDLT7DXKJB9NWEUMF5JREKJZC7X8C|2|11|13|||600Y7BYXJ7LIH8CQ8WTEW5H7H3WDTSV2KGSPNDT1T5YS9P4BO8|2|2|6|||||LG1B6F6951J1YUQAUF61NQHGU1A1NOZFISU10XTHJGFHM6S|FDVZV8VXTVYV8036EL3SMPE0WGXTB22RH54HDLFGZTYHUBUMFYDCDK3J9BRH7E|K32G2MBOOTGY7FJ5W3N9JKUERVB055I8DWT|21|26|22|23|5|OURDVTFCPSNXMGG14JJ2E4CH1OZ62CHSWYAA3OVJ|ESG2DVCZTS8T8P751V61FR8|Q4YIF22SVUG1NVUGQETQN5PPOE8OODUYMVG37JJRQKXDMVFG4M|3|3|6|5|2|4|106|47|NA|0|NA|3|2|8888|8888|9||9||10|||||NA|NA|NA|NA|NA|NA|3|NA|NA|87|22|1111|1111|1111|1111|NA|3|5|5|NA|1111|1111|NA|6||||||17||||||1111|1111|1111
2|B90YWS6AFX2LGWOXJ1LD|T0CJ9A5IQA4O7Y3V4ASQP6|20190321|2|2|2|2|2|250371|5|20191211|1234 Hocus Potato Way|Tatertown|UT|53181|06037|06037481603|1|||||D9Q5SB12YV9ZKO6E4NJT56QI1H7MSZATZXW4GZZA9PV76AD2UZE9YTLH9W0R9DO1V7Y3EN5A64|14|11|13||12|AHZLBNP15FBTHAMDQT7A9EUERR76I3H3AS4XXXUWWR4SGIMTX96L3ZMFH3X1TPYE4Z2PLDC3ZQ1UNLKDQ4AR|1|3|3|44|4|22|5|7B1L2MGTHXJLRZ0YCXZOE8JXOS8S|YWA7PNDG2ANS29UJSFCKA9B|7JER|3|||||EZZGC3B2M3MZCDFCSB|O6ZWZ7A85V06QLNJBY155AWVO4AJQVNRUJ6421D44WQ4WQDV5Y71XS3IHSH3HO5DQ6NXC55P0OBFKO|EE05EE8A72Y6XQJPT3HPARH8KWB9XC9B8C4XOK8|2|1|1|2|3|2|37|17|NA|0|NA|3|2|8888|8888|9||9||10|||||NA|NA|NA|NA|NA|NA|5|NA|NA|33|21|1111|1111|1111|1111|NA|3|5|22|15|2|2|NA|5|5|3|4|1|51P2A9P9ID|8|4|16|1|15|6ZBKEHUBZMWUEI7ODM2UEVM3VUON7FLZ51AFGEG7J0VR5J8LCIFUNG991238K86308EWGOPNL9IZD0LUKJFC18OA6BDY56VY6EVMLINQOP8O54BEEXZHOSNVGQD8MUJZHIP6W4V2CQMSPI1V3FBW5QB4IDBSF38VVLSRSVHGULI791KPGGN4AYL5NDAJYITD13W2TB26TRV62F3JQLL5G9555GLZN349XMJCDRKSQ64CFWTLMG4ON62T2MQA|2|1111|2
Expand Down
146 changes: 65 additions & 81 deletions newman/postman/HMDA_API_Filing.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "ff1fab16-688d-4df4-8532-b0cd5a1559c8",
"_postman_id": "26cf9a83-2331-496b-be7b-48c993e43575",
"name": "HMDA API Filing",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
Expand Down Expand Up @@ -36,7 +36,7 @@
{
"listen": "test",
"script": {
"id": "0202aefd-805b-404a-b064-c53d6997dfe7",
"id": "7f40fc9c-a127-45d6-bc7b-989668657423",
"exec": [
"var data = pm.response.json();",
"pm.environment.set(\"TOKEN\", data.access_token);"
Expand Down Expand Up @@ -88,18 +88,60 @@
"response": []
},
{
"name": "Start filing for a year",
"name": "Create an Institution",
"event": [
{
"listen": "test",
"script": {
"id": "bd3d0ed9-2dcc-4433-b2da-64e214184535",
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{TOKEN}}",
"type": "string"
"type": "noauth"
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"activityYear\": 2019,\n \"lei\": \"B90YWS6AFX2LGWOXJ1LD\",\n \"agency\": 9,\n \"institutionType\": -1,\n \"institutionId2017\": \"\",\n \"taxId\": \"01-0123456\",\n \"rssd\": -1,\n \"emailDomains\": [\n \"bank1.com\"\n ],\n \"respondent\": {\n \"name\": \"Bank 0\",\n \"state\": \"\",\n \"city\": \"\"\n },\n \"parent\": {\n \"idRssd\": -1,\n \"name\": \"\"\n },\n \"assets\": -1,\n \"otherLenderCode\": -1,\n \"topHolder\": {\n \"idRssd\": -1,\n \"name\": \"\"\n },\n \"hmdaFiler\": false,\n \"quarterlyFiler\": true,\n \"quarterlyFilerHasFiledQ1\": false,\n \"quarterlyFilerHasFiledQ2\": false,\n \"quarterlyFilerHasFiledQ3\": false\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{URL_ADMIN}}/institutions",
"host": [
"{{URL_ADMIN}}"
],
"path": [
"institutions"
]
},
"description": "Create institution on admin API"
},
"response": []
},
{
"name": "Start filing for a year",
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [
{
Expand Down Expand Up @@ -132,7 +174,7 @@
{
"listen": "test",
"script": {
"id": "ae599a1c-775e-486a-9420-54fca2013114",
"id": "7ccc3d22-c10f-4fae-b0f1-66f2b2b9e7a9",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"SEQUENCE_NUMBER\", jsonData.id.sequenceNumber);"
Expand All @@ -143,19 +185,10 @@
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{TOKEN}}",
"type": "string"
}
]
"type": "noauth"
},
"method": "POST",
"header": [

],
"header": [],
"body": {
"mode": "raw",
"raw": ""
Expand Down Expand Up @@ -217,14 +250,7 @@
"name": "Upload file for submission",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{TOKEN}}",
"type": "string"
}
]
"type": "noauth"
},
"method": "POST",
"header": [
Expand All @@ -241,7 +267,7 @@
{
"key": "file",
"type": "file",
"src": "{{FILE}}"
"src": []
}
],
"options": {
Expand Down Expand Up @@ -271,14 +297,7 @@
"name": "Edits Summary",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{TOKEN}}",
"type": "string"
}
]
"type": "noauth"
},
"method": "GET",
"header": [
Expand Down Expand Up @@ -311,14 +330,7 @@
"name": "Edits Detail",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{TOKEN}}",
"type": "string"
}
]
"type": "noauth"
},
"method": "GET",
"header": [
Expand All @@ -329,7 +341,7 @@
}
],
"url": {
"raw": "{{URL_FILING}}/institutions/{{LEI}}/filings/{{YEAR}}/submissions/{{SEQUENCE_NUMBER}}/edits/{{EDIT_NUMBER}}",
"raw": "{{URL_FILING}}/institutions/{{LEI}}/filings/{{YEAR}}/submissions/{{SEQUENCE_NUMBER}}/edits/Q614",
"host": [
"{{URL_FILING}}"
],
Expand All @@ -341,7 +353,7 @@
"submissions",
"{{SEQUENCE_NUMBER}}",
"edits",
"{{EDIT_NUMBER}}"
"Q614"
]
},
"description": "Edits Summary for a submission"
Expand Down Expand Up @@ -399,14 +411,7 @@
"name": "Verify Quality Edits",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{TOKEN}}",
"type": "string"
}
]
"type": "noauth"
},
"method": "POST",
"header": [
Expand Down Expand Up @@ -442,14 +447,7 @@
"name": "Verify Macro Edits",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{TOKEN}}",
"type": "string"
}
]
"type": "noauth"
},
"method": "POST",
"header": [
Expand Down Expand Up @@ -485,14 +483,7 @@
"name": "Sign ",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{TOKEN}}",
"type": "string"
}
]
"type": "noauth"
},
"method": "POST",
"header": [
Expand Down Expand Up @@ -530,14 +521,7 @@
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{TOKEN}}",
"type": "string"
}
]
"type": "noauth"
},
"method": "GET",
"header": [
Expand Down Expand Up @@ -570,4 +554,4 @@
}
],
"protocolProfileBehavior": {}
}
}
11 changes: 8 additions & 3 deletions newman/postman/HMDA_ENV.postman_environment.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
"id": "60fe1dbe-0c5d-4e3b-a457-51ad551832c4",
"name": "HMDA_ENV_VARS",
"values": [
{
"key": "URL_ADMIN",
"value": "http://localhost:8081",
"enabled": true
},
{
"key": "URL_FILING",
"value": "",
"value": "http://localhost:8080",
"enabled": true
},
{
Expand All @@ -24,12 +29,12 @@
},
{
"key": "LEI",
"value": "",
"value": "B90YWS6AFX2LGWOXJ1LD",
"enabled": true
},
{
"key": "YEAR",
"value": "",
"value": "2018",
"enabled": true
},
{
Expand Down
19 changes: 10 additions & 9 deletions newman/postman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ The HMDA [Postman](https://www.postman.com/) collection has everything you need

## Variables

The variables you will need to set in `HMDA_ENV.postman_environment` are:

- `HMDA_URL_FILING`
- `HMDA_TOKEN_URL`
- `HMDA_USERNAME` Your username
- `HMDA_PASSWORD` Your password
- `LEI` The LEI you are filing for
- `YEAR` The year you are filing for
- `FILE` Full path to file for upload
The variables you will need to set in `HMDA_ENV.postman_environment` are below. If you are running the platform locally, we've provided default values that you can input. The default values can be easily changed in the postman collection once imported

- `URL_ADMIN` (default to be used for localhost: `http://localhost:8081`)
- `URL_FILING` (default to be used for localhost: `http://localhost:8080`)
- `HMDA_TOKEN_URL` (not needed for localhost)
- `HMDA_USERNAME` Your username (not needed for localhost)
- `HMDA_PASSWORD` Your password (not needed for localhost)
- `LEI` The LEI you are filing for (default to be used for localhost: `B90YWS6AFX2LGWOXJ1LD`)
- `YEAR` The year you are filing for (default to be used for localhost: `2018`)
- `FILE` Full path to file for upload

### Notes about the fields

Expand Down

0 comments on commit 67ece60

Please sign in to comment.