Questions tagged [sitecore-api]

For questions related to Sitecore's API, covering questions about how to access, create, update or or delete data, as well as questions about how the Sitecore code-base is or can be used for custom or native logic, etc.

Filter by
Sorted by
Tagged with
1
vote
1answer
398 views

Advantages of servicesapicontroller over api controller

I've been looking for best way to expose a api that returns data in Sitecore and I found some implementation which use ServicesApiContorller, what are the advantages of using this controller over ...
1
vote
2answers
755 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 ...
1
vote
1answer
43 views

Updating xDB on async mode on Sitecore 8.2 update 4

We are pushing the customer details into xDB when they login. The problem is we may have times where more than 5k customers could be accessing the site at the same time, So I don't want updating xDB ...
-2
votes
1answer
472 views

Looping through items in bucketed folder [duplicate]

For a project I am working on, I am attempting to figure out how to loop through a bucketed folder programmatically using C#. In viewing the bucketed folder structure, the bucket folder nests the ...
5
votes
1answer
96 views

How to update XDB with customer details in a separate thread

I noticed the call to update the customer details onto xDB is taking considerable amount of time so I would like to do it in a separate thread so that application does not have to wait until the ...
0
votes
1answer
127 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 ...
3
votes
1answer
254 views

How to track the user behavior and personalization on mobile Apps using Xamarin Sitecore SDK?

I need to provide the personalized content to the mobile apps through SSC/Sitecore mobile SDK and track the user behavior and capture in the xDB. As per my understanding, "Sitecore Mobile SDK ...
0
votes
1answer
55 views

CD site setup for one country / subset of languages

Planning to setup 2 new CD servers which contain only French and English language pages. All other language versions should not exist in new web db. I took the existing web db backup and setup site ...
5
votes
1answer
931 views

Getting a list of items from the ItemService API matching a specific field value

I'm trying to get a list of items from Sitecore that match a custom tag field. This is from an external application so I need to use one of the APIs to do this. I've tried using the Sitecore ...
1
vote
1answer
310 views

Save popup message is frequently shown in Sitecore [closed]

I have added values in few fields across 400+ items in the Sitecore programmatically. After creating all the items in the Sitecore master database, I am getting this message when I click on each one ...
0
votes
1answer
215 views

Finding siblings in buckets

We've a folder item which stores all new artciles. This item is bucketable. But after turning into a bucket, we are not able to find previous and next sibling of an item under bucket. The below code ...
0
votes
0answers
546 views

How to automatically escape item paths for use in Sitecore query

Is there some API utility method which can automatically escape an item path for use in a Sitecore query? I am building a query string in code which uses an item path. If the item path contains a ...
1
vote
1answer
314 views

How to add item in contact custom facet List type property

I have created a custom facet model with Sitecore 9.0.1 & xConnect. My contact custom facet contains a property of List<string> which I want to populate with different values while contact ...
0
votes
1answer
633 views

Get parent item and it's all child item from solr searchresultItem

I have a requirement that needs to get particular item along with all child item or some of the child item using template id from solr searchresultitem. Can anyone help how to achieve this?
2
votes
3answers
186 views

One CD server site goes down-Notification

Using 3 CD server to host my sitecore site. Using load balancer navigating the traffic on servers. Some time one of the CD server site goes down how we can get notification. Is there any way run some ...
6
votes
1answer
1k views

How to get Descendants of a Sitecore item using Glass mapper?

Is there any direct approach to get descendants(child items and sub child items) of a Sitecore item in Glassmapper model. I know [SitecoreChildren] can be used in GlassMapper model to get Child items....
1
vote
0answers
130 views

Restricting user from forcing manual submit to the Sitecore Url

Looking for the best practices to tackle a user behavior in my Sitecore 7.5 application. Basically there is an action method decorated with the [HttpPost] attribute. This action is invoked through ...
0
votes
3answers
662 views

Getting “Message: Service has been disposed, cannot create object” with Glass.Mapper

