Get items from SharePoint List (Model Usage) via SharePoint Rest API (GetItems)

Copper Contributor

Dear Support,


I have a question about a SharePoint list "Model Usage".

 

=============
Here are my questions:
1. For the list "Model Usage", is there any internal issue (Sharepoint side) when getting the items via SharePoint API? I found that the behaviour is not the same as other list. 
2. Can you suggest a correct way to get the items from this "Model Usage" list via SharePoint API (GetItems)

=============

 

I tried to get the items from the list "Model Usage", I found that the server side will return the following error, but it's normal (no error) for other list.

{
    "odata.error": {
        "code""-2147024809, System.ArgumentException",
        "message": {
            "lang""en-US",
            "value""{0078DB11-41BB-40C5-B647-18834694F4C2}"
        }
    }
}



Here's my request message:
-----

https://{tanent_name}.sharepoint.com/sites/trailaddress/_api/web/lists('2aa87e02-0df5-44dd-8e42-cfe8...
-----

Here's my CAML query in the request body
-----

{"query":{"ViewXml":"<View Scope ='RecursiveAll'><Query><Where><Eq><FieldRef Name=\"FileDirRef\"\/><Value Type=\"Lookup\">\/sites\/trailaddress\/ModelUsage<\/Value><\/Eq><\/Where><\/Query><\/View>","__metadata":{"type":"SP.CamlQuery"}}}
-----


===
In fact, I tried another test with "items" API. The behaviour is also strange. Here's the request and the response message.

Request: 

https://{tanent_name}.sharepoint.com/sites/trailaddress/_api/web/lists('2aa87e02-0df5-44dd-8e42-cfe8...

Response:

{
    "odata.error": {
        "code""-2147467259, Microsoft.SharePoint.SPException",
        "message": {
            "lang""en-US",
            "value""Cannot complete this action.\n\nPlease try again."
        }
    }
}

 








0 Replies