generated from pagopa/template-payments-java-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
994353a
commit 53a3328
Showing
1 changed file
with
388 additions
and
0 deletions.
There are no files selected for viewing
388 changes: 388 additions & 0 deletions
388
src/test/postman/P4PA-PDND-Service API.postman_collection.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,388 @@ | ||
{ | ||
"info": { | ||
"_postman_id": "07c1f103-1e5f-44fe-a5e3-00126c6ece77", | ||
"name": "P4PA-PDND-Service API", | ||
"description": "API and Models.", | ||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | ||
"_exporter_id": "29646859", | ||
"_collection_link": "https://crimson-zodiac-456704.postman.co/workspace/Personal-Workspace~7804a326-503c-4623-9152-3f4c38f2d060/collection/29646859-07c1f103-1e5f-44fe-a5e3-00126c6ece77?action=share&source=collection_link&creator=29646859" | ||
}, | ||
"item": [ | ||
{ | ||
"name": "01.token", | ||
"item": [ | ||
{ | ||
"name": "01_getAuthToken", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"var jsonData = pm.response.json();\r", | ||
"pm.collectionVariables.set(\"token\", jsonData.accessToken);" | ||
], | ||
"type": "text/javascript", | ||
"packages": {} | ||
} | ||
} | ||
], | ||
"request": { | ||
"auth": { | ||
"type": "noauth" | ||
}, | ||
"method": "POST", | ||
"header": [], | ||
"url": { | ||
"raw": "{{baseUrlAuth}}/auth/token?client_id=piattaforma-unitaria&grant_type=urn:ietf:params:oauth:grant-type:token-exchange&subject_token=e1d9c534-86a9-4039-80da-8aa7a33ac9e7&subject_issuer=soak-test&subject_token_type=FAKE-AUTH&scope=openid&client_secret", | ||
"host": [ | ||
"{{baseUrlAuth}}" | ||
], | ||
"path": [ | ||
"auth", | ||
"token" | ||
], | ||
"query": [ | ||
{ | ||
"key": "client_id", | ||
"value": "piattaforma-unitaria" | ||
}, | ||
{ | ||
"key": "grant_type", | ||
"value": "urn:ietf:params:oauth:grant-type:token-exchange" | ||
}, | ||
{ | ||
"key": "subject_token", | ||
"value": "e1d9c534-86a9-4039-80da-8aa7a33ac9e7" | ||
}, | ||
{ | ||
"key": "subject_issuer", | ||
"value": "soak-test" | ||
}, | ||
{ | ||
"key": "subject_token_type", | ||
"value": "FAKE-AUTH" | ||
}, | ||
{ | ||
"key": "scope", | ||
"value": "openid" | ||
}, | ||
{ | ||
"key": "client_secret", | ||
"value": null | ||
} | ||
] | ||
} | ||
}, | ||
"response": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "02.citizen", | ||
"item": [ | ||
{ | ||
"name": "02_getCitizenData", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"pm.test(\"PDND - 02_getCitizenData - Responses with 200\", function () {\r", | ||
" pm.response.to.have.status(200);\r", | ||
"});\r", | ||
"\r", | ||
"pm.test(\"MyPay - 02_getCitizenData - check response and reading citizen data\", function () {\r", | ||
" let jsonResponse = pm.response.json();\r", | ||
"\r", | ||
" pm.expect(jsonResponse).to.have.property(\"firstName\", \"Julieta\");\r", | ||
" pm.expect(jsonResponse).to.have.property(\"lastName\", \"Lindgren\");\r", | ||
" pm.expect(jsonResponse).to.have.property(\"dateOfBirth\", \"1975-02-09\");\r", | ||
" \r", | ||
" pm.expect(jsonResponse).to.have.property(\"address\");\r", | ||
" pm.expect(jsonResponse.address).to.have.property(\"street\", \"106 Hansen Mountains\");\r", | ||
" pm.expect(jsonResponse.address).to.have.property(\"city\", \"West Aurelio\");\r", | ||
" pm.expect(jsonResponse.address).to.have.property(\"postalCode\", \"36495-0217\");\r", | ||
" pm.expect(jsonResponse.address).to.have.property(\"country\", \"Heard Island and McDonald Islands\");\r", | ||
"});\r", | ||
"" | ||
], | ||
"type": "text/javascript", | ||
"packages": {} | ||
} | ||
} | ||
], | ||
"request": { | ||
"method": "GET", | ||
"header": [ | ||
{ | ||
"key": "Accept", | ||
"value": "application/json" | ||
} | ||
], | ||
"url": { | ||
"raw": "{{baseUrlPdnd}}/anpr-service-e002/citizen?fiscalCode={{fiscalCode}}", | ||
"host": [ | ||
"{{baseUrlPdnd}}" | ||
], | ||
"path": [ | ||
"anpr-service-e002", | ||
"citizen" | ||
], | ||
"query": [ | ||
{ | ||
"key": "fiscalCode", | ||
"value": "{{fiscalCode}}" | ||
} | ||
] | ||
}, | ||
"description": "Returns detailed information about a citizen based on their fiscal code." | ||
}, | ||
"response": [ | ||
{ | ||
"name": "OK", | ||
"originalRequest": { | ||
"method": "GET", | ||
"header": [ | ||
{ | ||
"key": "Accept", | ||
"value": "application/json" | ||
}, | ||
{ | ||
"key": "Authorization", | ||
"value": "Bearer <token>", | ||
"description": "Added as a part of security scheme: bearer" | ||
} | ||
], | ||
"url": { | ||
"raw": "{{baseUrl}}/anpr-service-e002/citizen?fiscalCode=<string>", | ||
"host": [ | ||
"{{baseUrl}}" | ||
], | ||
"path": [ | ||
"anpr-service-e002", | ||
"citizen" | ||
], | ||
"query": [ | ||
{ | ||
"key": "fiscalCode", | ||
"value": "<string>", | ||
"description": "(Required) The fiscal code of the citizen" | ||
} | ||
] | ||
} | ||
}, | ||
"status": "OK", | ||
"code": 200, | ||
"_postman_previewlanguage": "json", | ||
"header": [ | ||
{ | ||
"key": "Content-Type", | ||
"value": "application/json" | ||
} | ||
], | ||
"cookie": [], | ||
"body": "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n }\n}" | ||
}, | ||
{ | ||
"name": "Invalid request", | ||
"originalRequest": { | ||
"method": "GET", | ||
"header": [ | ||
{ | ||
"key": "Authorization", | ||
"value": "Bearer <token>", | ||
"description": "Added as a part of security scheme: bearer" | ||
} | ||
], | ||
"url": { | ||
"raw": "{{baseUrl}}/anpr-service-e002/citizen?fiscalCode=<string>", | ||
"host": [ | ||
"{{baseUrl}}" | ||
], | ||
"path": [ | ||
"anpr-service-e002", | ||
"citizen" | ||
], | ||
"query": [ | ||
{ | ||
"key": "fiscalCode", | ||
"value": "<string>", | ||
"description": "(Required) The fiscal code of the citizen" | ||
} | ||
] | ||
} | ||
}, | ||
"status": "Bad Request", | ||
"code": 400, | ||
"_postman_previewlanguage": "text", | ||
"header": [], | ||
"cookie": [], | ||
"body": "" | ||
}, | ||
{ | ||
"name": "Forbidden", | ||
"originalRequest": { | ||
"method": "GET", | ||
"header": [ | ||
{ | ||
"key": "Authorization", | ||
"value": "Bearer <token>", | ||
"description": "Added as a part of security scheme: bearer" | ||
} | ||
], | ||
"url": { | ||
"raw": "{{baseUrl}}/anpr-service-e002/citizen?fiscalCode=<string>", | ||
"host": [ | ||
"{{baseUrl}}" | ||
], | ||
"path": [ | ||
"anpr-service-e002", | ||
"citizen" | ||
], | ||
"query": [ | ||
{ | ||
"key": "fiscalCode", | ||
"value": "<string>", | ||
"description": "(Required) The fiscal code of the citizen" | ||
} | ||
] | ||
} | ||
}, | ||
"status": "Forbidden", | ||
"code": 403, | ||
"_postman_previewlanguage": "text", | ||
"header": [], | ||
"cookie": [], | ||
"body": "" | ||
}, | ||
{ | ||
"name": "Citizen not found", | ||
"originalRequest": { | ||
"method": "GET", | ||
"header": [ | ||
{ | ||
"key": "Authorization", | ||
"value": "Bearer <token>", | ||
"description": "Added as a part of security scheme: bearer" | ||
} | ||
], | ||
"url": { | ||
"raw": "{{baseUrl}}/anpr-service-e002/citizen?fiscalCode=<string>", | ||
"host": [ | ||
"{{baseUrl}}" | ||
], | ||
"path": [ | ||
"anpr-service-e002", | ||
"citizen" | ||
], | ||
"query": [ | ||
{ | ||
"key": "fiscalCode", | ||
"value": "<string>", | ||
"description": "(Required) The fiscal code of the citizen" | ||
} | ||
] | ||
} | ||
}, | ||
"status": "Not Found", | ||
"code": 404, | ||
"_postman_previewlanguage": "text", | ||
"header": [], | ||
"cookie": [], | ||
"body": "" | ||
}, | ||
{ | ||
"name": "Internal server error", | ||
"originalRequest": { | ||
"method": "GET", | ||
"header": [ | ||
{ | ||
"key": "Authorization", | ||
"value": "Bearer <token>", | ||
"description": "Added as a part of security scheme: bearer" | ||
} | ||
], | ||
"url": { | ||
"raw": "{{baseUrl}}/anpr-service-e002/citizen?fiscalCode=<string>", | ||
"host": [ | ||
"{{baseUrl}}" | ||
], | ||
"path": [ | ||
"anpr-service-e002", | ||
"citizen" | ||
], | ||
"query": [ | ||
{ | ||
"key": "fiscalCode", | ||
"value": "<string>", | ||
"description": "(Required) The fiscal code of the citizen" | ||
} | ||
] | ||
} | ||
}, | ||
"status": "Internal Server Error", | ||
"code": 500, | ||
"_postman_previewlanguage": "text", | ||
"header": [], | ||
"cookie": [], | ||
"body": "" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"auth": { | ||
"type": "bearer", | ||
"bearer": [ | ||
{ | ||
"key": "token", | ||
"value": "Bearer {{token}}", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"event": [ | ||
{ | ||
"listen": "prerequest", | ||
"script": { | ||
"type": "text/javascript", | ||
"packages": {}, | ||
"exec": [ | ||
"" | ||
] | ||
} | ||
}, | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"type": "text/javascript", | ||
"packages": {}, | ||
"exec": [ | ||
"" | ||
] | ||
} | ||
} | ||
], | ||
"variable": [ | ||
{ | ||
"key": "baseUrlPdnd", | ||
"value": "https://hub.internal.dev.p4pa.pagopa.it/p4papdnd" | ||
}, | ||
{ | ||
"key": "fiscalCode", | ||
"value": "DNTCRL65S67M126K", | ||
"type": "string" | ||
}, | ||
{ | ||
"key": "token", | ||
"value": "", | ||
"type": "string" | ||
}, | ||
{ | ||
"key": "baseUrlAuth", | ||
"value": "https://api.dev.p4pa.pagopa.it/payhub-auth", | ||
"type": "string" | ||
} | ||
] | ||
} |