Install and configure the management REST APIs in BizTalk Server
What are management data APIs
Management data APIs are endpoints that let you remotely update, add, and query the status of different artifacts in your BizTalk Server environment. The endpoints are added using REST, and come with a swagger definition.
Starting with BizTalk Server 2016 Feature Pack 1, there's a Windows PowerShell script that installs these REST APIs, and their swagger definitions. These APIs make REST calls to remotely manage ports, orchestrations, partners, agreements, pipelines, and more.
To see the available APIs, please refer to the REST API reference.
Prerequisites
Install Feature Pack 2 or newer feature pack on your BizTalk Server.
Install IIS on the BizTalk Server. In most BizTalk Server environments, IIS is already installed. See Hardware and Software Requirements for BizTalk Server 2016. Confirm IIS is installed by opening Internet Information Services Manager.
Step 1: Install the REST APIs
Run Windows PowerShell as Administrator (Start menu > type PowerShell > right click > Run as administrator).
Go to the BizTalk installation folder (for example, type:
cd 'C:\Program Files (x86)\Microsoft BizTalk Server 2016\'
).In the following text, replace
Default Web Site
,mgmtServiceAppPool
,domain/user
,password
, anddomain\group
with your values:FeaturePack.ConfigureServices.ps1 -Service management -WebSiteName '<Default Web Site>' -ApplicationPool <mgmtServiceAppPool> -ApplicationPoolUser <domain>\<user> -ApplicationPoolUserPassword <password> -AuthorizationRoles '<domain>\<group>, <domain>\<group>'
In the following example, we use the
Default Web Site
, create an application pool namedRESTAppPool
, run the appPool as thebootcampbts2016\btsservice
account, useBIZTALK-serviceacct
as the user account password, and give the BizTalk Server Administrators group permissions. Be sure to enter the following, including the single quotes surrounding values with spaces:FeaturePack.ConfigureServices.ps1 -Service management -WebSiteName 'Default Web Site' -ApplicationPool RESTAppPool -ApplicationPoolUser bootcampbts2016\btsservice -ApplicationPoolUserPassword BIZTALK-serviceacct -AuthorizationRoles 'BOOTCAMPBTS2016\BizTalk Server Administrators'
When complete, the BizTalkManagementService application is created within IIS:
To confirm it’s working, browse to
http://localhost/BizTalkManagementService/swagger
. If you are prompted to sign-in, sign in with an account that is member of the domain\group you entered in the previous step (-AuthorizationRoles 'BOOTCAMPBTS2016\BizTalk Server Administrators'
).
Warning
The BizTalkManagementService application in IIS uses a web.config file. Elements within web.config are case sensitive. So when you execute the Windows PowerShell script, be sure to enter the correct case for -AuthorizationRoles
value. If you’re not sure of the case, here’s an easy way to find out:
- Open Computer Management, and expand Local Users and Groups.
- Select Groups, and scroll down to the SQLServer… groups.
- In the following example, notice BOOTCAMPBTS2016 is in all caps. If you see all caps, then enter the computer name in all caps.
Now that the REST APIs are exposed through IIS, they can be accessed and executed by other applications. The REST API reference lists the APIs.
You can change who has access by manually updating the web.config file, which is in the root folder of the management application. For example, use the following to allow anyone access to the swagger output:
<authorization>
<allow users="*" />
</authorization>
Step 2: Test the APIs
On the BizTalk Server, browse to
http://localhost/BizTalkManagementService/swagger
.Scroll to Hosts, and select Show/Hide. There is a GET command; click this row:
It shows the details. Select Try it out:
The Response Body returns all the hosts:
Note
If you browse to http://localhost/BizTalkManagementService
, you should get a 500 error. That’s a good thing. Just add /swagger
to the end of URL, and you’ll see the available REST APIs.