Alluxio Proxy REST API Documentation

HTTP://[Alluxio Proxy Hostname]/api/v1

The Alluxio Proxy acts as a REST gateway for clients to communicate with the Alluxio system. There are three different endpoints:

  1. The Proxy endpoint gives general info about the proxy service.
  2. The Paths endpoint provides a RESTful gateway to the Alluxio file system for metadata operations.
  3. The Streams endpoint provides a RESTful gateway to the Alluxio file system for data operations.

APIs

/paths/{path}/create-directory

POST

Create a directory at the given path

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/json

Status Code Reason Response Model
default successful operation -

/paths/{path}/create-file

POST

Create a file at the given path, use the id with the streams api

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/json

Status Code Reason Response Model
200 successful operation

/paths/{path}/delete

POST

Delete the given path

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/json

Status Code Reason Response Model
default successful operation -

/paths/{path}/download-file

GET

Download the given file at the path

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/octet-stream

Status Code Reason Response Model
200 successful operation InputStream

/paths/{path}/exists

POST

Check if the given path exists

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/json

Status Code Reason Response Model
200 successful operation

/paths/{path}/free

POST

Free the given path

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/json

Status Code Reason Response Model
default successful operation -

/paths/{path}/get-status

POST

Get the file status of the path

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/json

Status Code Reason Response Model
200 successful operation URIStatus

/paths/{path}/list-status

POST

List the URIStatuses of the path's children

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/json

Status Code Reason Response Model
200 successful operation Array[]

/paths/{path}/mount

POST

Mounts the src to the given Alluxio path

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string
src query no - string

Response

Content-Type: application/json

Status Code Reason Response Model
default successful operation -

/paths/{path}/open-file

POST

Opens the given path for reading, use the id with the stream api

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/json

Status Code Reason Response Model
200 successful operation

/paths/{path}/rename

POST

Rename the src path to the dst path

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string
dst query no - string

Response

Content-Type: application/json

Status Code Reason Response Model
default successful operation -

/paths/{path}/set-attribute

POST

Update attributes for the path

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/json

Status Code Reason Response Model
default successful operation -

/paths/{path}/unmount

POST

Unmount the path, the path must be a mount point

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
path path yes (Pattern: .*) - string

Response

Content-Type: application/json

Status Code Reason Response Model
default successful operation -

/proxy/info

GET

Get general Alluxio Proxy service information

Request

Parameters
Name Located in Required Description Default Schema
raw_configuration query no - boolean

Response

Content-Type: application/json

Status Code Reason Response Model
200 successful operation AlluxioProxyInfo

/streams/{id}/close

POST

Closes the stream associated with the id

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
id path yes - integer (int32)

Response

Content-Type: application/json

Status Code Reason Response Model
default successful operation -

/streams/{id}/read

POST

Returns the input stream associated with the id

Request

Content-Type: application/json

Parameters
Name Located in Required Description Default Schema
id path yes - integer (int32)

Response

Content-Type: application/octet-stream

Status Code Reason Response Model
200 successful operation InputStream

/streams/{id}/write

POST

Writes to the given output stream associated with the id

Request

Content-Type: application/octet-stream

Parameters
Name Located in Required Description Default Schema
id path yes - integer (int32)

Response

Content-Type: application/json

Status Code Reason Response Model
200 successful operation

Definitions

AccessControlList

name type required description example

AlluxioProxyInfo

name type required description example
startTimeMs integer (int64) optional -
uptimeMs integer (int64) optional -
configuration object optional -
version string optional -

BlockInfo

name type required description example
blockId integer (int64) optional -
locations array[BlockLocation] optional -
length integer (int64) optional -

BlockLocation

name type required description example
workerAddress WorkerNetAddress optional -
workerId integer (int64) optional -
tierAlias string optional -
mediumType string optional -

CacheContext

name type required description example
temporary boolean optional -
cacheIdentifier string optional -
hiveCacheContext HiveCacheContext optional -
cacheQuota CacheQuota optional -
cacheScope CacheScope optional -

CacheQuota

name type required description example

CacheScope

name type required description example

DefaultAccessControlList

name type required description example

FileBlockInfo

name type required description example
blockInfo BlockInfo optional -
ufsLocations array[string] optional -
offset integer (int64) optional -

FileInfo

name type required description example
mountId integer (int64) optional -
fileId integer (int64) optional -
inAlluxioPercentage integer (int32) optional -
blockSizeBytes integer (int64) optional -
completed boolean optional -
ttl integer (int64) optional -
blockIds array[integer] optional -
persisted boolean optional -
creationTimeMs integer (int64) optional -
inMemoryPercentage integer (int32) optional -
lastModificationTimeMs integer (int64) optional -
lastAccessTimeMs integer (int64) optional -
persistenceState string optional -
pinned boolean optional -
mountPoint boolean optional -
fileBlockInfos array[FileBlockInfo] optional -
ufsFingerprint string optional -
xattr object optional -
mediumTypes array[string] optional -
acl AccessControlList optional -
folder boolean optional -
cacheable boolean optional -
ttlAction string optional -
replicationMax integer (int32) optional -
replicationMin integer (int32) optional -
defaultAcl DefaultAccessControlList optional -
ufsPath string optional -
path string optional -
owner string optional -
mode integer (int32) optional -
group string optional -
length integer (int64) optional -
name string optional -

HiveCacheContext

name type required description example
partition string optional -
database string optional -
table string optional -

InputStream

name type required description example

LocalityTier

name type required description example
tierName string optional Name of the tier host
value string optional Value of the tier name localhost

TieredIdentity

name type required description example
tiers array[LocalityTier] optional Tiers included in the tier identity

URIStatus

name type required description example
mountId integer (int64) optional -
fileId integer (int64) optional -
fileInfo FileInfo optional -
inAlluxioPercentage integer (int32) optional -
blockSizeBytes integer (int64) optional -
completed boolean optional -
ttl integer (int64) optional -
blockIds array[integer] optional -
persisted boolean optional -
creationTimeMs integer (int64) optional -
inMemoryPercentage integer (int32) optional -
lastModificationTimeMs integer (int64) optional -
lastAccessTimeMs integer (int64) optional -
persistenceState string optional -
pinned boolean optional -
pinnedMediumTypes array[string] optional -
mountPoint boolean optional -
fileBlockInfos array[FileBlockInfo] optional -
ufsFingerprint string optional -
xattr object optional -
cacheContext CacheContext optional -
acl AccessControlList optional -
ttlAction string optional -
ufsPath string optional -
defaultAcl DefaultAccessControlList optional -
replicationMax integer (int32) optional -
replicationMin integer (int32) optional -
cacheable boolean optional -
owner string optional -
folder boolean optional -
mode integer (int32) optional -
group string optional -
length integer (int64) optional -
name string optional -
path string optional -

WorkerNetAddress

name type required description example
dataPort integer (int32) optional Port of the worker's server for data operations
containerHost string optional Host name of the physical node if running in a container
rpcPort integer (int32) optional Port of the worker's Rpc server for metadata operations
webPort integer (int32) optional Port which exposes the worker's web UI
domainSocketPath string optional The domain socket path used by the worker, disabled if empty
tieredIdentity TieredIdentity optional The worker's tier identity
host string optional Host name of the worker