# External locations (IRPCExternalLocationsAdmin)

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/

Administers the vault's external sources: file folders and mail boxes from which the server
imports or links content.

Use this interface to add, modify and delete external locations in a vault.

An external location is a definition of a local or remote location
that contains files and folders. M-Files includes the files in such
a location in the document vault and monitors the location for
file additions and removals.

- **gRPC service:** `MFiles.IRPCExternalLocationsAdmin`
- **Book and level:** [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md), specialized
- **Methods:** 6
- **Proto file:** [`mfiles/IRPCExternalLocationsAdmin.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/IRPCExternalLocationsAdmin.proto)

<a id="overview"></a>

## Overview

An external location ([ExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExternalLocation/index.md)) is a file source (a
folder the server imports files from, or links them in place) or a mail source (a mail box the
server imports messages from, see `MailProtocol`). The server's background monitor checks each
location every `update_interval` seconds. M-Files Admin calls this service. The locations are
also the items of the built-in value list 5.

- **Session and rights.** Every method requires a vault session and the vault right
  `manage_external_locations`; a normal user gets "Access denied.".
  [AddExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/AddExternalLocation/index.md) and
  [ModifyExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/ModifyExternalLocation/index.md) of a
  file source also require the server right `run_code` (system administrator), because the server
  reads that folder under its own account. Mail sources need only the vault right.
- **Calls**: [GetExternalLocations](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/GetExternalLocations/index.md),
  [AddExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/AddExternalLocation/index.md),
  [ModifyExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/ModifyExternalLocation/index.md),
  [RemoveExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/RemoveExternalLocation/index.md),
  [RefreshExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/RefreshExternalLocation/index.md)
  (check now) and
  [ImportFilesFromLinkedLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/ImportFilesFromLinkedLocation/index.md)
  (turn linked files into imported ones).

<a id="methods"></a>

## Methods

| Method | Summary | Facts |
|---|---|---|
| [AddExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/AddExternalLocation/index.md) | Creates an external location. | `admin` `session` |
| [GetExternalLocations](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/GetExternalLocations/index.md) | Gets all external locations of the vault. | `admin` `session` `idempotent` |
| [ImportFilesFromLinkedLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/ImportFilesFromLinkedLocation/index.md) | Converts a file source that links files into one that imports them, and starts importing. | `admin` `session` |
| [ModifyExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/ModifyExternalLocation/index.md) | Saves a changed external location. | `admin` `session` `idempotent` |
| [RefreshExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/RefreshExternalLocation/index.md) | Checks the location now instead of waiting for the next automatic round. | `admin` `session` `idempotent` |
| [RemoveExternalLocation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExternalLocationsAdmin/RemoveExternalLocation/index.md) | Deletes an external location, optionally destroying the documents whose files are linked to it. | `admin` `session` |
