4 Creating REST APIs For GP GP Tech 2018

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 20

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf

Creating RESTful Web APIs for


Dynamics GP With ASP.NET Core ?
Steve Endow
Microsoft MVP
Email: steveendow@gmail.com
Twitter: @steveendow
Blog: DynamicsGPLand.blogspot.com

ASP.NET Core sample code:


http://bit.ly/GPWebAPI
Speculation…

With the increasing popularity of


SaaS solutions, Dynamics GP
customers will increasingly need
the ability to consume and expose
data via HTTP / Web APIs

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Your Mission
Dynamics GP 2013 customer
Uses 3rd Party Logistics (3PL) warehouse and a
BPM / BPA solution for integrations
Wants to call a GP web API to update SOP Orders
No GP integration infrastructure
• Item, Qty Shipped, Qty Backordered
• Shipper, Tracking Number
Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf
Options?
GP Web Services
Service Based Architecture
Custom web API
Integration tool ?
Other ?

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Dynamics GP Web Service API
Customers requesting modern GP web service
Customers & vendors using non-MS platforms
GP on premise and on Azure
Limited set of integrations and queries

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Why ASP.NET Core
Latest MS web development framework
Extremely powerful, flexible, extensible
Use latest plugins via NuGet
Rapid development, minimal code
Lightweight and fast, simple and easy deployments

…But it has a steep initial learning curve

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


.NET Core 2.1 String Performance
Bing decreased server
latency by 34%

String functions up to
10x faster

https://blogs.msdn.microsoft.com/dotnet/2018/08/20/bing-com-runs-on-net-core-2-1/
https://dotnetcoretutorials.com/2018/08/22/are-string-equals-and-string-indexof-that-much-faster-in-net-core-2-1/

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Learning ASP.NET Core - Pluralsight

Caution: Courses often emphasize multi-platform and EF Core


Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf
ASP.NET Core books
Nate Barbettini (free eBook)
https://www.recaffeinate.co/book/

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Sample Web
API

ASP.NET Core
eConnect
EFCore & SQL data access

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Alternatives?
What if the customer only needs 1 or 2 endpoints?
Azure Functions
Cache data to Azure or SQL staging table
Traditional asynchronous eConnect integration

Avoid deploying, hosting, maintaining on-prem web


service

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf
Even Simpler ?
Microsoft Flow HTTP endpoint?

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


No Code Web Service Endpoint

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Flow HTTP Request: Instant Web API
Just Paste A JSON Payload

{
"firstName": "Sally",
"lastName": "Swanson",
"emailAddress": "sally@bigcorp.com",
"phone1": "212-555-1212"
}

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Flow HTTP
Request

Can a no code web service


endpoint serve as a web API?

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Caveats
Asynchronous integrations
Simple and consistent JSON
Limited HTTP response (202 Accepted)
Inbound data only?

Error handling & fault tolerance needs research

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


Questions?

Email: steveendow@gmail.com
Twitter: @steveendow
Blog: DynamicsGPLand.blogspot.com

Dynamics GP Tech Conference | Fargo, ND | August 20–22, 2018 | #GPTechConf


© 2017 Dynamic Communities. All rights reserved.

You might also like