OneDrive API - Sharepoint - Make calls against a URL root - onedrive

Referring to OneDrive API documentation here, the section Make calls against a URL root has table that references to the SharePoint Online Service noting its url is:
https://{tenant}.sharepoint.com/{site-relative-path}/_api/v2.0
What does the {site-relative-path} refers to?

Not sure how familiar you are with SharePoint but {site-relative-path} is the relative path to the Team Site. So if you have a Team site called "Contoso" and it is located at https://testTenant.sharepoint.com/sites/contoso then the relative path would be /sites/contoso

Related

Unable to access shared folder in one drive for business

We are building an application using onedrive api v2.0.
But we are unable to see/access folders which are shared to user by any other users while making a request to /me/drive/root/children.
Can someone please suggest how to access folders which are shared by someone as our api will further create folders, files in these shared folder.
Shared files don't show up in the user's drive (/me/drive/root in your example) but are available through the sharedWithMe view:
GET /drive/sharedWithMe
This returns a collection of items that have been shared with the owner of the drive (or the current user in this case). Each item returned will include the remoteItem property which contains a reference to the actual item. If you want to access the actual item, then you need to build a request like this:
GET /drives/{item.remoteItem.parentReference.driveId}/items/{item.remoteItem.id}
Which will access the actual shared item (not the link to the remote item which is returned by sharedWithMe).
There's more information about Shared With Me on the OneDrive dev portal.
The request which was specified by greg works fine. I don't about the scopes specified by gregg, but to access the shared files, you to add the current user through you are making the as secondary administrator to other user ( in this case the user who shared the file) in SharePoint MySite administration.
I suggest to use graph API for accessing files from one drive as the responses are more consistent compared to the response from onedrive api. Though both Ali's require the secondary administrator setting to access the files.

How I could host the html documentation of my API to be browseable online in GitHub?

I wonder if exists a free online service for developers where to host the contents of a library's API documentation, I mean the index.html and all the files that composes a html documentation.
This is the documentation that I will host with the intention to be browseable online:
http://www.mediafire.com/download/244x2i13vtp6j1d/Web.rar
My current projects are hosted in GitHub, and one person told me that I could host the html documentation using GitHub-Pages, but I think can't, I already created a page using the GitHub-Pages for my repository but seems only can be a single and simple html page with no chance to do/upload what I require, anyways, I'm not totally sure.
If with github-pages isn't possible to do, then I'll look for a free service alternative that offers a guided way to this, instead of registering in a free web-hosting to create your domain then access the admin panel then upload the files then blah blah blah...
Who says you can't have more than one page on your GHub Pages? Make a new file, for instance called api.html or api.txt or whatever you want. On this new page, you can include a download link for your rar. Add a <a href="mypage.html"> in your index.html. Style it however you want, and people can go through.

Get Dropbox public folder's metadata without authentication

I'm about to create a blog and wanted to host the content on Dropbox (only Markdown files, everything else is on my server) because I want to be able to quickly upload and edit posts from all my devices without having to get some FTP app on them.
So far I managed to access files via https://dl.dropboxusercontent.com/u/********/<sub-folder>/<file name>.md and like pointed out here I can get the last-modified attribute via etags.
However, I'm stuck at getting a file list (or a folder's metadata in general). Is this possible without using OAuth?
No, this isn't possible without using the API. But why are you against using the API?
Feel free to use my tool https://dbxoauth2.site44.com/ to get an OAuth access token for your account. Then just do an HTTP GET to https://api.dropbox.com/1/metadata/auto/<path> with an Authorization header of Bearer <token>. Ditto for getting the actual file contents, just use /files/auto/<path> instead.
Oh, unless you're doing this client-side in JavaScript? In that case, this won't work since you can't give your access token out to the client (where it could be abused by anyone who visited your website).
make "Public" folder and go https://www.dropbox.com/enable_public_folder
back to your dropbox folder (web) right mouse at file in public folder and chose "Copy public link..."
Update: As of September 1, 2017 public links have been disabled for all users.
https://help.dropbox.com/files-folders/share/public-folder

error "List does not exist"

I had error when access SharePoint sites out of the server , as when I
try to add new document or did any action this error displayed although
it worked well in SharePoint server
I think Yevgeniy made a good suggestion.
I assume you mean by 'outside' the server, users are trying to view the page on a different URL? If so, it might be the URLs to access the site 'outside SharePoint' are not configured correctly.
I would suggest a few things to start with:
When you say it works 'in SharePoint server' does this mean that the whole site is accessible, with no problems? But using a different URL (i.e. host header?), fails - for just this one page with the list or the whole site?
Check you have Alternate Access Mappings configured correctly as suggested above - check that the URL is setup correctly in any AAM zones defined, and that the authentication (e.g. Anonymous, Forms whatever required) is also setup too. This is all done in Central Administration.
If AAM setup correctly, check if you have any firewall or other network security that may block access to the site (again, assuming users are routed externally?)
Does the problem page or list (or the subsite it is within) have any unique security permissions?
You can check for the site via Site Actions | Site Permissions - if it does not have unique permissions, you will see a 'This Web site inherits permissions from its parent.' message.
If the List has unique permissions, you can check by going to the list page, and clicking 'Library Permissions' on the Library grouping on the Library Tools section of the ribbon.

Sharepoint Web template

I have created a web template solution by following Vesa "vesku" Juvonen 's blog(http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx).
I have the web template and have created sub sites with it. Now I need to create a web template from this template, which would consist of lists and other items.
The publishing feature does not have the save as template option, So I get into the _layouts/savetmpl.aspx to create one or deactivate the publishing feature to create getthe "save as site template option and create one. It creates but does not work properly.
I access the site by appending the default.aspx to the newly created sites url and it does not have any features as that of root template. Is there any way to create a template from the existing web template to work correctly. I am a newbie to sharepoint and vesku's blog has been my reference.
Any options or views to do it correctly would be helpful.
I have thought about creating a site through code and given the user an option to do so by including a web part where he could click on say "create a webs site with XXX template and include XXX lists, web parts etc. Is it a good approach?
If the web site that you created a template for contains web parts that access the GAC (i.e. have DLL's), then you must take the wsp that is in the solution gallery and deploy it as a farm solution.
Templates saved via /_layouts/savetmpl.aspx cannot access the GAC.
if you made a webtemplate why would you want to use the save as site template option? Users can also create sites from your webtemplate and if you need a different template you just add another webtemplate.
The whole principal of web templates is meant to be used for site creation....