Good morning! we're running a little late if
You may have noticed. We're going to try to get that a
Bit back on track i'm a bit tired, i am, too, i'm matt cam
Farmer i am a program manager in the azure integration team which
Includes logic apps and a few other things and with me is mel,
And we're here to talk to you today, we're going to do a demo
That shows you simple things you can do with logic apps.
There is an enormous amount to learn, which you can learn today
At a session later on. So we're going to talk today
About zero to hero api development with api management & logic apps. Let's jump into that.
This section is really about a problem and the problem is this.
Let's say one day you're in the development team, you manage
Your organization's apis and applications and one day somebody in the business comes
To you and says you know what? i found this amazing agency
That's going to do a new app, it's fantastic, i hope you don't
Mind i've gone ahead and told them to get on with it and they
Were expensive, it's going to be awesome, by the way, they start
Today can you give them the api they need to be able to build
Your new ordering application, they're charging by the hour.
I've worked in it departments where that has absolutely been the case.
We're going to show you how quickly you can use azure
Integration technologies to build a solution to that probe
That unblocks the agency and gets the api starting to be used
And implements it efficiently and quickly with azure logic apps.
So what we're going to build, we're going to use api to mock
An api, create responses for that api and then use them
Within the application so that team can build their application
Quick and easily. Then we're going to implement
That api with logic apps and i'm going to show you how you can
String together things in logic apps to create a new operation
And implement that within api management so it's a real thing.
So that's the preamble. We're going to show you how to
Build it now. We're going to get on with it.
Oops, no. Great.
>> Hi, everybody, can you hear me? as matt mentioned,
Traditionally, front-end developers always have to wait
For the back-end developers to finish up their code before they
Can code against a new api. So i'm going to show you how
Quickly you can use api management to put together an
Api which immediately unblocks the front-end developers, so i'm
Here in the azure portal, this is the api management instance
For our dog washing business, and let's -- the first thing is
Let's go to the api view, so this is the interface where you
Can manage all your api facades within api management and as you
Can see i have a few apis created here and one of them is
Called "soapy puppy" which is the name of our business and
There are three operations that allows you to get customer
Information and so forth. Let's say we want to add a new
Operation which allows customers to request for a new appointment
Through our mobile app, right, and as a result if this
Operation is successful it will return the cost of the
Appointment. To add a new operation i can
Either click on the "add operation" button here and
Manually provide all metadata including signature, request,
Response, and so forth, but as an http
Enthusist i prefer to use this here.
We click on the pencil button here, and this is an open
Definition for my api and you can see it has a few operations,
And let's go all the way to the bottom and let me switch to my note pad here.
Copy that, switch back, and what
I did -- let me show you quickly.
Here so what i did is that i added a new operation, i defined
A new operation under the suffix, appointment and this new
Operation assumes json and produces json and i also
Provided schemas for the payed load of the request as well as
The response so if we look at the schema for the request you
Can see that it takes five properties including customer
Id, name of the pet, breed of the pet, age and also the zip code.
I also provided an example for this payload and for the
Response. That's simple, p returns one
Property which is a quote for this appointment, right?
Let's click save. Okay so now you can see a new
Operation has been added here. If we click on that the next
Thing we need to do is to enable marking for this operation.
So in my api definition i have provided a sample response for
This operation so we can use -- we can just return that sample
From this operation. Let's go here and click on the
Pencil button and go to the marking tab and enable static
Response and choose the sample response that i provided earlier in the definition.
Okay, so now under this operation it tells me that
Marking is enabled. Let's test this operation.
So we have a test console embedded here and this is the
Sample payload that i provided for the request and let's make
An api call and i immediately get a response from this
Operation, right, so at this point i can unblock my front-end
Twoers while the back-end twoer, matt, is still working on the
Back-end code. Now let me switch back to matt.
>> So we can go in and implement our api now or operations within
It. So the first thing to point out
Is you may or may not be familiar with logic apps and you
May be still are in the -- saw scott as keynote on monday.
One of the things to be point oops, you're not interested in
Those. One thing to point out about
Logic apps is that if you have an
Http-based app it's triggered and from that point on it's an
Operational api so you can use logic apps to build individual
Operations and make them part of your api so i have use the http
Request response template and we have the json schema for the
Input and we have similar for
Output. From this point on this is your
Api operation and you can do whatever you want in between
Those two parts of the logic apps.
If i had, for example, an action, and let's say maps, get
Location by address, let's have a look at that, the items that
I'm passing in the json schema i've defined and properties you
Can use within the logic app. Let's say we passed in a zip
Code in json schema, zip code is available here and i can use it
In the logic app just like anything else that's available
To configure. Let's go to one i prepared
Earlier. I will just walk you through
What sorts of things you can build.
Here is one i prebuilt and it will give you an idea of the
Sort of things you can do if you were building a new api based on technology that you had in your
Business, so, for example, being able to access a legacy system
That is maybe rest based by api or augmenting now with mapping
Data, perhaps sending an email, the sorts of things you might
Want to do every time you build a system based on other
Component parts and logic apps is fantastic for doing that.
If we pluck at the components i have here, we have get location
By address, i'm using a zip code to get an address of the user,
What i've actually got here is calling into an azure function
So logic apps are great for extracting things you do when
You use code, things you don't want to spend lots of time on,
Making requests to other services, why spend time doing
That when you can use logic apps to do that stuff for you and you
Can concentrate on things that really, really matter in terms
Of making your business successful and advancing
Technology so this function here en capsule lates pricing and i'm
Calling it and using it and i've installed this in azure
Management and exposes rest and i'm calling that and
Orchestrating that call and i'm returning a response based on
The value that we got back with a price.
So logic apps, and i'm rushing through this as you can probably
Tell, is a really great way to take those operations, put them
Together, i haven't gone into things like loops and conditions
That you can add to those so you can orchestrate your logic and
Build these operations quick and make them available to use
Within your applications. So the final thing we need to do
Now is just implement the api back within api management.
If you want to do that quickly? >> sure, since we have the
Back-end implemented, we no longer need to use marking if
You're management so the final thing we need to do is switch
The operation to make it connect to the back-end instead of using
Marking so let me go back to the api view.
>> It's going to be slow for you.
>> So let's go to our little api.
And this is new operation that we created and as you can see
Marking is enabled. The first thing, let's go to the
Back end for this operation and as you can see currently it
Points to a place holder end point because we were in marking
So let's switch to azure resource and click the "browse"
Button here and this will show me all my logic apps under my
Azure account. Let me wait for it to load and
Search for the logic app that a message is created.
It's called price, clean puppy
And let's choose the trigger inside that logic app and select
And click save. So now this operation is
Connected to the logic app. The last thing i need to do is
Turn off marking, because we no longer need it. So let's go to marking and turn
It off, save. Okay so now let's test again.
If you remember in my mock, the price was $100 for the puppy,
Right, for the service.
Now since it's connected to logic apps let's see what is the
Price for the appointment. Test, console, again, i'm using
A sample payload for the request and the sent.
Cool, now we get an actual response from the logic app and
The actual price is $83.45 So
Now we have an api in less than five minutes. [Applause]
>> Thank you! there we go!
Right. So this has been a quick
Introduction into some of the things you can do with azure api
Management to build integration in the cloud.
We build marks in the management based on the schema we wanted
Toe define and used logic apps to orchestrate a group of
Components we had or that were available within logic apps to
Quickly build and deploy it. Quick summary, azure allows you
To design and implement your apis in a flexible and effective
Way, take a "design first" approach to unblock your
Front-end developers and spate them from back-be end developers
And put together management to build the operations. We have only scratched the surfaces.
There is integration stuff going on today, we have our big break
Out session at 1 p.M. Where we're going to be announcing
Some new stuff, talking about api management logic apps
Service so please come along to that and come and see us, there
Is a service bus presentation at 1:30 and we have a workshop at
The end of the day today where you can come and sit down and
Play with these technologies and meet the team.
We are on the booth today over in the middle of the auditorium,
We are going to record our logic apps live session there in about
An hour. Come and ask questions, we would
Love to hear more about what you can do with these technologies.
Sorry for rushing through but thank you for sticking with us
And not going to see mark! we appreciate it.