I have a SharePoint List - "MyList". And it is accessible on the web via
https://<organization>.sharepoint.com/sites/MySite/Lists/MyList/AllItems.aspx
Also, it is accessible and used via APIs and its API endpoint is
https://<organization>.sharepoint.com/sites/MySite/_api/web/lists/getbytitle('MyList')/items
The call to an API endpoint returns the JSON object with the complete list of fields .. and thre are a lot of them, and I do not need them all.
I heard as a mention, that I can create a custom view with only certain fields and have its url as a new endpoint. This way I'd obtain the JSON list of only items that I Need. Is it possible? Or is it I misinterpreted something? And if it is possible, when I create a list view, how do I obtain the URL for an API endpoint for that specific view? (if it is possible).
I know of the odata filtered queries, where I can "select" only the particular fields in this manner
https://<organization>.sharepoint.com/sites/MySite/_api/web/lists/getbytitle('MyList')/items?$select=Title,Products/Name&$expand=Products/Name
.
But, the problem is that I will be using it via Azure Data Factory via SharePoint connector (type of Linked Service / Dataset) and there due to given schematics of the pipelines I am lacking ability to specify select filters for all the different lists the pipeline can navigate. IF I could have a specific url to supply as parameter it would solve my issue.
Any help is appreciated.
You can use Odata filtered queries in ADF also.
I followed this Documentation and able to use the Odata queries.
Here, I have created share point connector linked service with url https://<organization>.sharepoint.com/sites/<site_name>
and dataset by following the steps in the above documentation.
In the dataset, give the list name, if you want to use this dataset for more lists, you can use dataset parameters for it(click on Edit and use dynamic content) and give the required name at every usage of it.
To get the list, use lookup activity. In the lookup activity, use the Query option. For sample I have used the below queries and got expected results.
$select=Title
$filter=Title eq 'rakeshtitle'