FairOS-dfs server (v0.0.0)

Download OpenAPI specification:Download

License: Apache 2.0

A list of the currently provided Interfaces to interact with FairOS decentralised file system(dfs), implementing user, pod, file system, key value store and document store

public

List directory content

PublicPodGetDirHandler is the api handler to list content of a directory from a public pod

query Parameters
sharingRef
required
string

pod sharing reference

dirPath
required
string

dir location in the pod

Responses

Response samples

Content type
application/json
{
  • "dirs": [
    ],
  • "files": [
    ]
}

download file from a shared pod

PodReceiveInfoHandler is the api handler to download file from a shared pod

query Parameters
sharingRef
required
string

pod sharing reference

filePath
required
string

file location in the pod

Responses

Response samples

Content type
application/json
[
  • 0
]

get key from public pod

PublicPodKVEntryGetHandler is the api handler to get key from key value store from a public pod

query Parameters
sharingRef
required
string

pod sharing reference

tableName
required
string

table name

key
required
string

key to look up

Responses

Response samples

Content type
application/json
{
  • "keys": [
    ],
  • "values": [
    ]
}

download file from a shared pod

PublicPodFilePathHandler is the api handler to download file from a shared pod

Responses

Response samples

Content type
application/json
[
  • 0
]

dir

change mode of a directory

DirectoryModeHandler is the api handler to change mode of a directory

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

dir mode request

dirPath
string
mode
string
podName
string

Responses

Request samples

Content type
application/json
{
  • "dirPath": "string",
  • "mode": "string",
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

List directory

DirectoryLsHandler is the api handler for listing the contents of a directory.

query Parameters
podName
required
string

pod name

dirPath
required
string

dir path

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "dirs": [
    ],
  • "files": [
    ]
}

Create directory

DirectoryMkdirHandler is the api handler to create a new directory.

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name and dir path

dirPath
string
podName
string

Responses

Request samples

Content type
application/json
{
  • "dirPath": "string",
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Is directory present

DirectoryPresentHandler is the api handler which says if a directory is present or not

query Parameters
podName
required
string

pod name

dirPath
required
string

dir path

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "present": true
}

Rename directory

DirectoryRenameHandler is the api handler to rename a directory.

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

old name and new path

newPath
string
oldPath
string
podName
string

Responses

Request samples

Content type
application/json
{
  • "newPath": "string",
  • "oldPath": "string",
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Remove directory

DirectoryRmdirHandler is the api handler to remove a directory.

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name and dir path

dirPath
string
podName
string

Responses

Request samples

Content type
application/json
{
  • "dirPath": "string",
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Directory stat

DirectoryStatHandler is the api handler which gives the information about a directory

query Parameters
podName
required
string

pod name

dirPath
required
string

dir path

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "accessTime": "string",
  • "creationTime": "string",
  • "dirName": "string",
  • "dirPath": "string",
  • "mode": 0,
  • "modificationTime": "string",
  • "noOfDirectories": "string",
  • "noOfFiles": "string",
  • "podName": "string"
}

doc

Count number of document in a table

DocCountHandler is the api handler to count the number of documents in a given document database

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

doc table info

expr
string
mutable
boolean
podName
string
si
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "expr": "string",
  • "mutable": true,
  • "podName": "string",
  • "si": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "count": 0,
  • "tableName": "string"
}

Delete a doc table

DocDeleteHandler is the api handler to delete the given document database

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

doc table info

podName
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "podName": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete a document from a document datastore

DocEntryDelHandler is the api handler to delete a document from a document datastore

query Parameters
id
string
podName
string
tableName
string
header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Get a document from a document datastore

DocEntryGetHandler is the api handler to get a document from a document datastore

query Parameters
podName
required
string

pod name

tableName
required
string

table name

id
required
string

id to search for

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "doc": "string"
}

Add a record in document datastore

DocEntryPutHandler is the api handler add a document in to a document datastore

query Parameters
doc
string
podName
string
tableName
string
header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Get rows from a given doc datastore

DocFindHandler is the api handler to select rows from a given document datastore

query Parameters
podName
required
string

pod name

tableName
required
string

