During the The Logic Show, we showed off using the Logic API and Nexus via Azure API Management.
This repository includes:
- The source code of the client application demonstrated.
- The definition of the Logic API which was used to deploy it to Azure API Management. This is consumed by the Logic automated deployment tool, called
borg.
The demonstration client is a .Net Core 2.1 console application.
The appsettings.json file includes all the required configuration settings for the application. These must be populated with valid values for the demo application to work.
Logic API related settings:
LogicDemoHost: The Azure API Management instance exposing the Logic APILogicDemoSubscriptionId: The pre-registered Logic subscription with SMS accessLogicDemoApimSubscriptionKey: The associated Azure API Management subscriptionLogicDemoJwtToken: A valid JWT token for accessing the Logic API. This can be generated by accessing the Logic Portal and retrieving the token from the browser.
Nexus API related settings:
NexusDemoHost: The Azure API Management instance exposing the Nexus APINexusDemoApimSubscriptionKey: The associated Azure API Management subscriptionNexusDemoJwtToken: A valid JWT token for accessing the Nexus API. This can be generated by accessing the Nexus SPA website and retrieving the token from the browser.
Yammer API related settings:
YammerBearer: The bearer token supplied by Yammer for your app, linked to your account authorized to access the Yammer message you wish to monitor.
To run, go to the LogicDemo directory and run:
dotnet run --
LogicDemo 1.0.0
Copyright (C) 2018 LogicDemo
ERROR(S):
No verb selected.
ping Ping the service gateway
sms Send an SMS
citizen Get details of citizens
patients Get details of patients
patient Get details of a specific patient
yammer Get details of a yammer message
help Display more information on a specific command.
version Display version information.
To execute the ping command, run:
dotnet run -- ping
The LogicAPI directory and file structure describes the Logic API:
publish.yml: Describes the Logic API as Products and APIsapis: The API definitionslogic: The Logic APIlogic-v1.png: Associated logo shown in the Logic Portallogic-v1.yml: The OpenAPI specification file of the API in YAML formatlogic-v1-policies.xml: The Azure API Management policies applied to the API
products: The product definitionslogic: The Logic productpolicies.xml: The Azure API Management policies applied to the product
To learn more about defining APIs, Products and their associated policies, refer to the Azure API Management documentation. The included publish.yml does not represent the complete schema of the definition file and is also subject to change.
To find out more, visit https://portal.kmdlogic.io or access the Logic group in Yammer.