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

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.

2
votes
1answer
41 views

Sitecore 9 in Azure PaaS : Add Application Insights SDK

For Sitecore 9 on Azure PaaS and newer versions, what is the best practice to Add and configure the Application Insights SDK in Visual Studio to generate some telemetry in Visual Studio. As we are ...
7
votes
1answer
101 views

Is there a method in Sitecore's utilities to format a numerical file size in a friendly way?

The title pretty much says it all. I feel like I've come across a method in the past that does something like: long fileSize = 524288000; string prettyFileSize = Sitecore.SomeUtility....
0
votes
1answer
38 views

Unable to fetch item using getitem method

I was trying to access item using getitem method from SOAP service. Sitecore.Data.Items.Item item = Sitecore.context.Database.GetItem(<ID>) But Item is null. I tried to fetch using Id and path ...
0
votes
0answers
78 views

Programmatically move items from web to master database?

I have a utility page that creates Sitecore items from a csv file. This utility page is used to import thousands of items at a time, which are used for interactive map data. The items are stored in ...
1
vote
1answer
32 views

Get prefetch cache created status

Is there any way to understand the status of prefecth cache ? What i want to understand is that if the prefetch is already created or not ? When i disassemble the sitecore.kernal , I see a property ...
0
votes
1answer
26 views

User Profile table in SQL

I am saving a user profile and one of the field is "UserLanguage" which is saving fine Context.User.Profile.Save(); The save method is working as expected but where the User Profile being saved in ...
2
votes
1answer
30 views

Fetching Final renderings in an .aspx page

I am creating a script to fetch rendering parameters of a sublayout and edit data template item field data based on the values of fields of rendering parameters. I was able to fetch renderings in ....
0
votes
1answer
40 views

WFFM custom toggle switch [closed]

