API Connections
- Traian Nemes (Unlicensed)
- Le, Michelle
API keys and tokens can be found here: RDIMS #17999814
API | DEV | ACC | TRAINING | PROD | Info |
---|
API | DEV | ACC | TRAINING | PROD | Info |
---|---|---|---|---|---|
NAPA API (OAuth) | |||||
MTOA | |||||
Service Inventory |
| ||||
Service Performance |
| ||||
Time Management |
|
How-to Update API Custom Connectors
PowerApps custom connectors only work with Swagger version 2 definitions.
Go to the ACC environment of the API and copy the swagger.json text.
Add
/swagger/v2/swagger.json
to the end of the API URLExcept for MTAPI: https://wwwappstestext.tc.gc.ca/Saf-Sec-Sur/13/MTAPI/swagger/docs/v1
Open the APSD-PAPS repo and find the appropriate JSON file.
~
Custom Connectors > JSON > [API].json
Paste the json from step 1 into the file.
Revert any changes made to the following properties, but update the version in the description if it has changed. The title needs to stay the same as this is used inside the Canvas app code. Host and basePath are set to environment variables so that the connectors don’t need to be updated during each deployment.
"swagger": "2.0", "info": { "title": "MTAPI", "description": "MTOA Web Service APIs (v3.1.2.479)", "version": "v1" }, "host": "@environmentVariables(\"ap_TCExternal_Host\")", "basePath": "/@environmentVariables(\"ap_MTAPI_BasePath\")"
Open the Power Apps studio (ap-dev-tcd365 env) and go to the Custom Connectors.
For the connector you want to update, click on
...
→Update from OpenAPI file
.Click
Import
and select the correct file, then clickContinue
.You will be brought to the connector details screen, click
Update connector
.
The following steps seem to be necessary to get the Canvas app to recognize the updated connector.
Go into the APSD-PAPS Canvas app editor.
Click on the
Data
tab ->...
beside the connector you've updated ->Remove
.Click
Add data
and re-add the custom connector.Save the canvas app.
Sometimes the secrets need to be updated for the NAPA API (e.g. if they expire).
Redirect URL shown above then needs to be added to the Redirect URIs in the App Reg in Azure if not already there.
Notes
MTAPI has 2 sets of environments: one for internal only & one that can be accessed outside of TC
The external one uses Kanga - http://wwwappstestext.tc.gc.ca
PowerApps is considered external, thus APSD connects to the Kanga environments
The JWT token is different for the 2 environments
When are API calls made in the Canvas App?
File | Modified | |
---|---|---|
PDF File AP Canvas - Expenses.pdf |
Mar 01, 2022 by Le, Michelle | |
PDF File AP Canvas - Invoices.pdf |
Mar 01, 2022 by Le, Michelle | |
PDF File AP Canvas - Service Requests.pdf |
Dec 08, 2022 by Le, Michelle | |
Microsoft Excel Spreadsheet AP Service Standard Statuses.xlsx |
Mar 01, 2022 by Le, Michelle | |
PNG File image-20230126-191521.png |
Jan 26, 2023 by Le, Michelle | |
PNG File image-20230127-005757.png |
Jan 27, 2023 by Le, Michelle | |
PNG File image-20240412-134646.png |
Apr 12, 2024 by Le, Michelle | |
PNG File image-20240412-134829.png |
Apr 12, 2024 by Le, Michelle |
Service Performance