Shares & Permissions via MyWorkDrive API


Managing Shares and Permissions via MyWorkDrive Server Public API

MyWorkDrive Server version 7.1 introduces a powerful new Public API that allows administrators to automate the creation, configuration, and removal of file shares and permissions using HTTP requests. This API is designed for advanced users who need to integrate share management into external systems, scripts, or orchestration workflows.

Getting Started

  1. Enable the API

Go to Admin Panel > Enterprise Tab

Enable the Public API

Copy your API Key

Note:

All requests must include the API key in the HTTP header:
Header: ApiKey: {your-api-key}

In cURL, for example,
curl -H "ApiKey: abcd12345"

  1. Access the API API is hosted locally (by default) on:
    http://127.0.0.1:8360

If you wish to make your Share management API available over the lan or internet, see additional information regarding publishing for remote access below.

Share Management Endpoints

Operation Method Endpoint Notes
List all shares GET /api/v3/ListShares

Returns array of all shares

Get a share by name

GET

/api/v3/GetShare?name={shareName}

Returns share if it exists

Create a new share

GET

/api/v3/CreateShare?name={name}&path={path}&storageProviderId={id}

Requires storageProviderId

Delete a share

GET

/api/v3/DeleteShare?name={name}

Does NOT auto-remove permissions

Note: Shares will only appear in the Admin Panel if at least one permission is assigned. API changes may take up to 5 minutes to reflect due to caching.

Permission Management Endpoints

Operation

Method

Endpoint

Notes

List all permissions

GET

/api/v3/ListPermissions

Lists all entries

List permissions for user/group

GET

/api/v3/ListPermissions?name={name}

Filters by name

Create/Update permission

GET

/api/v3/PlacePermission?...

See below

Delete permission

GET

/api/v3/DeletePermission?...

All fields required

PlacePermission Parameters

Parameter

Type

Required

Description

name

string

User or Group name

domainName

string

for users optional for groups in Entra ID mode

Use empty string for Entra ID groups

shareName

string

Name of the share

isGroup

boolean

true for groups

webClientAllowed

boolean

Enable web client access

desktopClientAllowed

boolean

Enable mapped drive (desktop) access

mobileClientAllowed

boolean

Enable mobile app access

publicSharingEnabled

boolean

Allow public link sharing

dlpDownloadEnabled

boolean

Allow file download (if DLP enabled)

dlpOfficeOnlineEditEnabled

boolean

Allow Office Online editing only

Example (for Entra ID Group): GET /api/v3/PlacePermission?name=All%20Entra%20ID%20Members&shareName=LocalTest&domainName=&isGroup=true&webClientAllowed=true&desktopClientAllowed=true&mobileClientAllowed=true&publicSharingEnabled=true&dlpDownloadEnabled=true&dlpOfficeOnlineEditEnabled=true

Storage Providers

To create a share, you need the storageProviderId.

How to Retrieve It:

  1. Go to Admin Panel > Integrations
  2. Create a new storage entry (e.g., Azure Blob, Azure Files, SMB)
  3. Check the General.xml file in Wanpath\wanpath.data\settings for the generated storageProviderId

⚠️ Currently, API support for managing storage providers (add/delete) is under consideration.

Notes and Limitations

  • Cache Delay: Updates may take up to 5 minutes to appear in the Admin Panel.
  • Delete Behavior: Deleting a share does NOT automatically delete associated permissions (must be done as a separate post).
  • HTTP Verbs: The API is verb-agnostic (GET, POST, etc.), but examples here use GET for simplicity.
  • Spaces & Encoding: URL parameters must be URL-encoded (e.g., All Entra ID Members → All%20Entra%20ID%20Members).
  • Modifications: To modify a share or permission, delete and re-create it.

Security Considerations

This API is designed to run on a private local network interface by default. Making it publicly accessible should be done with extreme caution.

For security, the Management API is hosted on a separate IIS site Wanpath.Admin.API on port 8360. For additional security, add a host name and SSL certificate to this IIS site while continuing to limit access via firewall or authentication controls.

Publishing for Remote Access

When enabled, the Share Management API is bound to the local host IP on port 8360, and no changes are made to Windows firewall. I t will only be accessable from the MyWorkDrive server itself

The following steps need to be taken to make port 8360 available remotely.

  1. Adjust the firewall in the local security product (Windows Defender firewall, at minimum) to permit connections on port 8360 by adding an inbound rule on port 8360.
  2. Edit the bindings in IIS for the Wanpath.Admin.API site to adjust the allowed IP addresses from 127.0.0.1 to use the machine IP.

This will permit access via http to port 8360 from other machines on the lan.


We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@myworkdrive.com.