I am adding toggle switch as a custom field. Toggle.cs (Toggle C# code) public class Toggle: Sitecore.Form.Web.UI.Controls.Checkbox { } public class ToggleField : Sitecore.Forms.Mvc....
0
votes
1answer
57 views

Sitecore support for async controller renderings

I am planning to use ASP.NET async pattern in my Sitecore project, but I'm getting the error: Asynchronous method which returns task as result cannot be executed synchronously Is there a way to ...
7
votes
2answers
106 views

What is alternative of “.PageMode.IsExperienceEditor” property in JSS-react?

What is alternative of .PageMode.IsExperienceEditor property of Sitecore.Context in JSS-react to verify the ExperienceEditor context ?
1
vote
1answer
46 views

Sitecore keywords in the metadata

Lets say we have 4 renderings on the Page and each rendering has a data source attached to it which has a Keyword field that is being used for SEO purpose. Is it possible to get all the attached ...
1
vote
1answer
78 views

How to add renderings programmatically when another rendering is added

Which pipeline should I use when a new rendering is added in the presentation? I have a scenario to add renderings programmatically if a particular rendering is added in the item. I will write a ...
0
votes
1answer
76 views

EXM report is empty (data is not being captured) in scaled environment

I am working with Sitecore 9.0 update 2 on Azure. Server is scale out : 1CM and 3CD. After email campaign is run, we can receive email but reporting is not working. It doesn't have any data is as ...
15
votes
3answers
1k views

What does headless mean in the context of Sitecore?

There have been numerous discussions around headless capabilities supported by the Sitecore platform. What does that even mean? What product offerings from Sitecore support headless capabilities? ...
0
votes
0answers
14 views

Authenticated pages are not showing up in SXA Navigation

I tried enabling authentication for couple of pages in SXA Site but they stop appearing in SXA Navigation component. How I can make the authenticated pages appear in SXA Navigation component too? ...
1
vote
0answers
27 views

Not able to create a new SXA Accordian items in IE

I am trying to add a new SXA Accordian component from Experience editor in IE but not able to get 'Create' link which is working fine in Chrome. PFB Screenshots
4
votes
1answer
60 views

Content Item batch retrieval in .Net code?

Is there a way to retrieve a set of content items from Sitecore's APIs in batches, besides using the REST API? I'm looking at improving performance for a client's Sitecore site. A lot of the legacy ...
0
votes
0answers
22 views

Are “Content Buckets” able to be fetched using the Item Service API?

Content buckets separates items into distinct types of items in sitecore: Regular items (structured items) Items that are stored in an item bucket, are visible in the content tree, and they ...
0
votes
0answers
32 views

How to get paging of “children” results from the API *out of the box*?

I am making requests against a sitecore instance where I need to be able to use the REST API to list all of the children of a folder. So I do this: {{sitecoreURL}}/sitecore/api/ssc/item/{{ItemID}}/...
1
vote
1answer
20 views

Creating an item with the API returns 201, but then I cannot find the item?

Note: I am using a trial instance of Sitecore 9.0.2. I create an item: curl -X POST \ https://mysitecoreurl/sitecore/api/ssc/item/%2Fsitecore%2Fcontent%2FHome%2Ffolder1 \ -H 'Content-Type: ...
0
votes
1answer
88 views

How to check Server side whether session is time out or not?

As I am new to Sitecore and working on session time out functionality in Sitecore. Instead of redirecting to login page I've to display session time out warning message to end user and How to validate ...
2
votes
2answers
59 views

Custom Experience Button edit the Datasource item fields

I need to add a new button in the custom experience button. I watched some https://www.youtube.com/watch?v=D6jqqaBMu0s regarding the field editor button. That field editor gives you option to only ...
0
votes
0answers
31 views

“virtual” sites in the navigation tree

When I have have my navigation tree with page X and page Y and some content on page X and I need to show the same page X with the same content under an other content tree. E.g. page X under page Z. ...
0
votes
0answers
34 views

Query Solr index using ContentSearchManager throw exception

I am currently have CD running on Sitecore 8.2 with Solr cloud and trying to find out what could be the issue to this exception from below code snippet: using (var context = ContentSearchManager....
1
vote
1answer
69 views

Experience Profile custom facet retrieval error

I was trying to create custom facets in Sitecore 9.0 Update 1. I was able to create one and add a custom tab in experience profile. I fill the custom facet data with the help of a WFFM form. I see the ...
2
votes
1answer
41 views

Updating droplink field value by name

I'm trying to update a droplink field value using its name but I get the following error: Value not in the selection list The code is item.Fields["__Subitems Sorting"].Value = sort; // sort ...
3
votes
2answers
229 views

Headless CMS : Sitecore vs Contentful

We are currently using Sitecore for one project but did not use JSS anywhere. Other project team plans to use headless CMS and considering "Contentful" CMS for this. Could you please anyone can ...
1
vote
2answers
95 views

RESTful API for getting incremental changes?

I would like to call an API to Sitecore to get changes of Media Library files stored in Sitecore. So given a Media Library, I would like to list the New Files, Updated Files and Deleted files since a ...
1
vote
2answers
58 views

Force saving of an item

I have several newly added save events for existing items. Any way to force a save of an item? When I do $item.Editing.BeginEdit() / $item.Editing.EndEdit() in PowerShell it returns false since ...
2
votes
1answer
32 views

What do I need to do to display an image on my web page using the ItemService API?

I've uploaded a few images of kittens, teddy bears, flowers, and other cute things to a folder within the Sitecore Media Library. I now need to access them using the ItemService API and display them ...
0
votes
0answers
23 views

X-Frame-Options HTTP Header duplicity with Html.AntiForgeryToken() [duplicate]

We are using sitecore 8.2 update 3 version and hosted in azure PASS environment. In our project some of the pages has the Html.AntiForgeryToken(),then there is duplicate X-Frame-Options HTTP Header. ...
3
votes
0answers
88 views

Unable to get Dictionary Item value using sitecore Scheduler event

I have created A Sitecore Scheduled Task to send email. I have to read some settings from a Sitecore Dictionary but receiving only key not value. After debugging I have found that Sitecore.Context is ...
0
votes
1answer
91 views

How to integrate an external API with Catalog in Sitecore Commerce 9.0.2

I want to fetch the data from an external API and show it for my Catalog items. The API basically contains the details of my sellable items like product price, name and other details which properties ...
0
votes
0answers
25 views

ERROR Exception receiving ProtocolError calling

This error has been occurring so frequently (Total no. of occurrences 997210) in the CD server (not CM). Has anyone faced similar kind of problem? 4004 2018:08:03 00:00:00 ERROR Exception receiving ...
2
votes
1answer
78 views

Action methods in ServiceApiController is not catching the request

I'm using Sitecore 9 and I have created a ServiceApiController to enhance Sitecore API. I put a simple action method but it doesn't catch any request and I get this exception: Document not found - ...
1
vote
1answer
204 views

How can I add custom catalog attributes in Sitecore Experience commerce 9 and populate it with data from API?

I want to add new attributes for my catalog in Sitecore Experience Commerce 9 update 2 but not sure how to add it using the Sitecore Experience platform. Moreover all the properties data need to be ...
0
votes
0answers
28 views

Sitecore web.config and api error

I am developing a plugin for Sitecore and have experienced a very weird behavior in Sitecore. Part of this plugin, implements web api under Sitecores api: /sitecore/api/ssc. On a client installation,...
0
votes
0answers
58 views

Sitecore 7.2 parsing a droplink field in viewmodel [duplicate]

I am trying to use a droplink in our events section to allow users to select a list of events. I setup the field as a droplink, with the label as the event name, and the event guid as the value. The ...
1
vote
1answer
77 views

Experience Explorer 403 forbidden on sitecore api ajax call

I'm encountering an issue which I can't resolve : using explore mode in the experience editor, I get 403 errors when trying to see any of the data from the current visit (the tabs and accordions are ...
5
votes
1answer
211 views

What is the ShutdownGuard and how should I use it?

I heard someone mention the use of ShutdownGuard for long running precesses. How does one properly make use of this and what are some cautions around its usage?
0
votes
0answers
24 views

Create an item with all its language versions at once using the Restful ItemService API

I'm trying to create an item using the RESTful ItemService API in javascript using this code : var xhr = new XMLHttpRequest(); xhr.open("POST", "http://<your server>/sitecore/api/ssc/item/...
0
votes
0answers
37 views

Convert string to LinkField [duplicate]

I need to convert string (received from SOLR, for example) to LinkField to have an ability to get the URL later. string rawString = "<link linktype=\"external\" url=\"http://some-url/find-and-...
1
vote
0answers
61 views

Can't create contact list

I couldn't create contacts list and getting following exception, HTTP POST URL http://x/sitecore/api/ssc/ListManagement/ContactList Exception Sitecore.XConnect.XdbSearchUnavailableException: The ...
0
votes
0answers
51 views

Best way to incorporate new field into existing class?

This is a noob question, my apologies, but I am a noob. We want to add a dynamic persons list (staff authors) to an existing WeBlog 3.1 component in our Sitecore site, but are running into an error ...
2
votes
0answers
45 views

Encrypt zip file while uploading to media library folder sitecore 8.2

i have followed the sitecore link and create my custom processor for (Sitecore.Pipelines.Upload.Save). i have faced issues while saving all media items. it gives error on file.SaveAs(filename); ...
1
vote
1answer
134 views

Import Media Items in Sitecore Media Library ItemService Restfull API

We are implementing a solution that requires importing media items like images inside Sitecore Media Library. Found it is achievable with Old WebApi, however nothing mentioned equivalent in Sitecore ...
0
votes
1answer
46 views

How to make Sitecore.Context.Item.Fields work in a web control in an external project

I have a Web Forms page and it uses Sitecore.Context.Item.Fields. This works when I publish to the local Sitecore instance. But in my project that is external to the Sitecore instance, Visual Studio ...
0
votes
1answer
95 views

Sitecore 7.2 using droplink

I will start out by saying I am a bit of a noob when it comes to C# and Sitecore, but I am getting better. I am trying to update our code to use a droplink control for an event item (we'll call it ...
0
votes
2answers
262 views

How to filter an Item's children based on its template?

I have a navigation component that should list the current page in a hierarchy of items. I use below line of code to build navigation tree. return item .GetChildren() .Select(i => ...
1
vote
2answers
74 views

Publish items using the JavaScript ItemService API

I'm using the ItemService API in Javascript to login to sitecore and dynamically create items (documentation i'm using) var xhr = new XMLHttpRequest(); xhr.open("POST", "http://<your server>/...