www.fgks.org   »   [go: up one dir, main page]

App Folder

The App Folder is a dedicated, special folder for your app. The App Folder is typically named after your app, and is found in the Apps folder in the user's OneDrive. If you request the onedrive.appfolder permission scope and the user authorizes it, your app gets read and write access to this folder. Since it behaves like any other folder in the user's OneDrive, users can add, modify, and remove content from it. Your app doesn't need to maintain logic unique to the user, which allows the user to rename or move it.

Getting authorization from the user

To have your own app's folder, you must request either the onedrive.appfolder or onedrive.readwrite permission scope when getting an access token. For more details, see app authorization.

Creating your app's folder

OneDrive creates your app's folder in the user's Apps folder, located in the root of the user's OneDrive, when your app makes the first call to the folder using the special folder namespace. Below are the most common calls your app can make to create the folder for the first time.

Naming your app's folder

When OneDrive creates your app's folder, it uses the Application name set at that point for the calling app id. You may change your app's folder name in the Microsoft account Developer Center. If you choose to do so, you may localize your app's folder name by going to the Microsoft account Developer Center and editing your app's localization settings.

Working with your app's folder

Your app's folder supports all the standard item operations.

Common task HTTP method (by path)
Get metadata for an Item GET /drive/special/approot:/{path}
List an Item's children GET /drive/special/approot:/{path}:/children
Create an Item PUT /drive/special/approot:/{parent-path}/{name}
Upload an Item's contents PUT /drive/special/approot:/{parent-path}/{name}:/content
Update an Item's contents PATCH /drive/special/approot:/{path}
Delete an Item DELETE /drive/special/approot:/{path}
Move an Item PATCH /drive/special/approot:/{path}
Copy an Item POST /drive/special/approot:/{path}:/action.copy
Download an Item's contents GET /drive/special/approot:/{path}:/content
Search for an Item GET /drive/special/approot:/{path}:/view.search
View changes on an Item GET /drive/special/approot:/{path}:/view.delta
Get thumbnails for an Item GET /drive/special/approot:/{path}:/thumbnails