I'm using Glass.Mapper v4.5.0.4 and Sitecore 8.2 (rev. 170407). I'm doing an import into Sitecore and am using the SitecoreService.Save(T target) method for creating and saving items. I have the ...
0
votes
1answer
348 views

How to copy item A to item B without loosing the ID of B?

I want to make the item B (destination) identical to item A (source), without changing the ID of B. I tried with the following: var sourceXmlString = source.GetOuterXml(false); var sourceXml = ...
4
votes
1answer
583 views

Getting the page ID when clicking a custom link field in Sitecore

I am creating a new link field in Sitecore following this link: Link for custom link field I have successfully created one called modal link. Specifically I want to get all the modal components that ...
2
votes
0answers
95 views

Updating Sitecore renderings programmatically [duplicate]

I am trying to update the renderings (more than 12) programmatically. I have around 1000+ items and each item as multiple languages (8+). I have developed the tool to see which all items as renderings ...
1
vote
2answers
147 views

Context.Site is null within LinkProvider code triggered from FileSystemWatcher callback

Scenario in our Sitecore 8.1 instance is that, we have a .NET FileSystemWatcher object that is initialized in Application_BeginRequest of global.asax. When a file is dropped in the watched folder, ...
0
votes
2answers
380 views

Store media item in Sitecore somewhere else instead of Media Library

Is this possible to store Media items in some other Content tree node in place of Media Library?
3
votes
5answers
885 views

Cannot find packages containing StandardController

I am very new to Sitecore, trying to implement a basic controller inheriting from StandardController. I've followed the official Sitecore docs for setting up the environment to work with MVC here: ...
2
votes
1answer
772 views

Sitecore field.GetItems() returns no items on Non English version

We have an item which is having a multilist field in it. This field has selected value and the below code is working fine on English version. Other language versions are returning empty result. We ...
0
votes
2answers
726 views

How to unlock sitecore items programmatically

The best practice for content editors is to check in Sitecore item after editiing is done.But they often don't follow this practice. So when some other Content editor comes to that item, he manually ...
1
vote
1answer
420 views

Sitecore GEOIP Issue with load balancer

In a project, I have implemented Sitecore GEOIP to get visitor's country information. In local, it was working fine but when we deployed it in Production environment, GEOIP was not able to get visitor'...
0
votes
1answer
187 views

Is there a way to use a rich text field as meta tags?

Is there a way to use a rich text field as meta tags? I'm picking up where someone left off and they are trying to use a Html.Partial to load a cshtml file that pulls from a rich text field. This is ...
0
votes
1answer
555 views

solr Sitecore full text indexing ifilter

I'm attempting to index the content of pdf's with Solr 6.6.2 and Sitecore 8.2 Update 6. I've got my solr indexes working correctly, and I'm able to search text from pages (content items) and I'm able ...
1
vote
0answers
84 views

How to get input value from textbox and store that in content tree in Sitecore?

I have created a textbox and button in a View Rendering. Now I want to know that how to store the input value from this textbox by clicking button and store that in content tree. How would I do that?...
3
votes
1answer
1k views

Object reference not set to an instance of an object in Experience Profile (SC9 & SQL xDB) [duplicate]

I’ve successfully installed SC9 and have been able to push contacts into xDB via xConnect without any problems. I can see the contacts in the SQL database and that bit is working fine. Something ...
2
votes
1answer
298 views

Intermittent issues with the Sitecore Ajax Post request while invoking a MVC Action [closed]

I have an application running on Sitecore 7.5 where my code is invoking an MVC Action at client side. The action method is decorated with the [HttpPost] attribute. https://www.XYZ.com/api/sitecore/...
1
vote
0answers
216 views

Sitecore Commerce Categories children is not being populated. “GetNavigationViewModel”

