Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

For questions related to the ASP.NET Web API framework, whether writing APIs to manage content or functionality in Sitecore, or consuming data from APIs written using Web API (e.g., the Sitecore ItemService).

0
votes
0answers
20 views

Using token based JWT authentication for protecting webapi in Sitecore SPA solution

We are attempting to use token based authentication to protect our Sitecore SPA solution. The login system has been implemented using Azure B2C AD and the client-side framework: https://github.com/...
1
vote
1answer
46 views

ServicesApiController in referenced project/DLL

I'm trying to create some web APIs in a new class library outside of my main website project (still in the same solution). In this library I've added the following API Controller: namespace My.Custom....
1
vote
1answer
53 views

How to use Authenticated request with the Sitecore RESTful API

As explained in the official Sitecore documentation, I'm using the following block of code to login into the Sitecore. module.exports = function (context, req) { var XMLHttpRequest = require("...
0
votes
1answer
54 views

I get WFFM form reports is not authorized(api/sitecore/formreports)

Does anyone know why my Sitecore Form-Reports API is not Authorized? Failed to load resource: the server responded with a status of 401 (Unauthorized)
0
votes
1answer
298 views

Sitecore WebApi custom route not working controller not found

Controller: public class ExampleController : Controller { private readonly ISitecoreContext _sitecoreContext; public ExampleController () { } [System.Web.Http.HttpGet] ...
1
vote
2answers
134 views

loading partial view from jquery

I am trying to swap partial views on my home page layout via jquery. I have 3 tabs which when clicked, would load their respective partial view into a placeholder on the main layout. In my ...
0
votes
1answer
74 views

'Unable to connect to SQL Server database.' - webAPI

using: VS-2017(as admin), sitecore-8.1.2 and SQL - 2012. I created a ASP.Net web application - WebAPI to read content from my local sitecore instance. In the "ValuesController.cs" I am using the ...
0
votes
0answers
202 views

After upgrade, getting “The object has not yet been initialized. Ensure that HttpConfiguration.EnsureInitialized() is called”

After completing the upgrade from Sitecore 8.1 Update 3 to Sitecore 8.2 Update 6 on accessing the launchpad, getting the below error. "Message":"An error has occurred.", "ExceptionMessage":"...
1
vote
1answer
176 views

Sitecore JSS integrated mode with subsites

I have created separate bindings for the basic and advanced sample JSS apps as outlined in https://jss.sitecore.net/#/setup/sitecore-config?id=sitecore-configuration 127.0.0.1 JssBasicApp 127.0....
5
votes
2answers
463 views

WebAPI Controllers not being found in Sitecore 8.2

I'm working in a Helix-ish solution on Sitecore 8.2. I can't seem to register any WebAPI controllers. The routes are fine. I've dug pretty far into the GlobalConfiguration and determined that it's ...
3
votes
1answer
195 views

Get user privileges on item via Sitecore RESTful API

I am looking for a good way to figure out what privileges a user has via the Sitecore RESTful API. For example, I can use the RESTful API for ItemService: /sitecore/api/ssc/item/{itemId}?fields=...
0
votes
2answers
101 views

Migrating content from sitecore 7.2

So we need to migrate content from sitecore 7.2 to sitecore 8. But it's not only migrating, we also need to modify the content in order to have updated content in the new instance. Our original ...
0
votes
1answer
297 views

Can I use Sitecore Item Web API to insert items into bucket list from different application

I am in the need to expose a restful api which eventually will insert items to bucket list available in sitecore. This api will be cosnumed by another MVC application to push records into sitecore ...
2
votes
1answer
786 views

Sitecore webapi No HTTP resource was found that matches the request URI (404)

I would like to add some web api to my project but I am getting error that No HTTP resource was found that matches the request URI What I could miss in settings or how I can see all sitecore routs ...
1
vote
5answers
1k views

Web Api controller returning 404 despite returning payload

I have created a WebApi controller, and it's returning the payload OK (i.e. I see the correct response in the browser), however the status of the request is a 404, which obviously causes problems with ...
0
votes
1answer
58 views

Custom web api returns dynamic links for rich text field if logged in to sitecore

I have created a custom web api which converts glass object to json string. The glass object involves rich text field where internal links can be used. The link is fully rendered to absolute path in ...
4
votes
3answers
995 views

ServiceApiController Method not found when using HttpPost and ComplexType (Sitecore 8.1.3)

I am working on refactoring some code and want to create WebApi services to do so. I have created an initialization pipeline that registers custom routes. I am still able to follow base sitecore ssc ...
6
votes
1answer
100 views

Do we have an API for sitecore 6.6

I want to acess the sitecore items from outside context . Do we have an API to acess Sitecore Items in Sitecore 6.6?
2
votes
2answers
491 views

Web API 404 on content delivery server

I am using Sitecore on azure and have a CD and a CM server. The Web API works fine on CM but throws a 404 error (and no more information in logs). I have deleted the following dll files from server ...
0
votes
1answer
234 views

Create users from API

We are trying to build a stand-alone API, which has to meet this requirement. The API gets inputs for "Name" & "Email" and should then create user in any chosen Sitecore instance. As this is a ...
5
votes
1answer
972 views

Sitecore 8.2 - Best way to expose sitecore data to external system as web api

In sitecore 7.2 I had customized sitecore web api to expose data from sitecore to external system as API. I am just wondering if something new/enhanced has been added in sitecore 8.2 to expose data ...
2
votes
1answer
496 views

Does implementing a WebApi service using ServicesApiController expose a significant security risk?

I have been following Anders Laub's tutorials on implementing some WebAPI controllers using ServicesApiController and just like at the bottom of this page I received the 403 Forbidden error when ...
1
vote
2answers
192 views

Run serialize command from outside the Sitecore as a service

So I am faced with a challenge. I need to create a REST Services that will allow me to serialize Sitecore tree from outside the Sitecore. Is there some kind of service like this in place? Or this need ...
0
votes
2answers
449 views

Sitecore 8.2 How to sort items based on a specific parameter within a content item

So I have a list of items (e.g. FAQs). and I am calling them through the WEB Api. I want to be able to do a get from Sitecore and be able to sort based on the date created and sort it either ascending ...
8
votes
1answer
1k views

WebAPI Attribute Routing Not Picking Up Routes

Sitecore 8.2 rev 160729 My understanding is that, as of Sitecore 8.2, you no longer need to call .MapHttpAttributeRoutes() because it's now included (in fact, it'll throw an error if you do). However,...
5
votes
2answers
2k views

