New answers tagged

0

I think what you are looking for is Microsoft AppSource, essentially the equivalent of an "app store", but just for SharePoint online and other O365 based apps. You want to follow the process to register as a seller so you submit your PnP App.


0

I am surprised if you get it to work at all, the ListItemAllFields method returns a Read-Only copy of the ListItem (see the R/W table here). Use the values you get from here to get the Item ID and save that in your code, then use that to do your MERGE to https://mysite.sharepoint.com/teams/myTeam/_api/web/lists/getbytitle('Shared Documents')/items(<item ...


2

to get permissions on SharePoint page by SP rest Api You may use the fallowing request: .../_api/web/GetFileByServerRelativeUrl('[RELATIVE URL OF PAGE]')?$expand=ListItemAllFields/RoleAssignments/Member,ListItemAllFields/RoleAssignments/RoleDefinitionBindings,ListItemAllFields/RoleAssignments/Member/Users where the relative url of the page would of a page ...


1

In case of you need to see permissions on the web you can simply Navigate to the web permissions page (http://XXX/_layouts/15/user.aspx) In case of you need to see permissions to particular site page try the following Open site pages library Select page Click on Shared with - Advanced


1

As @martin mentioned in comment, you can get sites through below url: your_host_name/_api/search/query?querytext='contentclass:STS_Site contentclass:STS_Web'


0

Answer: getlistItemChangesSinceToken is just a terrible API. It misses some types of changes and is hard to parse. Furthermore, it looks like the changelog can't be queried forever, it only seems to keep "recent" changes. So the best way to get changes is to use ... getChanges. To use a token, pass ChangeTokenStart: {StringValue: token} to the SP....


0

Postman has NTLM in "beta" and it doesn't work. Insomina does NTLM without issues. I have used Insomnia to authenticate and make API Rest calls for SP2013 on prem without issue. You need to ensure that you are using the x-request-digest value for post calls. https://insomnia.rest/


0

You can enable Basic Authentification in IIS Settings, then in postman, Authorization --> select Basic Auth type and set your account name and password. http://ibtissamchabiba.blogspot.com/2017/03/solution-for-401-unauthorized-error.html The above approach will not work until you are passing credentials or the authentication token in the request. We have ...


0

Try using it like below: https://XXX.sharepoint.com/sites/pwa/_api/ProjectServer/Projects?$filter=(Id eq guid'xxxx' and Tasks/Name eq 'xyz')&$select=Id,Name,StartDate,Tasks/Id,Tasks/Name&$expand=Tasks


0

This is the endpoint to do that: /sites/Developer/_api/web/lists/getByTitle('MyDoc4')/RootFolder/folders('SubFolder')/files/add(url='test.txt',overwrite=true) Using postman tool quickly you can test this POST upload function before going into the coding implementation. Similar question is answered here: Add files to subfolders using rest api in ...


0

You could try flipping the query around to use the Project ID as a filter, like: /_api/ProjectServer/Projects?$filter=Id eq guid'xxxxxxxx'&$select=Tasks&$expand=Tasks


0

Like Mr Ganesh said, you are missing an underscore and everything look well. well, I did not do this to repeat what Mr Ganesh already said and answered, I just would to recommend to use SharePoint Insider extension in your Browser, install it and explore it features, it will impress you and help you to figure out the endpoints you need and the content of ...


0

It should be __metadata (with two underscores) and _metadata. References: Updating sharepoint hyperlink field via flow not updating. Setting and Updating SharePoint Hyperlink fields in Flow.


2

I suggest to use this endpoint: http://<site url>/_api/web/GetFolderByServerRelativeUrl('<folder relative url>')/files/add(overwrite=true, url='runtime_table.csv')


0

The SharePoint REST API has a little... I don't know what to call it - extension method? - anyway, an endpoint called FieldValuesAsText which will give you what you want. I haven't used it too much, but from just now playing around with it a bit in Postman, it seems like in order for it to work properly, you will need to know the ID of the list item you are ...


0

Worked this one out, half my own fault but it's a situation that anyone can find themselves in. We had some trouble with the records centre as we were doing some importing in and wanted to reset to try again. So basically deleted the records centre and recreated. SP in it's wisdom decided to give me a new Records Center Web Service Submitters group named ...


1

Try using code something like below: <div id='ImgContainerDiv'> </div> <script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.min.js"></script> <script type="text/javascript"> $.ajax({ url: _spPageContextInfowebroot.webAbsoluteUrl + "/_api/web/lists/getbytitle('ListName')/items?$select=ID,Title,...


0

Using the REST API, you would have to perform two separate queries, and use your client-side code to concatenate the two result sets together. The RowLimit parameter will restrict the number of results you get back from the search api, but it is separate/outside of your query, so it will limit the whole result set, not just one aspect of your query. You can ...


1

In order to include the "__metadata" object in your POST, you need to specify your content-type as "application/json;odata=verbose". Alternatively, if you need to use the "application/json;odata=minimalmetadata" content-type, remove the whole "__metadata" json object, and instead specify the "ContentTypeId" in your body just like you are doing for your "...


0

The value of metadata should be the list name. Example: If your list name is Employee then the type field should be EmployeeListItem. var item = { "__metadata": { "type": "SP.Data.EmployeeListItem" }, "Title": "MISS", "FirstName": "Rudrani", "LastName": "Patil" },


0

You need to use Microsoft.SharePoint.Client.SharePointOnlineCredentials instead of System.Net.NetworkCredential. Here's an example: var siteUrl = "https://contoso.sharepoint.com"; var username = "user@contoso.onmicrosoft.com"; var password = "pass@word1"; var securePassword = new SecureString(); password.ToCharArray().ToList().ForEach(c => ...


0

We can import the excel with the out of the box solution, no need go with coding: OPTION 1: IMPORT USING QUICK EDIT(quick edit view). Build out all the columns exactly as they appear in Excel Make sure columns in a view are in the same order as in Excel (otherwise when you do copy/paste, you will get a mismatch) If you are taking advantage of metadata (...


0

In SharePoint REST APIs we need to use the internal name of the columns. And the internal name of your column is OData__x0032_020. I can see an error you made in internal name of column in $select query. Try using it like below: https://server/sites/Estimation/_api/lists/getbytitle('list')/items?$select=ID,OData__x0032_020&$filter=Title eq `CQ`


0

We can use the REST API below to achieve it. https://sitecollectionurl/_api/SP.Web.CreateAnonymousLink Example code: <script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function(){ anonymousAccessLink(); }); function anonymousAccessLink(){ var ...


0

In the POST man tool select the binary option where it will allow to attach or browse any file - there you attach any excel file by browsing your local directory - then perform the POST operation to SharePoint, this will upload the document to the SharePoint library - then go to the code section of the POST man tool where we can all equivalent code for this ...


0

If you want to do it programmatically, the easiest approach is to use PowerShell PnP. Make sure your CSV file has column names that match internal names of columns of the destination SharePoint List Make sure destination SharePoint list exists with all coluns from the CSV file Run the following to migrate data from the CSV to a SharePoint List. Don't forget ...


0

Try using below code to create a file in SharePoint library: var restUrl = "http://siteurl/_api/web/GetFolderByServerRelativeUrl('/sites/siteName/DocumentLibrary/FolderName')/Files/add(url='a.xlsx', overwrite=true)"; jQuery.ajax({ url: restUrl, type: "POST", headers: { "accept": "application/json;odata=verbose", "X-...


0

Ajax call listed below works in case of file extension is xls. It doesn't work in case of xlsx. I think there should be special syntax to create valid .xlsx file. Probably this question isn't about headers but about creating valid .xlsx file. var fileContent = 'aaa'; jQuery.ajax({ url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/...


1

Add items from csv file to SharePoint Online List using PowerShell in CSOM. Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Provide CSV ...


0

Go to site settings->site permissions->check permission, check if the user have "Add and Customize Pages". If not, edit the user permission level with "Add and Customize Pages" permission.


0

The following example code for your reference. <script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script> <script type="text/javascript"> function createListItem() { var listTitle="CL1224"; var item = { "__metadata": { "type": "SP.Data."+listTitle+"ListItem" }, "Title":"MyTest", ...


1

I'll suggest PowerShell for similar requirement. You could check PowerShell script from this thread. Or read excel by sheetjs and insert into SharePoint by JSOM/rest api. Creating a List Item Using ECMAScript(JSOM) Or c# solution by EPPlus, demo


0

The first letter of the sharepoint list when passed into item should be capital letter. In this case the 'C' in the name is capital. var item = { "__metadata": { "type": "SP.Data.**C**aseListItem" }, "Title": "updated title" };


3

NO CODE APPROACH: There is no REST API, to import data from Excel to SharePoint, instead, you can directly export Excel sheet to SharePoint, it's a default feature in Excel. This option creates a new list in SharePoint or you can create a new list in SharePoint and copy-paste the values. CODE APPROACH: In my previous project to read the data from excel ...


Top 50 recent answers are included