# cephfs

CephFS file management.
Set management node URL:

# GET /cephfs/files-with-stats

List files with all stats in a directory.

# Parameters

  • dirstring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/files-with-stats 

# Response 200

  • statsobject-
    • pathstring-
  • entriesarray-
    • pathstring-
    • fullPathstring-
    • lastModifiedinteger-
    • uidinteger-
    • gidinteger-
    • sizeinteger-
    • modeinteger-
    • typestring[FILE, DIR, SYMLINK, UNKNOWN]
    • dirBytesinteger-
    • dirFilesinteger-
    • dirSubdirsinteger-

# Example response

{
  "stats": {
    "path": "string"
  },
  "entries": [
    {
      "path": "string",
      "fullPath": "string",
      "lastModified": 0,
      "uid": 0,
      "gid": 0,
      "size": 0,
      "mode": 0,
      "type": "FILE",
      "dirBytes": 0,
      "dirFiles": 0,
      "dirSubdirs": 0
    }
  ]
}

# POST /cephfs/stats

Get stats for a list of files.

# Parameters

  • bodyAbsolute paths of the requested files.

# Endpoint

curl -X POST http://mgmt-node:8080/api/cephfs/stats 

# Example body

[
  "string"
]

# Response 200

  • pathstring-

# Example response

[
  {
    "path": "string"
  }
]

# GET /cephfs/files

List files in a directory.

# Parameters

  • dirstring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/files 

# Response 200

  • statsobject-
    • pathstring-
  • entriesarray-

# Example response

{
  "stats": {
    "path": "string"
  },
  "entries": [
    "string"
  ]
}

# PATCH /cephfs/files

Update or rename a file/directory.

# Parameters

  • pathstring-
  • bodyobject-
    • absolutePathstringNew absolute path of the file to rename or move the file.
    • uidinteger-
    • gidinteger-
    • modeintegerPermissions in Unix notation.

# Endpoint

curl -X PATCH http://mgmt-node:8080/api/cephfs/files 

# Example body

{
  "absolutePath": "string",
  "uid": 0,
  "gid": 0,
  "mode": 0
}

# GET /cephfs/layout

Get the pool a file or directory is stored in.

# Parameters

  • pathstring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/layout 

# Response 200

  • poolstring-

# Example response

{
  "pool": "string"
}

# PUT /cephfs/layout

Change the pool a file or directory is stored in.

# Parameters

  • pathstring-
  • bodyobject-
    • poolstring-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/cephfs/layout 

# Example body

{
  "pool": "string"
}

# GET /cephfs/quota

Get the quota of a directory.

# Parameters

  • dirstring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/quota 

# Response 200

  • maxBytesinteger-
  • maxFilesinteger-

# Example response

{
  "maxBytes": 0,
  "maxFiles": 0
}

# PUT /cephfs/quota

Set the quota of a directory.

# Parameters

  • dirstring-
  • bodyobject-
    • maxBytesinteger-
    • maxFilesinteger-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/cephfs/quota 

# Example body

{
  "maxBytes": 0,
  "maxFiles": 0
}

# GET /cephfs/layout/pools

Get pools that are eligible as data storage location in the layout API.

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/layout/pools 

# Response 200

# Example response

[
  "string"
]

# POST /cephfs/create-directory

Create a new directory recursively.

# Parameters

  • bodyobject-
    • dirstring-
    • poolstringnull to use the default pool.

# Endpoint

curl -X POST http://mgmt-node:8080/api/cephfs/create-directory 

# Example body

{
  "dir": "string",
  "pool": "string"
}

# DELETE /cephfs/delete

Delete files or directories recursively.

# Parameters

  • patharray-

# Endpoint

curl -X DELETE http://mgmt-node:8080/api/cephfs/delete 

# Response 200

  • statusCodeinteger-
  • idinteger-
  • startedBystring-
  • startedAtinteger-
  • doneboolean-
  • namestring-
  • statestring[WAITING, RUNNING, FINISHED, FAILED, CANCELED]
  • objectstring-
  • outputstring-

# Example response

{
  "statusCode": 0,
  "id": 0,
  "startedBy": "string",
  "startedAt": 0,
  "done": true,
  "name": "string",
  "state": "WAITING",
  "object": "string",
  "output": "string"
}

# PUT /cephfs/copy

Copy a file or directory recursively.

# Parameters

  • pathstring-
  • dstPathstring-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/cephfs/copy 

# Response 200

  • statusCodeinteger-
  • idinteger-
  • startedBystring-
  • startedAtinteger-
  • doneboolean-
  • namestring-
  • statestring[WAITING, RUNNING, FINISHED, FAILED, CANCELED]
  • objectstring-
  • outputstring-

# Example response

{
  "statusCode": 0,
  "id": 0,
  "startedBy": "string",
  "startedAt": 0,
  "done": true,
  "name": "string",
  "state": "WAITING",
  "object": "string",
  "output": "string"
}

# PUT /cephfs/move

Rename a file or directory.

# Parameters

  • pathstring-
  • dstPathstring-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/cephfs/move 

# GET /cephfs/download

Download a file.

# Parameters

  • pathstring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/download 

# Response 200

  • fileNamestring-
  • urlstring-
  • fileContentsstring-

# Example response

{
  "fileName": "string",
  "url": "string",
  "fileContents": "string"
}

# PUT /cephfs/upload

Upload a file.

# Parameters

  • filefile-
  • pathstring-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/cephfs/upload