List custom code files - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service allows ADMIN and PORTAL_ADMIN users to retrieve files stored in the Custom code library.

Method Endpoint
GET
/api/admin/portal/custom-code

It is necessary to provide an Ft-Calling-App value when using Fluid Topics web services. See Fluid Topics calling app.

Response body

{
  "totalSize": 8751,
  "files": [
    {
      "subPath": "custom.js",
      "mimeType": "application/javascript",
      "lastUpdate": "1970-01-01T00:00:00Z",
      "size": 7459,
      "publicUrl": "https://doc.fluidtopics.com/portal/custom-code/custom.js"
    },
    {
      "subPath": "custom.less",
      "mimeType": "text/plain",
      "lastUpdate": "2024-05-31T09:01:41.253Z",
      "size": 1127,
      "publicUrl": "https://doc.fluidtopics.com/portal/custom-code/custom.less"
    },
    {
      "subPath": "foo/script-from-the-db-storage.js",
      "mimeType": "application/javascript",
      "lastUpdate": "2024-05-31T14:24:53.141788Z",
      "lastAccess": "2024-05-31T14:24:56.787718Z",
      "size": 23,
      "publicUrl": "https://doc.fluidtopics.com/portal/custom-code/foo/script-from-the-db-storage.js"
    },
    {
      "subPath": "script-from-the-legacy-filesystem-storage.js",
      "mimeType": "application/javascript",
      "lastUpdate": "1970-01-01T00:00:00Z",
      "size": 142,
      "publicUrl": "https://doc.fluidtopics.com/portal/custom-code/script-from-the-legacy-filesystem-storage.js"
    },
    {
      "subPath": "wrap_codeblocks.js",
      "name": "wrap_codeblocks.js",
      "originalFilename": "wrap_codebloocks.js",
      "mimeType": "application/javascript",
      "lastUpdate": "1970-01-01T00:00:00Z",
      "size": 142,
      "publicUrl": "https://doc.fluidtopics.com/portal/custom-code/script-from-the-legacy-filesystem-storage.js"
    }
  ]
}
Field Type Description
totalSize Number The combined size of all files in bytes.
files Array A list of file objects, each containing details about a specific file.
subPath String Relative path to the file in the Custom code library.
mimeType String The MIME type of the file.
lastUpdate String The last update timestamp of the file in ISO 8601 format.
size Number The size of the file in bytes.
publicUrl String A publicly accessible URL where the file can be accessed.
lastAccess String The last access timestamp of the file in ISO 8601 format.
name String The name of the file. Exists for files uploaded through the Topic content component.
originalFilename String The original filename of the file before renaming. Exists for files renamed through the Topic content component.