Operations (sample payloads)
Main operations
Create table
Create a new table in a worksheet. Sample Input
{
"workbook_id": "1A2B3C4D5E6F7G8H",
"worksheet_information": "Sheet1",
"table_address": \{
"beginning_cell": "A1",
"ending_cell": "D10"
\},
"has_headers": true
}
Sample Output
\{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/worksheets('Sheet1')/tables/$entity",
"@odata.type": "#microsoft.graph.workbookTable",
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/worksheets('Sheet1')/tables('Table1')",
"id": "Table1",
"name": "Table1",
"showHeaders": true,
"showTotals": false,
"style": "TableStyleMedium2",
"highlightFirstColumn": false,
"highlightLastColumn": false,
"showBandedColumns": false,
"showBandedRows": true,
"showFilterButton": true,
"legacyId": "1"
\}
Create table column
Create a new table column. Sample Input
\{
"workbook_id": "1A2B3C4D5E6F7G8H9I0J",
"table_information": "Sales2023",
"column_name": "Revenue",
"column_index": 3,
"column_value": [
[
"1000"
],
[
"1500"
],
[
"2000"
],
[
"1800"
],
[
"2200"
]
]
\}
Sample Output
\{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#workbook/tables('Sales2023')/columns/$entity",
"@odata.id": "https://graph.microsoft.com/v1.0/me/drive/items/1A2B3C4D5E6F7G8H9I0J/workbook/tables('Sales2023')/columns('Revenue')",
"values": [
[
"Revenue"
],
[
"1000"
],
[
"1500"
],
[
"2000"
],
[
"1800"
],
[
"2200"
]
],
"id": "4",
"index": 3,
"name": "Revenue"
\}
Create table row
Create a new table row. Sample Input
\{
"workbook_id": "1A2B3C4D5E6F7G8H9I0J",
"table_information": "Sales2023",
"row_index": 5,
"row_values": [
[
"2023-05-15",
"John Doe",
"Widget X",
100,
19.99,
1999
]
]
\}
Sample Output
\{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#workbook/tables('Sales2023')/rows/$entity",
"@odata.type": "#microsoft.graph.workbookTableRow",
"@odata.id": "https://graph.microsoft.com/v1.0/me/drive/items/1A2B3C4D5E6F7G8H9I0J/workbook/tables('Sales2023')/rows/index(5)",
"index": 5,
"values": [
[
"2023-05-15",
"John Doe",
"Widget X",
100,
19.99,
1999
]
]
\}
Create worksheet
Add a new worksheet to the workbook. Sample Input
\{
"workbook_id": "1A2B3C4D5E6F7G8H9I0J",
"worksheet_name": "Sales Report Q2"
\}
Sample Output
\{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H9I0J')/workbook/worksheets/$entity",
"@odata.type": "#microsoft.graph.workbookWorksheet",
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H9I0J')/workbook/worksheets('Sales%20Report%20Q2')",
"id": "SalesReportQ2!A1:XFD1048576",
"name": "Sales Report Q2",
"position": 3,
"visibility": "Visible"
\}
Get shared item
Retrieve a shared item by using a shared URL. Sample Input
{
"shared_url": "https://company-my.sharepoint.com/:f:/p/johndoe/AbCdEfGhIjKlMnOpQrStUvWxYz123456?e=7890AB"
}
Sample Output
\{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#shares('u!aHR0cHM6Ly9jb21wYW55LW15LnNoYXJlcG9pbnQuY29tLzpmOi9wL2pvaG5kb2UvQWJDZEVmR2hJaktsTW5PcFFyU3RVdld4WXoxMjM0NTY_ZT03ODkwQUI=')/driveItem/$entity",
"name": "Project Documents"
\}
List columns
Retrieve a list of table column objects. Sample Input
\{
"workbook_id": "1A2B3C4D5E6F7G8H",
"table_information": "Sales2023",
"page_size": 50,
"skip": 0
\}
Sample Output
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Sales2023')/columns",
"value": [
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Sales2023')/columns('1')",
"values": [
[
"Date"
]
],
"id": "1",
"index": 0,
"name": "Date"
\},
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Sales2023')/columns('2')",
"values": [
[
"Product"
]
],
"id": "2",
"index": 1,
"name": "Product"
\},
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Sales2023')/columns('3')",
"values": [
[
"Quantity"
]
],
"id": "3",
"index": 2,
"name": "Quantity"
\},
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Sales2023')/columns('4')",
"values": [
[
"Revenue"
]
],
"id": "4",
"index": 3,
"name": "Revenue"
\}
]
}
List rows
Retrieve a list of table row objects. Sample Input
\{
"workbook_id": "1A2B3C4D5E6F7G8H",
"table_information": "Employees",
"page_size": 50,
"skip": 0
\}
Sample Output
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Employees')/rows",
"value": [
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Employees')/rows(0)",
"index": 0,
"values": [
[
"John",
"Doe",
"Sales",
50000
]
]
\},
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Employees')/rows(1)",
"index": 1,
"values": [
[
"Jane",
"Smith",
"Marketing",
55000
]
]
\},
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Employees')/rows(2)",
"index": 2,
"values": [
[
"Bob",
"Johnson",
"IT",
60000
]
]
\}
]
}
List tables
Retrieve a list of table objects. Sample Input
\{
"workbook_id": "1A2B3C4D5E6F7G8H",
"page_size": 50,
"skip": 0
\}
Sample Output
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables",
"value": [
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Table1')",
"style": "TableStyleMedium2",
"name": "Sales Data",
"showFilterButton": true,
"id": "Table1",
"highlightLastColumn": false,
"highlightFirstColumn": true,
"legacyId": "1",
"showBandedColumns": false,
"showBandedRows": true,
"showHeaders": true,
"showTotals": false
\},
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H')/workbook/tables('Table2')",
"style": "TableStyleLight1",
"name": "Inventory",
"showFilterButton": false,
"id": "Table2",
"highlightLastColumn": false,
"highlightFirstColumn": false,
"legacyId": "2",
"showBandedColumns": true,
"showBandedRows": false,
"showHeaders": true,
"showTotals": true
\}
]
}
List worksheets
Retrieve a list of worksheet objects. Sample Input
\{
"workbook_id": "1A2B3C4D5E6F7G8H9I0J",
"page_size": 50,
"skip": 0
\}
Sample Output
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H9I0J')/workbook/worksheets",
"value": [
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H9I0J')/workbook/worksheets('Sheet1')",
"id": "Sheet1",
"name": "Sheet1",
"position": 0,
"visibility": "Visible"
\},
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H9I0J')/workbook/worksheets('Sheet2')",
"id": "Sheet2",
"name": "Sheet2",
"position": 1,
"visibility": "Visible"
\},
\{
"@odata.id": "/users('user@example.com')/drive/items('1A2B3C4D5E6F7G8H9I0J')/workbook/worksheets('Sheet3')",
"id": "Sheet3",
"name": "Sheet3",
"position": 2,
"visibility": "Hidden"
\}
]
}
Raw HTTP request (advanced)
Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication. Sample Input
{
"method": "GET",
"url": {
"endpoint": "/users"
},
"headers": [
\{
"key": "Accept",
"value": "application/json"
\}
],
"query_parameters": [
\{
"key": "top",
"value": "10"
\}
],
"body": {
"none": null
},
"include_raw_body": false,
"parse_response": "true"
}
Sample Output
{
"response": {
"status_code": 200,
"headers": \{
"Content-Type": "application/json",
"Cache-Control": "no-cache"
\},
"body": {
"value": [
\{
"id": "87d349ed-44d7-43e1-9a83-5f2406dee5bd",
"displayName": "Adele Vance",
"userPrincipalName": "AdeleV@contoso.com",
"jobTitle": "Product Marketing Manager",
"mail": "AdeleV@contoso.com",
"mobilePhone": "+1 425 555 0109",
"officeLocation": "18/2111"
\},
\{
"id": "1e3d0f1a-8db3-47f3-85ac-9e6a8a980d4f",
"displayName": "Alex Wilber",
"userPrincipalName": "AlexW@contoso.com",
"jobTitle": "Marketing Assistant",
"mail": "AlexW@contoso.com",
"mobilePhone": "+1 425 555 0105",
"officeLocation": "131/1105"
\}
]
}
}
}
DDL operations
List tables (DDL)
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
{}
Sample Output
[
\{
"tableName": "Employees",
"ddl": "CREATE TABLE Employees (\n EmployeeID INT PRIMARY KEY,\n FirstName VARCHAR(50),\n LastName VARCHAR(50),\n Email VARCHAR(100),\n HireDate DATE,\n DepartmentID INT\n);"
\},
\{
"tableName": "Departments",
"ddl": "CREATE TABLE Departments (\n DepartmentID INT PRIMARY KEY,\n DepartmentName VARCHAR(100),\n ManagerID INT\n);"
\},
\{
"tableName": "Projects",
"ddl": "CREATE TABLE Projects (\n ProjectID INT PRIMARY KEY,\n ProjectName VARCHAR(100),\n StartDate DATE,\n EndDate DATE,\n Budget DECIMAL(10, 2)\n);"
\}
]
List worksheets (DDL)
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
{}
Sample Output
{
"worksheets": [
\{
"id": "Sheet1!A1:XFD1048576",
"name": "Sheet1",
"position": 0,
"visibility": "Visible"
\},
\{
"id": "Sheet2!A1:XFD1048576",
"name": "Sheet2",
"position": 1,
"visibility": "Visible"
\},
\{
"id": "Sheet3!A1:XFD1048576",
"name": "Sheet3",
"position": 2,
"visibility": "Hidden"
\}
]
}