1

If I make a GET request in Sharepoint 2016 Rest API using header accept "application/json;odata.metadata=minimal" in url /_api/web/lists/GetByTitle('Pages')/Fields, and library pages (o other list or library) has a Taxonomy Fields return error.

{
"odata.error": {
    "code": "-2147467261, System.ArgumentNullException",
    "message": {
        "lang": "es-ES",
        "value": "Value cannot be null.\r\nParameter name: type"
    }
}

if remove Taxonomy Fields, it works perfectly.

if i make the request using accept "application/json;odata=verbose" with a Taxonomy Fields works perfectly too.

Summary:

If i have taxonomy fields odata.metadata=minimal don't work

Best Regards

  • Is your question whether or not it should work with `odata.metadata=minimal`...? If so, it appears not, and every example or documentation reference I can find online always shows `verbose` being used with Taxonomy fields. – Stevangelista Jun 03 '18 at 18:16
  • Hi @Stevangelista! The request using Verbose return a large amount of unnecessary data. Verbose, yes, works... – Marcelo Fernandes Jun 05 '18 at 10:19
  • Based on that thread, it looks like you're still using `verbose` in your solution, no? – Stevangelista Jun 25 '18 at 14:30
  • Yes... To this day, Sharepoint 2016 has a bug for this call ... I had to use verbose myself ... It was a bit confusing the answer, because the SPFX component that I am using does not have to be with the question ... I will edit... – Marcelo Fernandes Jun 26 '18 at 14:49
  • Is this a known issue? I'm running against this issue but I'm not sure how to address it. I'm using pnpjs and trying to explicitly set odata to verbose but it's still getting overriden to run as under `nometadata` and failing – Batman Nov 13 '18 at 23:45

0 Answers0