table name

expr
required
string

expression to search for. allowed operators in expr are =, >, =>, <=, <. eg: 'first_name=>John', 'first_name=>J.', 'first_name=>.', 'age=>30', 'age<=30'. if index is string, expr supports regex. we do not have support for multiple conditions in expr yet

limit
string

number od documents

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "docs": [
    ]
}

Index a json file that is present in a pod, in to the given document database

DocIndexJsonHandler is the api handler to index a json file that is present in a pod, in to the given document database

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

index request

fileName
string
podName
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "fileName": "string",
  • "podName": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Load json file from local file system

DocLoadJsonHandler is the api handler that indexes a json file that is present in the local file system

query Parameters
podName
required
string

pod name

tableName
required
string

table name

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: multipart/form-data
json
required
string <binary>

json to index

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

List all doc table

DocListHandler is the api handler which lists all the document database in a pod

query Parameters
podName
required
string

pod name

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "tables": [
    ]
}

Create in doc table

DocCreateHandler is the api handler to create a new document database

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

doc table info. si or simple index is a comma separated list of keys and their types. eg: 'first_name=string,age=number'. valid index types can be 'string', 'number', 'map', 'list'. default index is 'id' and it should be of type string

mutable
boolean
podName
string
si
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "mutable": true,
  • "podName": "string",
  • "si": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Open a doc table

DocOpenHandler is the api handler to open a document database

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

doc table info

mutable
boolean
podName
string
si
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "mutable": true,
  • "podName": "string",
  • "si": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "tables": [
    ]
}

file

chmod a file

FileModeHandler is the api handler to change mode of a file

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: multipart/form-data

file mode request

filePath
string
mode
string
podName
string

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete a file

FileReceiveHandler is the api handler to delete a file from a given pod

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name and file path

filePath
string
podName
string

Responses

Request samples

Content type
application/json
{
  • "filePath": "string",
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Download a file

FileDownloadHandlerGet is the api handler to download a file from a given pod

query Parameters
podName
required
string

pod name

filePath
required
string

file path

header Parameters
Cookie
required
string

cookie parameter

Responses

Download a file

FileDownloadHandlerPost is the api handler to download a file from a given pod

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: multipart/form-data
podName
required
string

pod name

filePath
required
string

file path

Responses

Receive a file

FileReceiveHandler is the api handler to receive a file in a given pod

query Parameters
podName
required
string

pod name

sharingRef
required
string

sharing reference

dirPath
required
string

file location

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "fileSharingReference": "string"
}

Receive a file info

FileReceiveInfoHandler is the api handler to receive a file info

query Parameters
sharingRef
required
string

sharing reference

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "blockSize": "string",
  • "compression": "string",
  • "contentType": "string",
  • "destAddress": "string",
  • "name": "string",
  • "numberOfBlocks": "string",
  • "sharedTime": "string",
  • "size": "string",
  • "sourceAddress": "string"
}

Info of a file

FileRenameHandler is the api handler to get the information of a file

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

old name & new name

newPath
string
oldPath
string
podName
string

Responses

Request samples

Content type
application/json
{
  • "newPath": "string",
  • "oldPath": "string",
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Share a file

FileShareHandler is the api handler to share a file from a given pod

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

file share request params

destUser
string
filePath
string
podName
string

Responses

Request samples

Content type
application/json
{
  • "destUser": "string",
  • "filePath": "string",
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "fileSharingReference": "string"
}

Info of a file

FileStatHandler is the api handler to get the information of a file

query Parameters
podName
required
string

pod name

filePath
required
string

file path

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "accessTime": "string",
  • "blockSize": "string",
  • "compression": "string",
  • "contentType": "string",
  • "creationTime": "string",
  • "fileName": "string",
  • "filePath": "string",
  • "fileSize": "string",
  • "mode": 0,
  • "modificationTime": "string",
  • "podName": "string"
}

Sync status of a file

FileStatusHandler is the api handler to check sync status of a file from a given pod

query Parameters
podName
required
string

pod name

filePath
required
string

file path

header Parameters
Cookie
required
string

cookie parameter

Responses

Update a file

