API Docs
HomeDocsWebsite
  • Home
  • Introduction
    • Authorization
      • Authorize
      • Get a Token
      • Third-Party Login
    • Field Types and Validation
      • Field Types
      • Validation
    • Query Manipulation
      • Constraints
      • Result Control
      • Value Filters
    • Entity Permissions
      • Restricted Scope
  • API reference
    • Infoboard
      • InfoboardChannels
      • InfoboardPosts
      • InfoboardPostSeenUsers
      • InfoboardPostReadUsers
      • InfoboardComments
      • InfoboardDepartmentSettings
    • Manual
      • ManualChapters
      • ManualEntries
      • ManualEntrySeenUsers
    • Calendar
      • Calendars
      • CalendarEvents
    • Filemanager
      • FilemanagerDirectories
      • FilemanagerFiles
    • Files
    • Forms
      • Forms
      • FormFields
      • FormFieldTypes
      • FormFieldValidations
      • FormFieldValidationTypes
      • FormMessages
      • FormMessageFields
    • Layouts
      • Layouts
      • LayoutRows
      • LayoutColumns
      • LayoutColumnLayoutElements
    • Tasks 2.0
      • TaskTemplates
      • TaskFields
      • TaskAssignments
      • TaskExecutions
      • TaskProgressFields
    • Departments
    • Roles
    • Permissions
    • Users
    • EntityPermissions
    • Notifications
    • Reactions
    • Icons
    • Folders
    • SharedItems
    • UrlContext
  • Resources
    • Release Notes
      • v2.106.0
      • v2.102.0
Powered by GitBook
On this page
  • Introduction
  • Model Definition
  • List
  • List by path
  • Count
  • Show
  • Create
  • Update
  • Delete
  1. API reference
  2. Filemanager

FilemanagerFiles

PreviousFilemanagerDirectoriesNextFiles

Last updated 10 months ago

Introduction

FileManagerFiles represent a on the filesystem. FileManagerFiles will always attach an url to a .

There is no direct relation to a . The resolution of files and directories is done by their path property.

A file can be saved on any path. If there are no added which represent the sections of the path, the according will be created.

Model Definition

Alias

filemanagerFile

Relations

Relation
Key
Type
Relation Field(s)

user

Belongs to

user_id

Computed Properties

  • hash - The hashed id of the FilemanagerFile

  • name - The basename of the FilemanagerFile

  • url - Encoded URL to the underlying file

Traits

  • SoftDeletes

List

Definition

GET /api/filemanager/files

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/filemanager/files', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

[
  {
    "id": 1,
    "user_id": 3,
    "path": "/Lorem ipsum/Lorem Ipsum.pdf",
    "extension": "pdf",
    "mime_type": "application/pdf",
    "size": 87236,
    "created_at": "2018-12-20 13:58:15",
    "updated_at": "2018-12-21 15:55:10",
    "deleted_at": null,
    "hash": "zn7m24owk63qolxryge8pj05",
    "name": "Lorem Ipsum.pdf",
    "url": "/files/jjee2zq97k8ztpzy67xpreeysxzx00onx940bn884yqqdeow/Lorem Ipsum.pdf"
  },
  {
    "id": 2,
    "user_id": 3,
    "path": "/Lorem ipsum/Dolor sit amet.jpg",
    "extension": "jpg",
    "mime_type": "image/jpeg",
    "size": 187607,
    "created_at": "2018-12-20 13:58:19",
    "updated_at": "2018-12-21 15:55:18",
    "deleted_at": null,
    "hash": "6o8m0kz5yw10x1pr9e4vxj27",
    "name": "Dolor sit amet.jpg",
    "url": "/files/jjee2zq97k8ztpzy67xpreeysxzx00onx940bn884yqqdeow/Dolor sit amet.jpg"
  }
]

List by path

If you don't pass a value for {path} a call to the root folder will be assumed.

Definition

GET /api/filemanager/files/path/{path}

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/filemanager/files/path/Lorem%20ipsum', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

