# cephfs

CephFS file management.
Set management node URL:

# GET /cephfs/files-with-stats

List files with all stats in a directory.

# Parameters

  • dirstringqueryoptional-

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/files-with-stats?dir=string

# Response 200

  • statsobjectoptional-
    • pathstringoptional-
  • entriesarrayoptional-
    • pathstringoptional-
    • fullPathstringoptional-
    • lastModifiedintegeroptional-
    • uidintegeroptional-
    • gidintegeroptional-
    • sizeintegeroptional-
    • modeintegeroptional-
    • typestringoptional[FILE, DIR, SYMLINK, UNKNOWN]
    • dirBytesintegeroptional-
    • dirFilesintegeroptional-
    • dirSubdirsintegeroptional-

# 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

  • bodybodyoptionalAbsolute paths of the requested files.

# Endpoint

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

# Example body

[
  "string"
]

# Response 200

  • pathstringoptional-

# Example response

[
  {
    "path": "string"
  }
]

# GET /cephfs/files

List files in a directory.

# Parameters

  • dirstringqueryoptional-

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/files?dir=string

# Response 200

  • statsobjectoptional-
    • pathstringoptional-
  • entriesarrayoptional-

# Example response

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

# PATCH /cephfs/files

Update or rename a file/directory.

# Parameters

  • pathstringqueryoptional-
  • bodyobjectoptional-
    • absolutePathstringoptionalNew absolute path of the file to rename or move the file.
    • uidintegeroptional-
    • gidintegeroptional-
    • modeintegeroptionalPermissions in Unix notation.

# Endpoint

curl -X PATCH http://mgmt-node:8080/api/cephfs/files?path=string

# Example body

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

# GET /cephfs/layout

Get the pool a file or directory is stored in.

# Parameters

  • pathstringqueryoptional-

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/layout?path=string

# Response 200

  • poolstringoptional-

# Example response

{
  "pool": "string"
}

# PUT /cephfs/layout

Change the pool a file or directory is stored in.

# Parameters

  • pathstringqueryoptional-
  • bodyobjectoptional-
    • poolstringoptional-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/cephfs/layout?path=string

# Example body

{
  "pool": "string"
}

# GET /cephfs/quota

Get the quota of a directory.

# Parameters

  • dirstringqueryoptional-

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/quota?dir=string

# Response 200

  • maxBytesintegeroptional-
  • maxFilesintegeroptional-

# Example response

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

# PUT /cephfs/quota

Set the quota of a directory.

# Parameters

  • dirstringqueryoptional-
  • bodyobjectoptional-
    • maxBytesintegeroptional-
    • maxFilesintegeroptional-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/cephfs/quota?dir=string

# 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

  • bodyobjectoptional-
    • dirstringoptional-
    • poolstringoptionalnull 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

  • patharrayqueryoptional-

# Endpoint

curl -X DELETE http://mgmt-node:8080/api/cephfs/delete?path=string

# Response 200

  • statusCodeintegeroptional-
  • idintegeroptional-
  • startedBystringoptional-
  • startedAtintegeroptional-
  • donebooleanoptional-
  • namestringoptional-
  • statestringoptional[WAITING, RUNNING, FINISHED, FAILED, CANCELED]
  • objectstringoptional-
  • outputstringoptional-

# 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

  • pathstringqueryoptional-
  • dstPathstringqueryoptional-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/cephfs/copy?path=string&dstPath=string

# Response 200

  • statusCodeintegeroptional-
  • idintegeroptional-
  • startedBystringoptional-
  • startedAtintegeroptional-
  • donebooleanoptional-
  • namestringoptional-
  • statestringoptional[WAITING, RUNNING, FINISHED, FAILED, CANCELED]
  • objectstringoptional-
  • outputstringoptional-

# 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

  • pathstringqueryoptional-
  • dstPathstringqueryoptional-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/cephfs/move?path=string&dstPath=string

# GET /cephfs/download

Download a file.

# Parameters

  • pathstringqueryoptional-

# Endpoint

curl -X GET http://mgmt-node:8080/api/cephfs/download?path=string

# Response 200

  • fileNamestringoptional-
  • urlstringoptional-
  • fileContentsstringoptional-

# Example response

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

# PUT /cephfs/upload

Upload a file.

# Parameters

  • filefileformDataoptional-
  • pathstringformDataoptional-

# Endpoint

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