I have a list with 3 lookup columns and some of the items have attachments in it. I need to get the list items using REST API with details about any attachments in the items.

When I try to run the below query, I do not get any attachment details, though they are there.


But when I try to run the query with additional select for AttachmentFiles/FileName,AttachmentFiles/ServerRelativeUrl it throws me error.


Below is the error message that I receive.

<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-2147024809, System.ArgumentException</m:code>
<m:message xml:lang="en-US">
Column 'Attachments' does not exist. It may have been deleted by another user.

What am I doing wrong here?

Update 1:

I get same error with below query.

  • can you try it as http://<SITE>/_api/web/lists/getbytitle('Narrative%20Framework')/items? $select=Lookup1/Title,Lookup2/Title,Lookup3/Title,AttachmentFiles &$expand=AttachmentFiles,Lookup1,Lookup2,Lookup3 and check ? Aug 4 '17 at 10:14
  • @GautamSheth: Tried it, but didn't work
    – Naveen
    Aug 4 '17 at 10:20
  • sorry, Can you try it again as http://<SITE>/_api/web/lists/getbytitle('Narrative%20Framewo‌​rk')/items?$select=Lookup1/Title,Lookup2/Title,Lookup3/Title,Attachments,Attachment‌​Files&$expand=AttachmentFiles,Lookup1,Lookup2,Lookup3 and check ? Aug 4 '17 at 10:26
  • @GautamSheth: That worked! If you can post this as answer then I will be happy to accept it as answer Also why is Attac‌​hment‌ required in select query?
    – Naveen
    Aug 5 '17 at 11:16

Looks like you are missing the Attachments column in the API.

Try it as below:

  • Getting "Column 'Attachments' does not exist. It may have been deleted by another user." Using this Jan 19 '20 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.