Appearance
FilemanagerDirectorySharedUrls
Introduction
If a User wants to share a FileManagerDirectory there needs to be a public accessible URL to retrieve data.
This URLs are represented as FilemanagerDirectorySharedUrls
and thus given can be revoked after creating them.
Model & Relations
Namespace
Modules\Filemanager\Entities\FilemanagerDirectorySharedUrl
Relations
Relation | Key | Type | Relation Field(s) |
---|---|---|---|
User | user | Belongs to | user_id |
FilemanagerDirectory | directory | Belongs to | directory_id |
Computed Properties
hash
- The hashedid
of theFilemanagerDirectorySharedUrl
List
Get a list of all FilemanagerDirectorySharedUrls
.
Definition
GET /api/filemanager/shared-urls/directories
Example Request
php
Example Response
json
Get
Get a single FilemanagerDirectorySharedUrl
by id
or hash
.
Definition
GET /api/filemanager/shared-urls/directories/{idOrHash}
Example Request
php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/filemanager/shared-urls/directories/1', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
json
Create
Create a new FilemanagerDirectorySharedUrl
.
Definition
POST /api/filemanager/shared-urls/directories
Request Keys
Key | Type | Default | Description |
---|---|---|---|
user_id * | integer | - | Related User |
directory_id * | integer | - | The FilemanagerDirectory to be shared |
show_subdirectories | boolean | false | Whether subdirectories of the FilemanagerDirectory can be accessed |
Keys with *
are required.
Example Request
php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/filemanager/shared-urls/directories', [
'headers' => ['Authorization' => "Bearer {accessToken}"],
'json' => [
'user_id' => 3,
'directory_id' => 1,
'show_subdirectories' => false
]
]);
Example Response
json
{
"status": "success",
"data": {
"id": 3,
"user_id": 3,
"directory_id": 1,
"show_subdirectories": false,
"updated_at": "2018-12-21 15:40:59",
"created_at": "2018-12-21 15:40:59",
"hash": "d54q7g6wnj1eylm8k9e0xpz2"
}
}
Update
Update an existing FilemanagerDirectorySharedUrl
by id
.
Definition
PUT /api/filemanager/shared-urls/directories/{id}
Request Keys
Key | Type | Description |
---|---|---|
show_subdirectories | boolean | Whether subdirectories of the FilemanagerDirectory can be accessed |
Example Request
php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/filemanager/shared-urls/directories/3', [
'headers' => ['Authorization' => "Bearer {accessToken}"],
'json' => [
'show_subdirectories' => true
]
]);
Example Response
json
{
"status": "success",
"data": {
"id": 3,
"user_id": 3,
"directory_id": 1,
"show_subdirectories": true,
"updated_at": "2018-12-21 15:40:59",
"created_at": "2018-12-21 15:45:07",
"hash": "d54q7g6wnj1eylm8k9e0xpz2"
}
}
Delete
Delete an existing FilemanagerDirectorySharedUrl
by id
.
Definition
DELETE /api/filemanager/shared-urls/directories/{id}
Example Request
php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/filemanager/shared-urls/directories/3', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
json
{
"status": "success",
"data": null
}