Make Generic API Request
Name
generic_request
Description
This is generic endpoint. Use this endpoint when some actions are not implemented by connector. Just enter partial URL (Required), Body, Method, Header etc. Most parameters are optional except URL.
Related Tables
Parameters
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use SharePoint Online Connector in API Source component to read data or in API Destination component to read/write data:
Read from Generic Table (Bulk Read / Write) table using API Destination
This Endpoint belongs to Generic Table (Bulk Read / Write) table, therefore you cannot work with it directly. Use this table and table-operation pair instead:

ODBC application
Use these SQL queries in your ODBC application data source:
Generic API Call - Update MultiChoice / Multi Select Lookup field in SharePoint List
This example shows how to make generic API call to update fields which allow multiple value selection in either Lookup or MultiChoice datatype. This example shows 2 types of fields. One is Multi Select e.g. MyMultiSelectLookupCol / MyMultiChoiceCol and another is Single select MySingleSelectCol (i.e. Dropdown). You must supply odata.type for Field. If its MultiChoice you can supply string ID/Value but set odata.type as Edm.String rather than Edm.Int32
SELECT * from generic_request
WITH(
Url='https://graph.microsoft.com/v1.0/sites/root/lists/1d3126af-14ca-46c7-a82a-4865873756c6/items/1'
, RequestMethod='PATCH'
, Filter='$.fields'
, Headers='Content-Type: application/json || x-header2: abcd'
, Body='{
"fields": {
"MyMultiSelectLookupColLookupId@odata.type": "Collection(Edm.Int32)"
,"MyMultiSelectLookupColLookupId": [ 1 , 2 ]
,"MyMultiChoiceColumn@odata.type": "Collection(Edm.String)"
,"MyMultiChoiceColumn": [ "AAA" , "BBB" ]
,"MySingleChoiceColumnLookupId":1
}
}'
)
generic_request
endpoint belongs to
__DynamicRequest__
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Generic API Call - Update MultiChoice / Multi Select Lookup field in SharePoint List
This example shows how to make generic API call to update fields which allow multiple value selection in either Lookup or MultiChoice datatype. This example shows 2 types of fields. One is Multi Select e.g. MyMultiSelectLookupCol / MyMultiChoiceCol and another is Single select MySingleSelectCol (i.e. Dropdown). You must supply odata.type for Field. If its MultiChoice you can supply string ID/Value but set odata.type as Edm.String rather than Edm.Int32
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * from generic_request
WITH(
Url=''https://graph.microsoft.com/v1.0/sites/root/lists/1d3126af-14ca-46c7-a82a-4865873756c6/items/1''
, RequestMethod=''PATCH''
, Filter=''$.fields''
, Headers=''Content-Type: application/json || x-header2: abcd''
, Body=''{
"fields": {
"MyMultiSelectLookupColLookupId@odata.type": "Collection(Edm.Int32)"
,"MyMultiSelectLookupColLookupId": [ 1 , 2 ]
,"MyMultiChoiceColumn@odata.type": "Collection(Edm.String)"
,"MyMultiChoiceColumn": [ "AAA" , "BBB" ]
,"MySingleChoiceColumnLookupId":1
}
}''
)';
EXEC (@MyQuery) AT [LS_TO_SHAREPOINT_ONLINE_IN_GATEWAY];
generic_request
endpoint belongs to
__DynamicRequest__
table(s), and can therefore be used via those table(s).