FileUpdateHandler is the api handler to update a file from a given offset

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: multipart/form-data
podName
required
string

pod name

filePath
required
string

location

file
required
string <binary>

file content to update

offset
required
string

file offset

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Upload a file

FileUploadHandler is the api handler to upload a file from a local file system to the dfs

header Parameters
fairOS-dfs-Compression
string

cookie parameter

Cookie
required
string

cookie parameter

Request Body schema: multipart/form-data
podName
required
string

pod name

dirPath
required
string

location

blockSize
required
string

block size to break the file

files
required
string <binary>

file to upload

overwrite
string

overwrite the file if already exists

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

kv

Count rows in a key value table

KVCountHandler is the api handler to count the number of rows in a key value table

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

kv table request

indexType
string
podName
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "indexType": "string",
  • "podName": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "count": 0,
  • "tableName": "string"
}

Delete a key value table

KVDeleteHandler is the api handler to delete a key value table

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

kv table request

indexType
string
podName
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "indexType": "string",
  • "podName": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete key-value from the kv table

KVDelHandler is the api handler to delete a key and value from the kv table

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

delete request

key
string
podName
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "key": "string",
  • "podName": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "keys": [
    ],
  • "values": "string"
}

get value from the kv table

KVGetHandler is the api handler to get a value from the kv table

query Parameters
podName
required
string

pod name

tableName
required
string

table name

key
required
string

key

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "keys": [
    ],
  • "values": [
    ]
}

get value from the kv table

KVGetDataHandler is the api handler to get raw value from the kv table

query Parameters
podName
required
string

pod name

tableName
required
string

table name

key
required
string

key

format
string

format of the value

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "keys": [
    ],
  • "values": "string"
}

Check if a value exists in the kv table

KVPresentHandler is the api handler to check if a value exists in the kv table

query Parameters
podName
required
string

pod name

tableName
required
string

table name

key
required
string

key

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

put key and value in the kv table

KVPutHandler is the api handler to put a key-value in the kv table

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

kv entry

key
string
podName
string
tableName
string
value
string

Responses

Request samples

Content type
application/json
{
  • "key": "string",
  • "podName": "string",
  • "tableName": "string",
  • "value": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Export from a particular key with the given prefix

KVExportHandler is the api handler to export from a particular key with the given prefix

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

kv export info

endPrefix
string
limit
string
podName
string
startPrefix
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "endPrefix": "string",
  • "limit": "string",
  • "podName": "string",
  • "startPrefix": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
[
  • { }
]

Upload a csv file in kv table

KVLoadCSVHandler is the api handler to load a csv file as key and value in a KV table

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: multipart/form-data
podName
required
string

pod name

tableName
required
string

table name

memory
string

keep in memory

csv
required
string <binary>

file to upload

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

List all key value tables

KVListHandler is the api handler to list all the key value tables in a pod

query Parameters
podName
required
string

pod name

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "tables": [
    ]
}

Create a key value table

KVCreateHandler is the api handler to create a key value table

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

kv table request

indexType
string
podName
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "indexType": "string",
  • "podName": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Open a key value table

KVOpenHandler is the api handler to open a key value table

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

kv table request

indexType
string
podName
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "indexType": "string",
  • "podName": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Seek in kv table

KVSeekHandler is the api handler to seek to a particular key with the given prefix

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

kv seek info

endPrefix
string
limit
string
podName
string
startPrefix
string
tableName
string

Responses

Request samples

Content type
application/json
{
  • "endPrefix": "string",
  • "limit": "string",
  • "podName": "string",
  • "startPrefix": "string",
  • "tableName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Get next value from last seek in kv table

KVGetNextHandler is the api handler to get the key and value from the current seek position

query Parameters
podName
required
string

pod name

tableName
required
string

table name

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "keys": [
    ],
  • "values": [
    ]
}

pod

Close pod

PodCloseHandler is the api handler to close an open pod

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name

podName
string

Responses

Request samples

