Change log

File System API

Create, Retrieve, Update and Delete File System items (Folders and Files) via the public API endpoint include their Secure Zone assignments or to assign Secure Zones.

GET File System Single Folder Item

Retrieves a list of Files from a single Folder as a JSON response based on your provided folder URL.

/api/v2/admin/file-system

Data / Response:

{
  "Url": "/"
}
[
  {
    "Path": "string",
    "Name": "string",
    "SizeBytes": 0,
    "Content": "string",
    "Extension": "string",
    "IsEmpty": true,
    "Url": "string",
    "DateUpdated": "2024-05-22T15:22:59.910Z",
    "IsFolder": true,
    "SecureZoneIds": [
      "string"
    ]
  }
]

GET File System Single File Item

Retrieves a single File as a JSON response based on your provided file URL.

/api/v2/admin/file-system

Data / Response:

{
  "Url": "/"
}
{
  "Path": "string",
  "Name": "string",
  "SizeBytes": 0,
  "Content": "string",
  "Extension": "string",
  "IsEmpty": true,
  "Url": "string",
  "DateUpdated": "2024-05-22T15:27:37.559Z",
  "IsFolder": true,
  "SecureZoneIds": [
    "string"
  ]
}

POST File System Create

Creates a new Folder or File based on the provided data.

/api/v2/admin/file-system

Data / Response:

{
  "Path": "string",
  "Name": "string",
  "Content": "string",
  "IsFolder": true,
  "CreateWithIncrement": true
}
{
  "Path": "string",
  "Name": "string",
  "SizeBytes": 0,
  "Content": "string",
  "Extension": "string",
  "IsEmpty": true,
  "Url": "string",
  "DateUpdated": "2024-05-22T15:24:31.858Z",
  "IsFolder": true,
  "SecureZoneIds": [
    "string"
  ]
}

PUT File System Update

Updates a single Folder or File based on the ID passed in the endpoint URL and data provided.

/api/v2/admin/file-system

Data / Response:

{
  "NewName": "string",
  "Path": "string",
  "Name": "string",
  "Content": "string",
  "IsFolder": true,
  "CreateWithIncrement": true
}
{
  "Path": "string",
  "Name": "string",
  "SizeBytes": 0,
  "Content": "string",
  "Extension": "string",
  "IsEmpty": true,
  "Url": "string",
  "DateUpdated": "2024-05-22T15:27:12.332Z",
  "IsFolder": true,
  "SecureZoneIds": [
    "string"
  ]
}

DELETE File System Delete

Deletes a single Folder or File based on the ID passed in the endpoint URL.

/api/v2/admin/file-system

Data / Response:

{
  "Url": "string",
  "IsFolder": true
}
Status 204

PUT File System File or Folder Set Secure Zones

Sets a list of Secure Zones to a File or Folder based on the data provided.

/api/v2/admin/file-system/secure-zone

Data / Response:

{
  "Url": "string",
  "IsFolder": true,
  "SecureZoneIds": [
    "string"
  ]
}
{
  "Path": "string",
  "Name": "string",
  "SizeBytes": 0,
  "Content": "string",
  "Extension": "string",
  "IsEmpty": true,
  "Url": "string",
  "DateUpdated": "2024-05-22T15:28:34.784Z",
  "IsFolder": true,
  "SecureZoneIds": [
    "string"
  ]
}


Related Articles

  • Content Modules
    File Manager

    The File Manager provides browserable and functional access to the site’s file storage. You can...
  • Liquid Components
    api (File System)

    This module component fetches data from the file system with reference to a specific folder/directory on your site.
  • Extras
    Force Download Handler

    If the file link has ?downloadable=1 URL parameter than the content will be dowloadable to...

External Resources

There are currently no external resources available.

Please let us know if you have any other contributions or know of any helpful resources you'd like to see added here.


Questions?

We are always happy to help with any questions you may have.
Visit the Treepl Forum for community support and to search previously asked questions or send us a message at support@treepl.co and we will consult you as soon as possible.