Files
monorepo/LCU.Api.Internal.CoreApiWrapper/postman/README_Postman.md
T
2026-03-31 14:32:23 -05:00

4.5 KiB

Introduction

The Core Api Wrapper postman collection is available to test all endpoints that are part of the Core Api Wrapper solution. Please reach out to your development lead or someone who has access to vault to get any necessary security information setup.

The setup variables are located in the Enviroments section named Core Api Environment and used primarily for the core url and for select endpoints in the Tests section within endpoint see Endpoint Tests Section in this readme.

NOTE: Endpoint Failures

There are a few endpoints where we don't have any supporting variable information to complete a Post request.
In this readme under Supporting Test Information, we have started a list for this and have a way to manually populate necessary values to create new records.

Getting Started

The following tools can be used for Postman testing and supporting data validation:

  1. Postman installed with access credentials
  2. Join LMCU Postman Group (bold-space-847526) https://protect-us.mimecast.com/s/SR6oCNk2PpsZXl73Im81_-?domain=links.getpostman.com
  3. Postman Collection and Environment files available in DevOps and LMCU Postman Group
  4. Swagger endpoint reference QA Core Api Wrapper Url: https://qa-api.lcu-internal.com/core-api-wrapper/swagger/index.html
  5. For DNA Queries and data validation use DBeaver Oracle SQL Tool or equivalent. Use Microsoft SQL Server for LMCU databases.
  6. DNA-UAT application navigation associated to the endpoint can also be used for data validation.

Automated Testing

Postman Endpoints should exist for all endpoints in this project. Run the entire Core Api Collection in Postman by right clicking ellipsis and choosing Run Collection.
You should see all the results of every endpoint, it may take longer for some endpoints to complete, if not you may need to select your environment in Postman upper right and choose Core Api Environment.

Postman environment variables:

coreApiBaseUrl clientId clientSecret updateKeyAccessChannel updateKeyAccessType apiClientName apiClientKey currentDate addressNumber

Postman Pre-request Script for collection

pm.request.headers.add({ key: "ApiKey", value: "{{apiClientKey}}" }) pm.request.headers.add({ key: "Client", value: "{{apiClientName}}" })

Endpoint Tests Section: Example using Environment Variables

Endpoint Name: AccessType: Get - Find Channel Access Type by Person Number

const responseJson = pm.response.json(); const updateKey = responseJson.messageHeader.updateKey; pm.environment.set("updateKeyAccessType", updateKey); pm.globals.set("updateKeyAccessType", updateKey);

pm.test("Status code is 200", function () { pm.response.to.have.status(200); });

Environment Variables Set: The response to this endpoint will populate the updateKey Parameter variable for the Put: Update Person Access Type

{ "accessType": { "id": "WWW", "channelNumber": 491333, "personNumber": 33093, "accessTypeCode": "WWW", "accessTypeDescription": "Internet", "isEnrolled": false, "userId": null, "isPasswordChangeRequiredOnNextLogin": false, "isDisclaimer": false, "isActive": true, "uid": "BS2C00529_491333_33093_WWW", "origin": "A" }, "accessChannelPersonId": "491333_33093", "updateKey": {{updateKeyAccessType}} }

Supporting Test Information

For endpoints that aren't automated with parameter information, this is a reference to manually supply the request parameters and associated endpoint name.

Endpoint: Add Account User Field by Account

DNA Query: Select distinct(ac.acctnbr), ac.currmiaccttypcd from acct ac inner join acctuserfield auf on auf.acctnbr = ac.acctnbr where auf.userfieldcd != 'PROM' and ac.currmiaccttypcd = 'SV01';

--Take one acctnbr returned and place in the appropriate account number parameter.

Endpoint: Add Person User Field

DNA Query: Select distinct(puf.persnbr), pe.firstname, pe.lastname from persuserfield puf inner join pers pe on pe.persnbr = puf.persnbr where puf.userfieldcd != 'PER1' and puf.persnbr > 8000;

--Take one persnbr returned and place in the appropriate person number parameter.

Endpoint: Find Account by Major Minor Branch and Status

--The response will be 204 No Content and should not be considered a failure.

Additional Troubleshooting information

For troubleshooting any DNA Token and Security Token errors responsible for request failures please speak with Development"