Content type
application/json
{
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete pod

PodDeleteHandler is the api handler to delete a pod

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name and user password

podName
string

Responses

Request samples

Content type
application/json
{
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Fork a pod

PodForkHandler is the api handler to fork a pod

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name and user password

forkName
string
podName
string

Responses

Request samples

Content type
application/json
{
  • "forkName": "string",
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Fork a pod from sharing reference

PodForkFromReferenceHandler is the api handler to fork a pod from a given sharing reference

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name and user password

forkName
string
podSharingReference
string

Responses

Request samples

Content type
application/json
{
  • "forkName": "string",
  • "podSharingReference": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

List pods

PodListHandler is the api handler to list all pods

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "pods": [
    ],
  • "sharedPods": [
    ]
}

Create pod

PodCreateHandler is the api handler to create a new pod

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name and user password

podName
string

Responses

Request samples

Content type
application/json
{
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Open pod

PodOpenHandler is the api handler to open pod

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name and user password

podName
string

Responses

Request samples

Content type
application/json
{
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Open pod Deprecated

PodOpenAsyncHandler is the api handler to open pod asynchronously

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name and user password

podName
string

Responses

Request samples

Content type
application/json
{
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Is pod present

PodPresentHandler is the api handler to check if a pod is present

query Parameters
podName
required
string

pod name

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Receive shared pod

PodReceiveHandler is the api handler to receive shared pod from shared reference

query Parameters
sharingRef
required
string

pod sharing reference

sharedPodName
string

pod name to be saved as

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Receive shared pod info

PodReceiveInfoHandler is the api handler to receive shared pod info from shared reference

query Parameters
sharingRef
required
string

pod sharing reference

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "password": "string",
  • "podAddress": "string",
  • "podName": "string",
  • "userAddress": "string"
}

Share pod

PodShareHandler is the api handler to share a pod to the public

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name and user password

podName
string
sharedPodName
string

Responses

Request samples

Content type
application/json
{
  • "podName": "string",
  • "sharedPodName": "string"
}

Response samples

Content type
application/json
{
  • "podSharingReference": "string"
}

Stats for pod

PodStatHandler is the api handler get information about a pod

query Parameters
podName
required
string

pod name

header Parameters
Cookie
required
string

cookie parameter

Responses

Response samples

Content type
application/json
{
  • "address": "string",
  • "podName": "string"
}

Sync pod

PodSyncHandler is the api handler to sync a pod's content

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name

podName
string

Responses

Request samples

Content type
application/json
{
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Sync pod asynchronously

PodSyncAsyncHandler is the api handler to sync a pod's content

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: application/json

pod name

podName
string

Responses

Request samples

Content type
application/json
{
  • "podName": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

user

/v1/user/delete Deprecated

/v1/user/export Deprecated

Is user logged-in

Check if the given user is logged-in

query Parameters
userName
required
string

username

Responses

Response samples

Content type
application/json
{
  • "loggedin": true
}

/v1/user/login Deprecated

Logout

logs-out user

header Parameters
Cookie
required
string

cookie parameter

Responses

/v1/user/present Deprecated

/v1/user/signup Deprecated

User stat

show user stats

header Parameters
Cookie
required
string

cookie parameter

Responses

Delete user for ENS based authentication

deletes user info from swarm

header Parameters
Cookie
required
string

cookie parameter

Request Body schema: */*

user delete request

password
string

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Login User

login user with the new ENS based authentication

Request Body schema: application/json

username

password
string
userName
string

Responses

Request samples

Content type
application/json
{
  • "password": "string",
  • "userName": "string"
}

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "address": "string",
  • "message": "string",
  • "nameHash": "string",
  • "publicKey": "string"
}

Check if user is present

checks if the new user is present in the new ENS based authentication

query Parameters
userName
required
string

username

Responses

Response samples

Content type
application/json
{
  • "present": true
}

Register New User

registers new user with the new ENS based authentication

Request Body schema: application/json

username

mnemonic
string
password
string
userName
string

Responses

Request samples

Content type
application/json
{
  • "mnemonic": "string",
  • "password": "string",
  • "userName": "string"
}

Response samples

Content type
application/json
{
  • "address": "string",
  • "message": "string",
  • "mnemonic": "string",
  • "nameHash": "string",
  • "publicKey": "string"
}