[
  {
    "id": 1,
    "user_id": 3,
    "path": "/Lorem ipsum/Lorem Ipsum.pdf",
    "extension": "pdf",
    "mime_type": "application/pdf",
    "size": 87236,
    "created_at": "2018-12-20 13:58:15",
    "updated_at": "2018-12-21 15:55:10",
    "deleted_at": null,
    "hash": "zn7m24owk63qolxryge8pj05",
    "name": "Lorem Ipsum.pdf",
    "url": "/files/jjee2zq97k8ztpzy67xpreeysxzx00onx940bn884yqqdeow/Lorem Ipsum.pdf"
  },
  {
    "id": 2,
    "user_id": 3,
    "path": "/Lorem ipsum/Dolor sit amet.jpg",
    "extension": "jpg",
    "mime_type": "image/jpeg",
    "size": 187607,
    "created_at": "2018-12-20 13:58:19",
    "updated_at": "2018-12-21 15:55:18",
    "deleted_at": null,
    "hash": "6o8m0kz5yw10x1pr9e4vxj27",
    "name": "Dolor sit amet.jpg",
    "url": "/files/jjee2zq97k8ztpzy67xpreeysxzx00onx940bn884yqqdeow/Dolor sit amet.jpg"
  }
]

Count

Definition

GET /api/filemanager/files/count

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/filemanager/files/count', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

5

Show

Show a single FilemanagerFile by id.

Definition

GET /api/filemanager/files/{id}

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/filemanager/files/1', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

{
  "id": 1,
  "user_id": 3,
  "path": "/Lorem ipsum/Lorem Ipsum.pdf",
  "extension": "pdf",
  "mime_type": "application/pdf",
  "size": 87236,
  "created_at": "2018-12-20 13:58:15",
  "updated_at": "2018-12-21 15:55:10",
  "deleted_at": null,
  "hash": "zn7m24owk63qolxryge8pj05",
  "name": "Lorem Ipsum.pdf",
  "url": "/files/jjee2zq97k8ztpzy67xpreeysxzx00onx940bn884yqqdeow/Lorem Ipsum.pdf"
}

Create

Create a new FilemanagerFile.

Definition

POST /api/filemanager/files

Request Keys

Key
Type
Default
Description

file *

file

-

The File to be uploaded

path *

string

-

Relative path to the FilemanagerFile (normalized to include leading /)

Keys with * are required.

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/filemanager/files', [
    'headers' => ['Authorization' => "Bearer {$accessToken}"],
    'multipart' => [
        [
            'name' => 'file',
            'contents' => fopen('/path/to/file/Lorem ipsum.pdf', 'r')
        ],
        [
            'name' => 'path',
            'contents' => 'Lorem ipsum.pdf'
        ]
    ]
]);

Example Response

{
  "status": "success",
  "data": {
    "id": 3,
    "user_id": 3,
    "path": "/Lorem ipsum.pdf",
    "extension": "pdf",
    "mime_type": "application/pdf",
    "size": 13997,
    "created_at": "2020-02-12 10:58:12",
    "updated_at": "2020-02-12 10:58:12",
    "hash": "zn7m24owk63qolxryge8pj05",
    "name": "Lorem ipsum.pdf",
    "url": "/api/files/4geewv9rjq6vt8ovz6r8jppv/Lorem ipsum.pdf"
  }
}

Update

Update an existing FilemanagerFile by id.

Definition

PUT /api/filemanager/files/{id}

Request Keys

Key
Type
Description

file

file

The File to be uploaded

path

string

Relative path to the FilemanagerFile (normalized to include leading /)

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/filemanager/files/3', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'path' => 'Dolor sit amet/Lorem ipsum.pdf'
    ]
]);

Example Response

{
  "status": "success",
  "data": {
    "id": 3,
    "user_id": 3,
    "path": "/Dolor sit amet/Lorem ipsum.pdf",
    "extension": "pdf",
    "mime_type": "application/pdf",
    "size": 13997,
    "created_at": "2020-02-12 10:58:12",
    "updated_at": "2020-02-12 11:10:17",
    "hash": "zn7m24owk63qolxryge8pj05",
    "name": "Lorem ipsum.pdf",
    "url": "/api/files/2yqqxnoe82dnivng6jevz44gcj8j8ry8kkv4i57yrxeonrjjt0dve4g/Lorem ipsum.pdf"
  }
}

Delete

Delete an existing FilemanagerFile by id.

Definition

DELETE /api/filemanager/files/{id}

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/filemanager/files/3', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

{
  "status": "success",
  "data": null
}

Get a list of all FilemanagerFiles the current authenticated is allowed to view.

You can use the filters matches_path and matches_path_recursive on routes of this module. However, the response time of the list action can be considerably high because of recursive permission handling. You might want to use the for tasks regarding a specific path.

Get a list of all FilemanagerFiles by given {path} the current authenticated is allowed to view.

Get the count of all FilemanagerFiles the current authenticated is allowed to view.

File
File
FilemanagerDirectory
FilemanagerDirectories
FilemanagerDirectories
User
User
User
list by path action
User