Developer forum

Forum » Development » Enabling WebAPI in 9.10.x

Enabling WebAPI in 9.10.x

Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hello,

I'm trying to use the new headless WebAPI, but I'm not sure where to get started.

The release notes (http://doc.dynamicweb.com/downloads/releases/release-notes/dw-9-10-release-notes) mention that it's self documenting at yourwebsite.com/dwapi/docs. However, I get a 404 when visting /dwapi/docs on my 9.10.0 site.

I tried the walkthrough here: http://doc.dynamicweb.com/extensibility/guides/how-to-build-a-dw-spa. However, that throws an exception on the homepage, which occurs when calling /dwapi/content/areas/1. I'm getting a 404 there too. I confirmed that I still have SHOP1 with ShopAutoId=1 on this site so I assume I don't need to change the Id.

Do I need to specifically enable WebAPI somehow?

Thanks,

Scott

 


Replies

 
Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply
This post has been marked as an answer

I recently upgraded to 9.10.0 and out of the box the /dwapi/docs was working so there is no specific setup that you should need to do.

Votes for this answer: 1
 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Thanks Unnsteinn. That's what I needed to hear. With that in mind, I did more troubleshooting and I had missed bringing over the following element in the <handlers /> section in web.config during the upgrade:

      <add name="NSwag" path="dwapi" verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

After bringing that over, I now have the the Swagger self documenting docs.

Thanks.

Scott 

 

You must be logged in to post in the forum