microsoft graph api to get attachment link for a list item
up vote
-1
down vote
favorite
I am using Microsoft Graph Beta APIS to access SharePoint Online. The current GET
to retrieve a list with its ListItems
is like
/beta/sites/mytenant.sharepoint.com:/sites/mysite:/lists/mylist?select=id,name,lastModifiedDateTime&expand=items(expand=fields(select=Title,Attachments,OptyNumber))
This works great and returns me Title
, Attachments
, and OptyNumber
. Now, the list may have attachments and I need the web URL of the attachments. How do I do that?
Trying /beta/sites/mytenant.sharepoint.com:/sites/mysite:/lists/mylist:/attachments
throws error
{
"error": {
"code": "BadRequest",
"message": "Only one path can be specified in the URL.",
"innerError": {
"request-id": "f9e94fee-082f-45af-a777-2e1d3debb99c",
"date": "2018-11-09T03:52:32"
}
}
}
which makes sense to me. How do I get the associated attachment URL with each of a ListItem
if it's there?
microsoft-graph sharepoint-online
add a comment |
up vote
-1
down vote
favorite
I am using Microsoft Graph Beta APIS to access SharePoint Online. The current GET
to retrieve a list with its ListItems
is like
/beta/sites/mytenant.sharepoint.com:/sites/mysite:/lists/mylist?select=id,name,lastModifiedDateTime&expand=items(expand=fields(select=Title,Attachments,OptyNumber))
This works great and returns me Title
, Attachments
, and OptyNumber
. Now, the list may have attachments and I need the web URL of the attachments. How do I do that?
Trying /beta/sites/mytenant.sharepoint.com:/sites/mysite:/lists/mylist:/attachments
throws error
{
"error": {
"code": "BadRequest",
"message": "Only one path can be specified in the URL.",
"innerError": {
"request-id": "f9e94fee-082f-45af-a777-2e1d3debb99c",
"date": "2018-11-09T03:52:32"
}
}
}
which makes sense to me. How do I get the associated attachment URL with each of a ListItem
if it's there?
microsoft-graph sharepoint-online
You said it is returningAttachments
in your original query, what exactly is it returning?
– Marc LaFleur
Nov 9 at 17:05
a true false if attachment exists or not. but not the actual link
– Vik
Nov 9 at 21:50
Have tested the endpoint too, the attachment returns Boolean. It maybe by design, so that the graph API doesn't want to return the actual now. You should try to submit one feature request for this.
– Seiya Su
Nov 12 at 3:14
Is the list a Document Library or just a traditional list? Its possible you need to use the OneDrive API to access the attachment.
– Marc LaFleur
Nov 12 at 21:46
Sorry to say ms docs are and overall support is pretty lame around these. SO is full of these and no luck. not even a clear yes no on if it is even supported, if no then what is the way.
– Vik
Nov 15 at 0:44
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I am using Microsoft Graph Beta APIS to access SharePoint Online. The current GET
to retrieve a list with its ListItems
is like
/beta/sites/mytenant.sharepoint.com:/sites/mysite:/lists/mylist?select=id,name,lastModifiedDateTime&expand=items(expand=fields(select=Title,Attachments,OptyNumber))
This works great and returns me Title
, Attachments
, and OptyNumber
. Now, the list may have attachments and I need the web URL of the attachments. How do I do that?
Trying /beta/sites/mytenant.sharepoint.com:/sites/mysite:/lists/mylist:/attachments
throws error
{
"error": {
"code": "BadRequest",
"message": "Only one path can be specified in the URL.",
"innerError": {
"request-id": "f9e94fee-082f-45af-a777-2e1d3debb99c",
"date": "2018-11-09T03:52:32"
}
}
}
which makes sense to me. How do I get the associated attachment URL with each of a ListItem
if it's there?
microsoft-graph sharepoint-online
I am using Microsoft Graph Beta APIS to access SharePoint Online. The current GET
to retrieve a list with its ListItems
is like
/beta/sites/mytenant.sharepoint.com:/sites/mysite:/lists/mylist?select=id,name,lastModifiedDateTime&expand=items(expand=fields(select=Title,Attachments,OptyNumber))
This works great and returns me Title
, Attachments
, and OptyNumber
. Now, the list may have attachments and I need the web URL of the attachments. How do I do that?
Trying /beta/sites/mytenant.sharepoint.com:/sites/mysite:/lists/mylist:/attachments
throws error
{
"error": {
"code": "BadRequest",
"message": "Only one path can be specified in the URL.",
"innerError": {
"request-id": "f9e94fee-082f-45af-a777-2e1d3debb99c",
"date": "2018-11-09T03:52:32"
}
}
}
which makes sense to me. How do I get the associated attachment URL with each of a ListItem
if it's there?
microsoft-graph sharepoint-online
microsoft-graph sharepoint-online
edited Nov 9 at 16:59
Marc LaFleur
18.1k31833
18.1k31833
asked Nov 9 at 3:53
Vik
1,88484087
1,88484087
You said it is returningAttachments
in your original query, what exactly is it returning?
– Marc LaFleur
Nov 9 at 17:05
a true false if attachment exists or not. but not the actual link
– Vik
Nov 9 at 21:50
Have tested the endpoint too, the attachment returns Boolean. It maybe by design, so that the graph API doesn't want to return the actual now. You should try to submit one feature request for this.
– Seiya Su
Nov 12 at 3:14
Is the list a Document Library or just a traditional list? Its possible you need to use the OneDrive API to access the attachment.
– Marc LaFleur
Nov 12 at 21:46
Sorry to say ms docs are and overall support is pretty lame around these. SO is full of these and no luck. not even a clear yes no on if it is even supported, if no then what is the way.
– Vik
Nov 15 at 0:44
add a comment |
You said it is returningAttachments
in your original query, what exactly is it returning?
– Marc LaFleur
Nov 9 at 17:05
a true false if attachment exists or not. but not the actual link
– Vik
Nov 9 at 21:50
Have tested the endpoint too, the attachment returns Boolean. It maybe by design, so that the graph API doesn't want to return the actual now. You should try to submit one feature request for this.
– Seiya Su
Nov 12 at 3:14
Is the list a Document Library or just a traditional list? Its possible you need to use the OneDrive API to access the attachment.
– Marc LaFleur
Nov 12 at 21:46
Sorry to say ms docs are and overall support is pretty lame around these. SO is full of these and no luck. not even a clear yes no on if it is even supported, if no then what is the way.
– Vik
Nov 15 at 0:44
You said it is returning
Attachments
in your original query, what exactly is it returning?– Marc LaFleur
Nov 9 at 17:05
You said it is returning
Attachments
in your original query, what exactly is it returning?– Marc LaFleur
Nov 9 at 17:05
a true false if attachment exists or not. but not the actual link
– Vik
Nov 9 at 21:50
a true false if attachment exists or not. but not the actual link
– Vik
Nov 9 at 21:50
Have tested the endpoint too, the attachment returns Boolean. It maybe by design, so that the graph API doesn't want to return the actual now. You should try to submit one feature request for this.
– Seiya Su
Nov 12 at 3:14
Have tested the endpoint too, the attachment returns Boolean. It maybe by design, so that the graph API doesn't want to return the actual now. You should try to submit one feature request for this.
– Seiya Su
Nov 12 at 3:14
Is the list a Document Library or just a traditional list? Its possible you need to use the OneDrive API to access the attachment.
– Marc LaFleur
Nov 12 at 21:46
Is the list a Document Library or just a traditional list? Its possible you need to use the OneDrive API to access the attachment.
– Marc LaFleur
Nov 12 at 21:46
Sorry to say ms docs are and overall support is pretty lame around these. SO is full of these and no luck. not even a clear yes no on if it is even supported, if no then what is the way.
– Vik
Nov 15 at 0:44
Sorry to say ms docs are and overall support is pretty lame around these. SO is full of these and no luck. not even a clear yes no on if it is even supported, if no then what is the way.
– Vik
Nov 15 at 0:44
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53219629%2fmicrosoft-graph-api-to-get-attachment-link-for-a-list-item%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You said it is returning
Attachments
in your original query, what exactly is it returning?– Marc LaFleur
Nov 9 at 17:05
a true false if attachment exists or not. but not the actual link
– Vik
Nov 9 at 21:50
Have tested the endpoint too, the attachment returns Boolean. It maybe by design, so that the graph API doesn't want to return the actual now. You should try to submit one feature request for this.
– Seiya Su
Nov 12 at 3:14
Is the list a Document Library or just a traditional list? Its possible you need to use the OneDrive API to access the attachment.
– Marc LaFleur
Nov 12 at 21:46
Sorry to say ms docs are and overall support is pretty lame around these. SO is full of these and no luck. not even a clear yes no on if it is even supported, if no then what is the way.
– Vik
Nov 15 at 0:44