Trying to download a file from my account on the Connections API. The doc says:
The URI is: /files/basic/api/collection/{collection-id}/entry
With this note:
{collection-id} is the value of the <td:uuid> element in the
collection's Atom entry document.
Where can I get this td:uuid?
If you try to access a file in a community, then use the following URI to receive an XML document that contains the td:uuid tag.
/files/basic/api/communitycollection/{community-id}/feed
If you try to access My Files, then the following URI should return the information
/files/basic/api/myuserlibrary/feed
Related
Suppose that I have the two following urls:
https://MYCOMPANY.sharepoint.com/sites/DevTeam/Shared%20Documents/Forms/AllItems.aspx
https://MYCOMPANY.sharepoint.com/sites/DevTeam/Shared%20Documents/Forms/AllItems.aspx?viewid=VIEW_ID&id=%2Fsites%2FDevTeam%2FShared%20Documents%2FGeneral
How do I "convert" them into graph api calls? Eg:
Only having the host name (MYCOMPANY.sharepoint.com) and the site name (DevTeam), how do I list all the root documents of the site drive with a graph api call?
Only having the host name (MYCOMPANY.sharepoint.com), the site name (DevTeam), an ID i'm not sure what corresponds to but that I can read in the url (VIEW_ID) and a path (DevTeam/Shared Documents/General), how di I list all the files in DevTeam/Shared Documents/General with a graph api call?
The first URL is for your site's document library. The 2nd URL is for the \General folder in that library.
To access a site given its URL, see: https://learn.microsoft.com/en-us/graph/api/site-get?view=graph-rest-1.0&tabs=http In your case, the API call would be
GET /sites/MYCOMPANY.sharepoint.com:dev/
To access the default document library ("drive") for a site, see: https://learn.microsoft.com/en-us/graph/api/drive-get?view=graph-rest-1.0&tabs=http In your case, the API call would be
GET /sites/MYCOMPANY.sharepoint.com:dev/drive
To list the files in a folder of a drive, see: https://learn.microsoft.com/en-us/graph/api/driveitem-list-children?view=graph-rest-1.0&tabs=http In your case, the API call would be
GET /sites/MYCOMPANY.sharepoint.com:dev/drive/root:/general:/children
I need api to create URL link for download document of envelope.
I found this api:
GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
But this api just return the file and i what a URL i can download the file (of course with expired time)
The endpoint you're looking for is:
POST /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient
You will need to provide in the body information about the recipient, see here for details:
https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient
We also have code examples in various langagues to show you how to do this here:
https://developers.docusign.com/esign-rest-api/code-examples/code-example-request-a-signature-via-email
I'm trying to retrieve a document library by path using the Graph API and I'm not sure how to proceed.
The url to the library is for example the following:
https://hostname/sites/sitename/subsite/nameofdocumentlibrary/
I would like to have all the children through the Graph API. The issue: I know the document of the library but I don't know the ID of the library. It seems that it's possible to access it through the relative path but I'm not succeeding to it.
How do I do this?
My get url was the following:
/v1.0/sites/hostname:/sites/sitename/subsite/nameofdoccumentlibary/items
I'm always getting:
The provided path does not exist, or does not represent a site or UnknownError.
Any ideas ?
Try to use this:
GET https://graph.microsoft.com/v1.0/sites/{hostname},{spsite-id},{spweb-id}/lists/{list-id}
I don't check this in real life because I don't have SP Online. But it must working.
Use this link with SharePoint Graph API.
To get site id (site collection) you can go to your site collection and browse this endpoint:
https://hostname/sites/sitename/_api/site?$select=Id
To get web id (subsite) you can go to your subsite and browse this endpoint:
https://hostname/sites/sitename/subsite/_api/web?$select=Id
To get library Id you can just open Document Library Settings page. URL have library ID. You can transform it to real guid. Like this:
/_layouts/15/listedit.aspx?List=%7B603D7FA3-C801-46EB-A044-421234452901%7D
Must transformed to:
603D7FA3-C801-46EB-A044-421234452901
Following your feedback, I could now retrieve the document library using the display name (not the path in the url).
This is my request:
https://graph.microsoft.com/v1.0/sites/fullsubsiteid/lists/69369/items
69369 is my display Name here.
I can also use:
https://graph.microsoft.com/v1.0/sites/fullsubsiteid/lists/69369/drive
Now the first request, is returning an empty value array, while there is a "Documents" folder in the document library. How could I retrieve all folders/files etc in this document library? How can I use relative path?
Tx!
So let's say I have a full url into a sharepoint website.
In the past when I wanted to get the weburl and doc url, I used the "url to web url" method of the Front Page Server Extensions. (http://msdn.microsoft.com/en-us/library/ms460544.aspx).
So for example if you had a site at
http://webapp/site1/chidsite/a.doc
I want a method in CSOM that will return /site1/childsite as the weburl.
I see the Web.WebUrlFromPageUrlDirect() method in CSOM but I'm not sure I'm getting what I need back from it. In the Uri class I get back, would I use teh "AbsolutePath" property for the weburl?
What is the correct way to do this?
I also would like to get the docURL that is usually retrieved by a call to url to web url via frontpage extensions.
The fileurl will be the file location relative to the web site. So if the document is stored in the document library called "Documents", you will get a value of /Documents/file.ext.
Well, I've reverted to using the FrontPage extensions when doing URLToWebURL since I just wasn't sure what I was getting using CSOM methods. Though check the link below for answers I received elsewhere.
Information Pertaining to this issue
I am uploading files to SharePoint using the API Copy.CopyIntoItems. The upload works when the destination url is given as "http://sharepointserver/sitename". However, when the url is given with the domain name, like
"http://sharepointserver.domain/sitename", then the CopyIntoItems API call fails, and the error returned is "Object reference not set to an instance of an object".
Any idea on why there is a strange behavior when the url changes?
You can not use the url with the domain name, like "http://sharepointserver.domain/sitename" for Copying item
The following answer on SO links to a thread on MSDN, which explains in detail why this behaviour occurs: https://stackoverflow.com/a/2692212/274354
Link to the MSDN thread:
CopyIntoItems errors when using destination URI with FQDN