...
Environment Access Information
ENV | UNC | WWWFILES | URL | DB |
---|---|---|---|---|
Dev |
| | ||
Acc | https://catcappsxwwwappstestext.tc.gc.ca/Saf-Sec-Sur/2/NAPA-SNAPA_API/swagger/index.html |
| ||
AccProd |
|
| https://wwwappstestextwwwapps.tc.gc.ca/Saf-Sec-Sur/2/NAPA-SNAPA_API/swagger/index.html |
|
Note: the dev server dev don’t doesn’t have a certificate to work with https.
Azure Resources
Resource | Development | Production |
---|---|---|
Resource Group | ||
App Registration | ||
Key Vault | ( | civav-prod-kv-apsd-paps |
...
➕ points | ➖ points |
Integration with Azure (Azure AD and possibility with KeyVault) | VPN dependency |
Using the last version for software development platform | Oracle connection dependency |
Not scalable because is inside IIS | |
30% of the app's power is being used | |
Availability not guaranteed 24/7 |
...
This same API, one time in the cloud, all negative points will be removed automatically.
...
Azure configuration
The redirect URL from the API needs to be registered on app registration
The option Access tokens need to be activated
In Exposed API, add a scope
Give access to your client ID
In API permissions, grant access to your scope
This configuration will be used in your API
To configure your endpoint, you can see from here
API Access
Open the API in development (see the address up)
Click on Authorize
Select the scope and click on Authorize again. The Microsoft login page will open and you need to enter your credentials as MSTeams.
After that, you can try to execute an API
How to Publish NAPA-SNAPA API
Clone the repository: https://dev.azure.com/transport-canada/DSD-CIVAV Support/_git/NAPA-SNAPA_API
Open Visual Studio Code
Configure the appsettings.json file according to your azure configuration
Open a terminal and type:
Code Block dotnet publish -c Release
For development,
dotnet publish
is enough.At the end of the process, you have a path to find your files
Open the path and copy and paste the files in the server
How to refresh NAPA-SNAPA API token
Go the portal- Add off-line access permission.
2- Update the API security
Update Refresh token url with the token url