Getting Started Serviceapi (include Commerce)

Installation

1. Install via nuget Episerver.ServiceAPI (or Commerce)
2. Update-Epidatabase to prevent this error
3. If we are using identity authorization: (add this in Startup)
app.UseServiceApiIdentityTokenAuthorization<ApplicationUserManager<SiteUser>, SiteUser>();
4. Disable ssl and maphttpattributeroutes (there might be an error "A route named 'MS_attributerouteWebApi' is already in the route collection")
<add key="episerver:serviceapi:requiressl" value="false" />
<add key="episerver:serviceapi:maphttpattributeroutes" value="false" />
Note: Do NOT remove maphttpattributeroutes of the site => as it might cause issue with Dependency Resolver

Testing

  • get token
  • get relations
http://localhost:52244/episerverapi/commerce/entries/36127195/entryrelations
  • import assets
=> don't check Content-Type
  • Listing entries:
  • A zipped Quicksilver that installed service api

Comments

Popular posts from this blog

Optimizely Content Graph: minimal setup for testing

Episerver ServiceAPI: Example of how-to properly call the media upload

SameSite Cookie login troubleshooting