I faced a problem using the _api/lists/GetByTitle()
with the Sharepoint default document library "Documents". This list title is automatically translated in all language (in Italian is "Documenti") inside the platform and also as output of other REST service as _api/lists
. However if I use "Documenti" as title for the GetByTitle
it returns an error. Instead if I put "Documents" it works as expected.
My spfx app make the user search a document by following this steps:
1) Select a library from a drop down list filled due to _api/lists
2) Use a Picker to find a document in the library selected at step 1. Picker show results according to what user type by performing a _api/lists/GetByTitle('Title')
call.
This approach works every time except with Documenti since it is not the real library title (even if _api/Lists
say so).
So I was wondering if there is a way to make it work with translated Title. Or if is it possible to retrieve the real title when using _api/lists
and not the translated one.
Does anyone faced this issue before?
Here you can see how calling _api/Lists
you obtain Title "Documenti"
<d:TemplateFeatureId m:type="Edm.Guid">00bfea71-e717-4e80-aa17-d0c71b360101</d:TemplateFeatureId>
<d:Title>Documenti</d:Title>
</m:properties>