onedrive.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
Drive
get
drive.get
Get a drive by ID
Risk: read
await corsair.onedrive.api.drive.get({});
| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | — |
select_fields | string[] | No | — |
expand_fields | string[] | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | — |
name | string | No | — |
driveType | string | No | — |
webUrl | string | No | — |
description | string | No | — |
createdDateTime | string | No | — |
lastModifiedDateTime | string | No | — |
owner | object | No | — |
quota | object | No | — |
owner full type
owner full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
quota full type
quota full type
{
deleted?: number,
remaining?: number,
total?: number,
used?: number,
state?: string
}
getGroup
drive.getGroup
Get a group’s drive
Risk: read
await corsair.onedrive.api.drive.getGroup({});
| Name | Type | Required | Description |
|---|---|---|---|
group_id | string | Yes | — |
select_fields | string[] | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | — |
name | string | No | — |
driveType | string | No | — |
webUrl | string | No | — |
description | string | No | — |
createdDateTime | string | No | — |
lastModifiedDateTime | string | No | — |
owner | object | No | — |
quota | object | No | — |
owner full type
owner full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
quota full type
quota full type
{
deleted?: number,
remaining?: number,
total?: number,
used?: number,
state?: string
}
getQuota
drive.getQuota
Get the user’s drive and quota information
Risk: read
await corsair.onedrive.api.drive.getQuota({});
| Name | Type | Required | Description |
|---|---|---|---|
select_fields | string[] | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | — |
name | string | No | — |
driveType | string | No | — |
webUrl | string | No | — |
description | string | No | — |
createdDateTime | string | No | — |
lastModifiedDateTime | string | No | — |
owner | object | No | — |
quota | object | No | — |
owner full type
owner full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
quota full type
quota full type
{
deleted?: number,
remaining?: number,
total?: number,
used?: number,
state?: string
}
getRecentItems
drive.getRecentItems
Get recently accessed drive items
Risk: read
await corsair.onedrive.api.drive.getRecentItems({});
| Name | Type | Required | Description |
|---|---|---|---|
top | number | No | — |
select | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
getRoot
drive.getRoot
Get the root folder of the user’s drive
Risk: read
await corsair.onedrive.api.drive.getRoot({});
| Name | Type | Required | Description |
|---|---|---|---|
select_fields | string[] | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | Yes | — |
size | number | No | — |
webUrl | string | No | — |
eTag | string | No | — |
cTag | string | No | — |
createdDateTime | string | No | — |
lastModifiedDateTime | string | No | — |
createdBy | object | No | — |
lastModifiedBy | object | No | — |
parentReference | object | No | — |
file | object | No | — |
folder | object | No | — |
deleted | object | No | — |
@microsoft.graph.downloadUrl | string | No | — |
root | object | No | — |
description | string | No | — |
createdBy full type
createdBy full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
lastModifiedBy full type
lastModifiedBy full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
parentReference full type
parentReference full type
{
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
}
file full type
file full type
{
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
}
folder full type
folder full type
{
childCount?: number
}
deleted full type
deleted full type
{
state?: string
}
root full type
root full type
{
}
getSharedItems
drive.getSharedItems
Get items shared with the user
Risk: read
await corsair.onedrive.api.drive.getSharedItems({});
| Name | Type | Required | Description |
|---|---|---|---|
allow_external | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
value full type
value full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
getSpecialFolder
drive.getSpecialFolder
Get a special folder (documents, photos, cameraroll)
Risk: read
await corsair.onedrive.api.drive.getSpecialFolder({});
| Name | Type | Required | Description |
|---|---|---|---|
special_folder_name | documents | photos | cameraroll | Yes | — |
select_fields | string[] | No | — |
expand_relations | string[] | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | Yes | — |
size | number | No | — |
webUrl | string | No | — |
eTag | string | No | — |
cTag | string | No | — |
createdDateTime | string | No | — |
lastModifiedDateTime | string | No | — |
createdBy | object | No | — |
lastModifiedBy | object | No | — |
parentReference | object | No | — |
file | object | No | — |
folder | object | No | — |
deleted | object | No | — |
@microsoft.graph.downloadUrl | string | No | — |
children | object[] | No | — |
createdBy full type
createdBy full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
lastModifiedBy full type
lastModifiedBy full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
parentReference full type
parentReference full type
{
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
}
file full type
file full type
{
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
}
folder full type
folder full type
{
childCount?: number
}
deleted full type
deleted full type
{
state?: string
}
children full type
children full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
list
drive.list
List available drives
Risk: read
await corsair.onedrive.api.drive.list({});
| Name | Type | Required | Description |
|---|---|---|---|
top | number | No | — |
expand | string | No | — |
select | string | No | — |
orderby | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
group_id | string | No | — |
skip_token | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id?: string,
name?: string,
driveType?: string,
webUrl?: string,
description?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
owner?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
quota?: {
deleted?: number,
remaining?: number,
total?: number,
used?: number,
state?: string
}
}[]
listActivities
drive.listActivities
List activities across the drive
Risk: read
await corsair.onedrive.api.drive.listActivities({});
| Name | Type | Required | Description |
|---|---|---|---|
top | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id?: string,
action?: {
comment?: {
},
create?: {
},
delete?: {
},
edit?: {
},
mention?: {
},
move?: {
},
rename?: {
},
restore?: {
},
share?: {
},
version?: {
}
},
actor?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
times?: {
recordedTime?: string
}
}[]
listBundles
drive.listBundles
List bundles in a drive
Risk: read
await corsair.onedrive.api.drive.listBundles({});
| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | — |
top | number | No | — |
expand | string | No | — |
filter | string | No | — |
select | string | No | — |
orderby | string | No | — |
skip_token | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
listChanges
drive.listChanges
List changes to drive items using delta
Risk: read
await corsair.onedrive.api.drive.listChanges({});
| Name | Type | Required | Description |
|---|---|---|---|
top | number | No | — |
token | string | No | — |
expand | string | No | — |
select | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
@odata.deltaLink | string | No | — |
value full type
value full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
Files
createFolder
files.createFolder
Create a new folder
Risk: write
await corsair.onedrive.api.files.createFolder({});
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | — |
user_id | string | No | — |
description | string | No | — |
parent_folder | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | Yes | — |
webUrl | string | No | — |
createTextFile
files.createTextFile
Create a new text file with content
Risk: write
await corsair.onedrive.api.files.createTextFile({});
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | — |
content | string | Yes | — |
folder | string | No | — |
user_id | string | No | — |
conflict_behavior | fail | replace | rename | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
file | object | No | — |
name | string | Yes | — |
size | number | No | — |
file full type
file full type
{
mimeType?: string
}
findFile
files.findFile
Find a file by name
Risk: read
await corsair.onedrive.api.files.findFile({});
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | — |
folder | string | No | — |
user_id | string | No | — |
include_metadata | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
odata_context | string | No | — |
value full type
value full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
findFolder
files.findFolder
Find a folder by name
Risk: read
await corsair.onedrive.api.files.findFolder({});
| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | — |
top | number | No | — |
expand | string | No | — |
folder | string | No | — |
select | string[] | No | — |
orderby | string | No | — |
user_id | string | No | — |
skip_token | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
list
files.list
List files in the root drive
Risk: read
await corsair.onedrive.api.files.list({});
| Name | Type | Required | Description |
|---|---|---|---|
top | number | No | — |
select | string[] | No | — |
user_id | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
upload
files.upload
Upload a file to OneDrive
Risk: write
await corsair.onedrive.api.files.upload({});
| Name | Type | Required | Description |
|---|---|---|---|
file | object | Yes | — |
folder | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
drive_id | string | No | — |
description | string | No | — |
defer_commit | boolean | No | — |
if_match_etag | string | No | — |
file_system_info | object | No | — |
conflict_behavior | rename | fail | replace | No | — |
file full type
file full type
{
name: string,
s3key: string,
mimetype: string
}
file_system_info full type
file_system_info full type
{
createdDateTime?: string,
lastAccessedDateTime?: string,
lastModifiedDateTime?: string
}
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
file | object | No | — |
name | string | Yes | — |
size | number | No | — |
file full type
file full type
{
mimeType?: string
}
Items
checkin
items.checkin
Check in a checked-out drive item
Risk: write
await corsair.onedrive.api.items.checkin({});
| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | — |
driveItem_id | string | Yes | — |
comment | string | No | — |
checkInAs | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | — |
checkout
items.checkout
Check out a drive item for editing
Risk: write
await corsair.onedrive.api.items.checkout({});
| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | — |
driveItem_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | — |
copy
items.copy
Copy a drive item
Risk: write
await corsair.onedrive.api.items.copy({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
name | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
drive_id | string | No | — |
group_id | string | No | — |
children_only | boolean | No | — |
parent_reference | object | No | — |
conflict_behavior | fail | replace | rename | No | — |
include_all_version_history | boolean | No | — |
parent_reference full type
parent_reference full type
{
id?: string,
driveId?: string
}
| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | — |
item_id | string | No | — |
message | string | Yes | — |
web_url | string | No | — |
monitor_url | string | No | — |
status_code | number | Yes | — |
delete
items.delete
Delete a drive item [DESTRUCTIVE]
Risk: destructive
await corsair.onedrive.api.items.delete({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
if_match | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | — |
deletePermanently
items.deletePermanently
Permanently delete a drive item [DESTRUCTIVE]
Risk: destructive
await corsair.onedrive.api.items.deletePermanently({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
drive_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | — |
discardCheckout
items.discardCheckout
Discard the checkout of a drive item
Risk: write
await corsair.onedrive.api.items.discardCheckout({});
| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | — |
driveItem_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | — |
download
items.download
Download a file
Risk: read
await corsair.onedrive.api.items.download({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
file_name | string | Yes | — |
drive_id | string | No | — |
user_id | string | No | — |
format | pdf | html | No | — |
if_none_match | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
content | string | Yes | — |
downloadAsFormat
items.downloadAsFormat
Download a file converted to a different format
Risk: read
await corsair.onedrive.api.items.downloadAsFormat({});
| Name | Type | Required | Description |
|---|---|---|---|
path_and_filename | string | Yes | — |
file_name | string | Yes | — |
format | pdf | html | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
content | string | Yes | — |
downloadByPath
items.downloadByPath
Download a file by path
Risk: read
await corsair.onedrive.api.items.downloadByPath({});
| Name | Type | Required | Description |
|---|---|---|---|
item_path | string | Yes | — |
file_name | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
content | string | Yes | — |
downloadVersion
items.downloadVersion
Download a specific version of a file
Risk: read
await corsair.onedrive.api.items.downloadVersion({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
version_id | string | Yes | — |
file_name | string | Yes | — |
drive_id | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
content | string | Yes | — |
follow
items.follow
Follow a drive item
Risk: write
await corsair.onedrive.api.items.follow({});
| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | — |
driveItem_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | No | — |
size | number | No | — |
webUrl | string | No | — |
createdDateTime | string | No | — |
lastModifiedDateTime | string | No | — |
get
items.get
Get a drive item by ID
Risk: read
await corsair.onedrive.api.items.get({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
drive_id | string | No | — |
select_fields | string[] | No | — |
expand_relations | string[] | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | No | — |
size | number | No | — |
webUrl | string | No | — |
eTag | string | No | — |
cTag | string | No | — |
createdDateTime | string | No | — |
lastModifiedDateTime | string | No | — |
createdBy | object | No | — |
lastModifiedBy | object | No | — |
parentReference | object | No | — |
file | object | No | — |
folder | object | No | — |
deleted | object | No | — |
@microsoft.graph.downloadUrl | string | No | — |
children | object[] | No | — |
createdBy full type
createdBy full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
lastModifiedBy full type
lastModifiedBy full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
parentReference full type
parentReference full type
{
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
}
file full type
file full type
{
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
}
folder full type
folder full type
{
childCount?: number
}
deleted full type
deleted full type
{
state?: string
}
children full type
children full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
getDriveItemBySharingUrl
items.getDriveItemBySharingUrl
Get a drive item by sharing URL
Risk: read
await corsair.onedrive.api.items.getDriveItemBySharingUrl({});
| Name | Type | Required | Description |
|---|---|---|---|
sharing_url | string | No | — |
prefer_redeem | redeemSharingLinkIfNecessary | redeemSharingLink | No | — |
select_fields | string[] | No | — |
expand_children | boolean | No | — |
share_id_or_encoded_url | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | No | — |
size | number | No | — |
webUrl | string | No | — |
eTag | string | No | — |
cTag | string | No | — |
createdDateTime | string | No | — |
lastModifiedDateTime | string | No | — |
file | object | No | — |
folder | object | No | — |
@microsoft.graph.downloadUrl | string | No | — |
parentReference | object | No | — |
item_id | string | No | — |
drive_id | string | No | — |
file full type
file full type
{
mimeType?: string
}
folder full type
folder full type
{
childCount?: number
}
parentReference full type
parentReference full type
{
driveId?: string,
id?: string,
path?: string
}
getFollowed
items.getFollowed
Get a followed drive item
Risk: read
await corsair.onedrive.api.items.getFollowed({});
| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | — |
driveItem_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
file | object | No | — |
name | string | Yes | — |
size | number | No | — |
folder | object | No | — |
webUrl | string | No | — |
followed | boolean | No | — |
file full type
file full type
{
mimeType?: string
}
folder full type
folder full type
{
childCount?: number
}
getThumbnails
items.getThumbnails
Get thumbnails for a drive item
Risk: read
await corsair.onedrive.api.items.getThumbnails({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
drive_id | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
group_id | string | No | — |
select | string | No | — |
original_orientation | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
value full type
value full type
{
id?: string,
large?: {
height?: number,
width?: number,
url?: string,
content?: string
},
medium?: {
height?: number,
width?: number,
url?: string,
content?: string
},
small?: {
height?: number,
width?: number,
url?: string,
content?: string
},
source?: {
height?: number,
width?: number,
url?: string,
content?: string
}
}[]
getVersions
items.getVersions
Get versions of a drive item
Risk: read
await corsair.onedrive.api.items.getVersions({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
drive_id | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
group_id | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
value full type
value full type
{
id: string,
lastModifiedDateTime?: string,
size?: number,
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
published?: {
level?: string,
versionId?: string
}
}[]
listActivities
items.listActivities
List activities on a drive item
Risk: read
await corsair.onedrive.api.items.listActivities({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
drive_id | string | Yes | — |
top | number | No | — |
skip | string | No | — |
expand | string[] | No | — |
filter | string | No | — |
select | string[] | No | — |
orderby | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id?: string,
action?: {
comment?: {
},
create?: {
},
delete?: {
},
edit?: {
},
mention?: {
},
move?: {
},
rename?: {
},
restore?: {
},
share?: {
},
version?: {
}
},
actor?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
times?: {
recordedTime?: string
}
}[]
listFolderChildren
items.listFolderChildren
List children of a folder
Risk: read
await corsair.onedrive.api.items.listFolderChildren({});
| Name | Type | Required | Description |
|---|---|---|---|
top | number | No | — |
expand | string[] | No | — |
select | string[] | No | — |
orderby | string | No | — |
site_id | string | No | — |
drive_id | string | No | — |
next_link | string | No | — |
skip_token | string | No | — |
folder_path | string | No | — |
use_me_drive | boolean | No | — |
folder_item_id | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
move
items.move
Move a drive item to a new location
Risk: write
await corsair.onedrive.api.items.move({});
| Name | Type | Required | Description |
|---|---|---|---|
itemId | string | Yes | — |
parentReference | object | Yes | — |
name | string | No | — |
siteId | string | No | — |
userId | string | No | — |
driveId | string | No | — |
groupId | string | No | — |
description | string | No | — |
parentReference full type
parentReference full type
{
id: string,
driveId: string
}
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | No | — |
size | number | No | — |
webUrl | string | No | — |
parentReference | object | No | — |
parentReference full type
parentReference full type
{
driveId?: string,
id?: string,
path?: string
}
preview
items.preview
Get a preview URL for a drive item
Risk: read
await corsair.onedrive.api.items.preview({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
site_id | string | No | — |
user_id | string | No | — |
drive_id | string | No | — |
group_id | string | No | — |
share_id | string | No | — |
page | string | No | — |
zoom | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
getUrl | string | No | — |
postUrl | string | No | — |
postParameters | string | No | — |
restore
items.restore
Restore a deleted drive item
Risk: write
await corsair.onedrive.api.items.restore({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
name | string | No | — |
parent_reference_id | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
file | object | No | — |
name | string | Yes | — |
size | number | No | — |
folder | object | No | — |
webUrl | string | No | — |
deleted | object | No | — |
createdDateTime | string | No | — |
parentReference | object | No | — |
lastModifiedDateTime | string | No | — |
file full type
file full type
{
mimeType?: string
}
folder full type
folder full type
{
childCount?: number
}
deleted full type
deleted full type
{
state?: string
}
parentReference full type
parentReference full type
{
driveId?: string,
id?: string,
path?: string
}
search
items.search
Search for drive items
Risk: read
await corsair.onedrive.api.items.search({});
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | — |
top | number | No | — |
expand | string | No | — |
select | string | No | — |
orderby | string | No | — |
drive_id | string | No | — |
skip_token | string | No | — |
search_scope | drive | root | No | — |
stripped_annotations | string[] | No | — |
transformed_path_query | string | No | — |
transformed_kql_operator | string | No | — |
transformed_parent_query | string | No | — |
transformed_wildcard_query | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
unfollow
items.unfollow
Unfollow a drive item
Risk: write
await corsair.onedrive.api.items.unfollow({});
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | — |
updateContent
items.updateContent
Update the content of a file
Risk: write
await corsair.onedrive.api.items.updateContent({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
name | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
drive_id | string | No | — |
group_id | string | No | — |
file_size | number | No | — |
description | string | No | — |
defer_commit | boolean | No | — |
media_source | object | No | — |
if_match_etag | string | No | — |
file_system_info | object | No | — |
conflict_behavior | string | No | — |
drive_item_source | object | No | — |
if_none_match_etag | string | No | — |
media_source full type
media_source full type
{
contentCategory?: string
}
file_system_info full type
file_system_info full type
{
createdDateTime?: string,
lastAccessedDateTime?: string,
lastModifiedDateTime?: string
}
drive_item_source full type
drive_item_source full type
{
externalId?: string,
application?: string
}
| Name | Type | Required | Description |
|---|---|---|---|
uploadUrl | string | No | — |
expirationDateTime | string | No | — |
nextExpectedRanges | string[] | No | — |
updateMetadata
items.updateMetadata
Update metadata for a drive item
Risk: write
await corsair.onedrive.api.items.updateMetadata({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
drive_id | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
group_id | string | No | — |
name | string | No | — |
description | string | No | — |
ifMatch | string | No | — |
fileSystemInfo | object | No | — |
parent_reference_id | string | No | — |
parent_reference_drive_id | string | No | — |
additional_properties | object | No | — |
fileSystemInfo full type
fileSystemInfo full type
{
createdDateTime?: string,
lastAccessedDateTime?: string,
lastModifiedDateTime?: string
}
additional_properties full type
additional_properties full type
{
}
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
cTag | string | No | — |
eTag | string | No | — |
file | object | No | — |
name | string | Yes | — |
size | number | No | — |
folder | object | No | — |
webUrl | string | No | — |
createdDateTime | string | No | — |
lastModifiedDateTime | string | No | — |
file full type
file full type
{
mimeType?: string
}
folder full type
folder full type
{
childCount?: number
}
Permissions
createForItem
permissions.createForItem
Create a permission for a drive item
Risk: write
await corsair.onedrive.api.permissions.createForItem({});
| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | — |
driveItem_id | string | Yes | — |
roles | string[] | Yes | — |
grantedToV2 | object | Yes | — |
grantedToV2 full type
grantedToV2 full type
{
siteGroup?: {
},
application?: {
}
}
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | — |
link | object | No | — |
roles | string[] | No | — |
grantedTo | object | No | — |
grantedToV2 | object | No | — |
hasPassword | boolean | No | — |
expirationDateTime | string | No | — |
link full type
link full type
{
type?: string,
scope?: string,
webUrl?: string,
webHtml?: string,
preventsDownload?: boolean,
application?: {
id?: string,
displayName?: string
}
}
grantedTo full type
grantedTo full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
},
siteUser?: {
id?: string,
displayName?: string,
loginName?: string,
email?: string
},
siteGroup?: {
id?: string,
displayName?: string,
loginName?: string
},
group?: {
id?: string,
displayName?: string
}
}
grantedToV2 full type
grantedToV2 full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
},
siteUser?: {
id?: string,
displayName?: string,
loginName?: string,
email?: string
},
siteGroup?: {
id?: string,
displayName?: string,
loginName?: string
},
group?: {
id?: string,
displayName?: string
}
}
createLink
permissions.createLink
Create a sharing link for a drive item
Risk: write
await corsair.onedrive.api.permissions.createLink({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
type | view | edit | embed | Yes | — |
scope | anonymous | organization | users | No | — |
site_id | string | No | — |
user_id | string | No | — |
drive_id | string | No | — |
group_id | string | No | — |
password | string | No | — |
expiration_date_time | string | No | — |
retain_inherited_permissions | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | — |
link | object | No | — |
roles | string[] | No | — |
shareId | string | No | — |
hasPassword | boolean | No | — |
link full type
link full type
{
type?: string,
scope?: string,
webUrl?: string,
webHtml?: string,
preventsDownload?: boolean,
application?: {
id?: string,
displayName?: string
}
}
deleteFromItem
permissions.deleteFromItem
Delete a permission from a drive item [DESTRUCTIVE]
Risk: destructive
await corsair.onedrive.api.permissions.deleteFromItem({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
perm_id | string | Yes | — |
drive_id | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
group_id | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | — |
deleteSharePermission
permissions.deleteSharePermission
Delete a share permission [DESTRUCTIVE]
Risk: destructive
await corsair.onedrive.api.permissions.deleteSharePermission({});
| Name | Type | Required | Description |
|---|---|---|---|
shared_drive_item_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | — |
getForItem
permissions.getForItem
Get permissions for a drive item
Risk: read
await corsair.onedrive.api.permissions.getForItem({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
drive_id | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
group_id | string | No | — |
item_path | string | No | — |
select | string | No | — |
if_none_match | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id?: string,
link?: {
type?: string,
scope?: string,
webUrl?: string,
webHtml?: string,
preventsDownload?: boolean,
application?: {
id?: string,
displayName?: string
}
},
roles?: string[],
grantedTo?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
},
siteUser?: {
id?: string,
displayName?: string,
loginName?: string,
email?: string
},
siteGroup?: {
id?: string,
displayName?: string,
loginName?: string
},
group?: {
id?: string,
displayName?: string
}
},
grantedToV2?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
},
siteUser?: {
id?: string,
displayName?: string,
loginName?: string,
email?: string
},
siteGroup?: {
id?: string,
displayName?: string,
loginName?: string
},
group?: {
id?: string,
displayName?: string
}
},
hasPassword?: boolean,
expirationDateTime?: string
}[]
getShare
permissions.getShare
Get a shared item by share ID or encoded URL
Risk: read
await corsair.onedrive.api.permissions.getShare({});
| Name | Type | Required | Description |
|---|---|---|---|
share_id_or_encoded_sharing_url | string | Yes | — |
prefer_redeem | redeemSharingLinkIfNecessary | redeemSharingLink | No | — |
expand_children | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | — |
name | string | No | — |
root | object | No | — |
items | object[] | No | — |
owner | object | No | — |
children | object[] | No | — |
root full type
root full type
{
}
items full type
items full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
owner full type
owner full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
children full type
children full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
grantSharePermission
permissions.grantSharePermission
Grant a permission on a shared item
Risk: write
await corsair.onedrive.api.permissions.grantSharePermission({});
| Name | Type | Required | Description |
|---|---|---|---|
encoded_sharing_url | string | Yes | — |
roles | string[] | Yes | — |
recipients | object[] | Yes | — |
recipients full type
recipients full type
{
}[]
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
value full type
value full type
{
id?: string,
link?: {
type?: string,
scope?: string,
webUrl?: string,
webHtml?: string,
preventsDownload?: boolean,
application?: {
id?: string,
displayName?: string
}
},
roles?: string[],
grantedTo?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
},
siteUser?: {
id?: string,
displayName?: string,
loginName?: string,
email?: string
},
siteGroup?: {
id?: string,
displayName?: string,
loginName?: string
},
group?: {
id?: string,
displayName?: string
}
},
grantedToV2?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
},
siteUser?: {
id?: string,
displayName?: string,
loginName?: string,
email?: string
},
siteGroup?: {
id?: string,
displayName?: string,
loginName?: string
},
group?: {
id?: string,
displayName?: string
}
},
hasPassword?: boolean,
expirationDateTime?: string
}[]
inviteUser
permissions.inviteUser
Invite a user to access a drive item
Risk: write
await corsair.onedrive.api.permissions.inviteUser({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
roles | string[] | Yes | — |
recipients | object[] | Yes | — |
drive_id | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
group_id | string | No | — |
message | string | No | — |
password | string | No | — |
require_sign_in | boolean | No | — |
send_invitation | boolean | No | — |
expiration_date_time | string | No | — |
retain_inherited_permissions | boolean | No | — |
recipients full type
recipients full type
{
}[]
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
value full type
value full type
{
id?: string,
link?: {
type?: string,
scope?: string,
webUrl?: string,
webHtml?: string,
preventsDownload?: boolean,
application?: {
id?: string,
displayName?: string
}
},
roles?: string[],
grantedTo?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
},
siteUser?: {
id?: string,
displayName?: string,
loginName?: string,
email?: string
},
siteGroup?: {
id?: string,
displayName?: string,
loginName?: string
},
group?: {
id?: string,
displayName?: string
}
},
grantedToV2?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
},
siteUser?: {
id?: string,
displayName?: string,
loginName?: string,
email?: string
},
siteGroup?: {
id?: string,
displayName?: string,
loginName?: string
},
group?: {
id?: string,
displayName?: string
}
},
hasPassword?: boolean,
expirationDateTime?: string
}[]
listSharePermissions
permissions.listSharePermissions
List permissions on a shared drive item
Risk: read
await corsair.onedrive.api.permissions.listSharePermissions({});
| Name | Type | Required | Description |
|---|---|---|---|
shared_drive_item_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | — |
link | object | No | — |
roles | string[] | No | — |
hasPassword | boolean | No | — |
link full type
link full type
{
type?: string,
scope?: string,
webUrl?: string,
webHtml?: string,
preventsDownload?: boolean,
application?: {
id?: string,
displayName?: string
}
}
updateForItem
permissions.updateForItem
Update a permission on a drive item
Risk: write
await corsair.onedrive.api.permissions.updateForItem({});
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | — |
permission_id | string | Yes | — |
roles | string[] | Yes | — |
drive_id | string | No | — |
site_id | string | No | — |
user_id | string | No | — |
group_id | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | — |
link | object | No | — |
roles | string[] | No | — |
grantedTo | object | No | — |
grantedToV2 | object | No | — |
hasPassword | boolean | No | — |
expirationDateTime | string | No | — |
link full type
link full type
{
type?: string,
scope?: string,
webUrl?: string,
webHtml?: string,
preventsDownload?: boolean,
application?: {
id?: string,
displayName?: string
}
}
grantedTo full type
grantedTo full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
},
siteUser?: {
id?: string,
displayName?: string,
loginName?: string,
email?: string
},
siteGroup?: {
id?: string,
displayName?: string,
loginName?: string
},
group?: {
id?: string,
displayName?: string
}
}
grantedToV2 full type
grantedToV2 full type
{
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
},
siteUser?: {
id?: string,
displayName?: string,
loginName?: string,
email?: string
},
siteGroup?: {
id?: string,
displayName?: string,
loginName?: string
},
group?: {
id?: string,
displayName?: string
}
}
Sharepoint
getListItems
sharepoint.getListItems
Get items from a SharePoint list
Risk: read
await corsair.onedrive.api.sharepoint.getListItems({});
| Name | Type | Required | Description |
|---|---|---|---|
site_id | string | Yes | — |
list_id | string | Yes | — |
top | number | No | — |
skip | number | No | — |
count | boolean | No | — |
expand | string | No | — |
filter | string | No | — |
select | string | No | — |
orderby | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.count | number | No | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id?: string,
eTag?: string,
webUrl?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
contentType?: {
id?: string,
name?: string
},
fields?: {
},
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
}[]
getSite
sharepoint.getSite
Get a SharePoint site by ID
Risk: read
await corsair.onedrive.api.sharepoint.getSite({});
| Name | Type | Required | Description |
|---|---|---|---|
site_id | string | Yes | — |
expand | string | No | — |
select | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
eTag | string | No | — |
name | string | No | — |
webUrl | string | No | — |
description | string | No | — |
displayName | string | No | — |
sharepointIds | object | No | — |
isPersonalSite | boolean | No | — |
siteCollection | object | No | — |
createdDateTime | string | No | — |
lastModifiedDateTime | string | No | — |
sharepointIds full type
sharepointIds full type
{
siteId?: string,
siteUrl?: string,
webId?: string,
webUrl?: string,
listId?: string,
tenantId?: string
}
siteCollection full type
siteCollection full type
{
hostname?: string,
dataLocationCode?: string,
root?: {
}
}
getSitePage
sharepoint.getSitePage
Get a page from a SharePoint site
Risk: read
await corsair.onedrive.api.sharepoint.getSitePage({});
| Name | Type | Required | Description |
|---|---|---|---|
site_id | string | Yes | — |
page_id | string | Yes | — |
expand | string | No | — |
select | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | No | — |
title | string | No | — |
webUrl | string | No | — |
listListItemsDelta
sharepoint.listListItemsDelta
List changes to SharePoint list items using delta
Risk: read
await corsair.onedrive.api.sharepoint.listListItemsDelta({});
| Name | Type | Required | Description |
|---|---|---|---|
site_id | string | Yes | — |
list_id | string | Yes | — |
top | number | No | — |
token | string | No | — |
expand | string | No | — |
select | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
@odata.deltaLink | string | No | — |
value full type
value full type
{
id?: string,
eTag?: string,
webUrl?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
contentType?: {
id?: string,
name?: string
},
fields?: {
},
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
}
}[]
listSiteColumns
sharepoint.listSiteColumns
List site columns in a SharePoint site
Risk: read
await corsair.onedrive.api.sharepoint.listSiteColumns({});
| Name | Type | Required | Description |
|---|---|---|---|
site_id | string | Yes | — |
top | number | No | — |
skip | number | No | — |
count | boolean | No | — |
expand | string | No | — |
filter | string | No | — |
select | string | No | — |
orderby | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.count | number | No | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id?: string,
name?: string,
displayName?: string,
description?: string,
columnGroup?: string,
indexed?: boolean,
readOnly?: boolean,
required?: boolean,
hidden?: boolean,
enforceUniqueValues?: boolean,
boolean?: {
},
text?: {
allowMultipleLines?: boolean,
maxLength?: number,
textType?: string
},
number?: {
decimalPlaces?: string,
displayAs?: string,
maximum?: number,
minimum?: number
},
dateTime?: {
displayAs?: string,
format?: string
},
choice?: {
allowTextEntry?: boolean,
choices?: string[],
displayAs?: string
},
lookup?: {
allowMultipleValues?: boolean,
columnName?: string,
listId?: string
}
}[]
listSiteItemsDelta
sharepoint.listSiteItemsDelta
List changes to all drive items in a site using delta
Risk: read
await corsair.onedrive.api.sharepoint.listSiteItemsDelta({});
| Name | Type | Required | Description |
|---|---|---|---|
site_id | string | Yes | — |
top | number | No | — |
token | string | No | — |
expand | string | No | — |
select | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
@odata.deltaLink | string | No | — |
value full type
value full type
{
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string,
children?: {
id: string,
name?: string,
size?: number,
webUrl?: string,
eTag?: string,
cTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
parentReference?: {
driveId?: string,
id?: string,
path?: string,
name?: string,
siteId?: string
},
file?: {
mimeType?: string,
hashes?: {
quickXorHash?: string,
sha1Hash?: string,
sha256Hash?: string
}
},
folder?: {
childCount?: number
},
deleted?: {
state?: string
},
@microsoft.graph.downloadUrl?: string
}[]
}[]
listSiteLists
sharepoint.listSiteLists
List all lists in a SharePoint site
Risk: read
await corsair.onedrive.api.sharepoint.listSiteLists({});
| Name | Type | Required | Description |
|---|---|---|---|
site_id | string | Yes | — |
top | number | No | — |
skip | number | No | — |
count | boolean | No | — |
expand | string | No | — |
filter | string | No | — |
select | string | No | — |
orderby | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.count | number | No | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id?: string,
name?: string,
displayName?: string,
description?: string,
webUrl?: string,
eTag?: string,
createdDateTime?: string,
lastModifiedDateTime?: string,
createdBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
lastModifiedBy?: {
user?: {
id?: string,
displayName?: string
},
application?: {
id?: string,
displayName?: string
},
device?: {
id?: string,
displayName?: string
}
},
list?: {
hidden?: boolean,
template?: string
}
}[]
listSiteSubsites
sharepoint.listSiteSubsites
List subsites of a SharePoint site
Risk: read
await corsair.onedrive.api.sharepoint.listSiteSubsites({});
| Name | Type | Required | Description |
|---|---|---|---|
site_id | string | Yes | — |
top | number | No | — |
skip | number | No | — |
count | boolean | No | — |
expand | string | No | — |
filter | string | No | — |
select | string | No | — |
orderby | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.count | number | No | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id: string,
eTag?: string,
name?: string,
webUrl?: string,
description?: string,
displayName?: string,
sharepointIds?: {
siteId?: string,
siteUrl?: string,
webId?: string,
webUrl?: string,
listId?: string,
tenantId?: string
},
isPersonalSite?: boolean,
siteCollection?: {
hostname?: string,
dataLocationCode?: string,
root?: {
}
},
createdDateTime?: string,
lastModifiedDateTime?: string
}[]
Subscriptions
list
subscriptions.list
List all active subscriptions
Risk: read
await corsair.onedrive.api.subscriptions.list({});
| Name | Type | Required | Description |
|---|---|---|---|
value | object[] | Yes | — |
@odata.nextLink | string | No | — |
value full type
value full type
{
id?: string,
resource?: string | null,
changeType?: string | null,
clientState?: string | null,
notificationUrl?: string | null,
expirationDateTime?: string | null,
applicationId?: string | null,
creatorId?: string | null,
notificationQueryOptions?: string | null,
lifecycleNotificationUrl?: string | null
}[]