I have setup Sitecore 8.2 + Commerce Server + SOLR I have created Catalog under departments. "Commerce Catalog Manager" [Commerce Catalog Manager] ABC (category) ZYX (sub Category) ZZZ (sub ...
1
vote
1answer
2k views

Sitecore api calls returns 403

This question is similar to sitecore api service returns 403. I got the system admin to set the security policy to ServicesOnPolicy However, I'm still getting 403 error. In SOAPUI, I am using the ...
1
vote
1answer
370 views

Get Sitecore page content dynamically

I'm trying to get a page's content dynamically so I can open in a modal. What's the best way of getting the html from a page given an ID/page url?
1
vote
1answer
68 views

WebApi queries on nonexistent resource returns 200

I am using the Sitecore 7.2 Item Web API to retrieve some items. Using fast queries I am not able get a "404" in case an item doesn't exist (even if i don't use fast queries, i still don't get 404). ...
4
votes
1answer
391 views

Change field type from Droplist to Droplink

I have content items with Droplist field. I want to change this field to Droplink field type. What is the best solution/practice to change it without losing already existing data?
2
votes
3answers
184 views

Data re-writing from Sitecore 7.2 with SPE

So I need to re-create some content from Sitecore 7.2 to a new Sitecore 8 instance. What we had in mind is to create a script using PowerShell in the new Sitecore 8 instance to fetch the needed data ...
4
votes
1answer
681 views

Receiving 404 error when accessing Item Web Api with Sitecore 7.2

Im trying to use the item web api in sitecore 7.2 to retrieve https://[hostname]/-/item/v1/sitecore/content/ in postman, but it returns a 404 not found error (the whole 404 not found html page of ...
1
vote
2answers
475 views

ItemWebService not working

So I need to retrieve an item using the sitecore API. So firstly, I need to log in, Im following what this site states: https://doc.sitecore.net/sitecore_experience_platform/developing/...
6
votes
2answers
1k views

Get Items by template id in a scheduled task

Scenario: I have over 10,000 items in my sitecore/content tree. Nearly 2,000 of them are thrived from the Article template. Inside of the Article items, there are two important fields: Is Featured - ...
1
vote
2answers
313 views

Cannot get current item from custom GetAllowedRenderings pipelines processor

I am writing a custom GetAllowedRenderings processor, but I cannot see how to obtain the current item that I'm editing in the experience editor. There doesn't seem to be a property on the ...
2
votes
1answer
789 views

Error: “Invalid URI: The format of the URI could not be determined.”

After Installing Sitecore 9 XP1 I am getting this error while "Invalid URI: The format of the URI could not be determined". The XP1 installation was properly done without any error and I am able to ...
0
votes
1answer
507 views

Programmatically Execute Workflow Action of an item from a URL

I am trying to execute a Workflow Action "Approve" or "Reject" from a URL to an ID, is my approach correct? I need help finishing it, how do I run this code from a URL and how do run it on any ID, I ...
7
votes
2answers
452 views

How to copy an item to multiple locations

What is the easiest and quickest way to copy an item to various locations? I have about 100 multisites in a solution and I have created a new template. I need to create a new item inheriting this ...
0
votes
2answers
560 views

How to create lucene indexes seperate for each template and map fieldNames under each template

I am creating lucene indexes using Sitecore 7.2 and I have Title field name common in Article's template as well as Author's template. Is there any way to write separate field mapping as per ...
0
votes
1answer
576 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 ...
1
vote
1answer
635 views

How to rebuild Lucene Index using API?

We have to rebuild Lucene index on our CD server. Is there any Sitecore API to rebuild Lucene index? or rebuild a portion of tree items?
0
votes
2answers
240 views

How to edit/create the Sitecore item on behalf of the specific user using Sitecore API?

We are creating and updating items in the sitecore tree, we are using SecurityDisabler to perform the operation. The system considers the operation is performed by an anonymous user but we need to ...
5
votes
1answer
665 views

How to invoke Workflow on the particular item using Sitecore API?

We have the list of items in the Sitecore tree and all the items will be in a workflow. we are updating these items programmatically and based on some condition, we have to assign the state of the ...