Sitecore 8.2 with Web API 2

Does anybody have any experience with Web API and Sitecore? I've got a custom database for data not managed by Sitecore, but will be presented alongside Sitecore data. The API calls work fine when ...
2
votes
1answer
529 views

publish item remotely using c#

For testing purposes we would like to create publish and remove some items in Sitecore using a remote testing- client in C#. Sitecore.Services.Client api seems the most logical way to create and ...
4
votes
0answers
286 views

UseTaskFriendlySynchronizationContext in WebApi calls

I'm trying to use Async tasks in my custom web api calls in Sitecore. I've successfully followed this article http://www.agehrke.com/2015/08/web-api-controller-in-sitecore-8/#comment-18861. However I'...
4
votes
4answers
339 views

Executing Sitecore logic from a Windows Scheduled Task

One of the frequent problems that I have seen with Sitecore is the inability to control the exact time that a scheduled task should run. Since the machine's clock will be far more accurate, what I ...
9
votes
4answers
6k views

WebApi failing to resolve dependencies

I am trying to resolve an implementation via constructor injection, however keep getting the following: An error occurred when trying to create a controller of type 'ApiController'. Make sure that ...
6
votes
2answers
424 views

How can I utilise MongoDB for non-xDB related things in my Sitecore solution?

Assuming we have a sparking new Sitecore installation running, and have already invested in the relevant MongoDB infrastructure to keep the solution running 24x7 and so on - how can I make further use ...
10
votes
1answer
1k views

Web API 2 Attribute Routing with Sitecore 8.2 Initial Release

Has anybody setup web api 2 attribute routing with 8.2 initial release? I tried the 'official' route, which is to create a custom pipeline handler to the initialize pipeline that does the registration....
3
votes
1answer
512 views

“String was not recognized as a valid DateTime” error

Images do not appear in Select Media dialog when I click Browse button in Image field. HTTP response from ItemWeb API that expected to return Images contains this error: String was not recognized ...
5
votes
3answers
1k views

How do I control access to Custom Item Web API controllers?

I am creating a Web API (Controller) inside my Sitecore solution by inheriting ServicesApiController and EnableCors attribute. This service will be called from any IPhone/Android Application (...