Introduction
SharedItems
are used to share a targeted entity via a never-changing, unique URL.
Each SharedItem
has a concrete type which defines which targetables are allowed and which config
information must/can be provided.
A SharedItem redirects to a URL defined by the targeted entity and type , when allowed by redirect type and EntityPermissions .
Model Definition
Alias
sharedItem
Relations
Key
Relation
Type
Relation Field(s)
targetable_type
, targetable_id
Types
Redirect Types
none
- Do not redirect to the targetable entity URL.
redirect
- Redirect to the targetable entity URL without granting access.
redirectWithGrantToken
- Redirect to the targetable entity URL and grant access for the entity by including a GrantToken
.
Targetable URL Types
SharedItems
support multiple URL types to get a alternate redirect URL from the targetable entity. These targetable URL types can be requested by including them as URL parameter.
showFileContent
- Redirect to the file content URL of the targetable entity.
Supported types: filemanagerFile
downloadFileContent
- Redirect to the file download URL of the targetable entity.
Supported types: filemanagerFile
List
Get a list of all SharedItems
.
Definition
GET
/api/shared-items
Example Request
PHP
Copy $client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/shared-items', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
Copy [
{
"uuid": "9ae0e631-37b4-4ef0-8a26-1526f329098a",
"user_id": 1,
"type": "manualEntry",
"redirect_type": "redirectWithGrantToken",
"targetable_type": "manualEntry",
"targetable_id": 1,
"config": {
"show_subentries": true
},
"created_at": "2024-01-01 12:00:00",
"updated_at": "2024-01-01 12:00:00",
"deleted_at": null
},
{
"uuid": "9ae33ff8-93b8-49b7-bbd6-7b44970c205f",
"user_id": 1,
"type": "form",
"redirect_type": "redirect",
"targetable_type": "form",
"targetable_id": 1,
"config": {},
"created_at": "2024-01-01 13:00:00",
"updated_at": "2024-01-01 13:00:00",
"deleted_at": null
}
]
Show
Show a single SharedItem
by uuid
.
Definition
GET
/api/shared-items/{uuid}
Example Request
PHP
Copy $client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/shared-items/9ae33ff8-93b8-49b7-bbd6-7b44970c205f', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
Copy {
"uuid": "9ae33ff8-93b8-49b7-bbd6-7b44970c205f",
"user_id": 1,
"type": "form",
"redirect_type": "redirect",
"targetable_type": "form",
"targetable_id": 1,
"config": {},
"created_at": "2024-01-01 13:00:00",
"updated_at": "2024-01-01 13:00:00",
"deleted_at": null
}
[Adm.] List
Get a list of all SharedItems
the user is allowed to administrate.
Definition
GET
/api/administration/shared-items
Example Request
PHP
Copy $client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/shared-items', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
Copy [
{
"uuid": "9ae0e631-37b4-4ef0-8a26-1526f329098a",
"user_id": 1,
"type": "manualEntry",
"redirect_type": "redirectWithGrantToken",
"targetable_type": "manualEntry",
"targetable_id": 1,
"config": {
"show_subentries": true
},
"created_at": "2024-01-01 12:00:00",
"updated_at": "2024-01-01 12:00:00",
"deleted_at": null
},
{
"uuid": "9ae33ff8-93b8-49b7-bbd6-7b44970c205f",
"user_id": 1,
"type": "form",
"redirect_type": "redirect",
"targetable_type": "form",
"targetable_id": 1,
"config": {},
"created_at": "2024-01-01 13:00:00",
"updated_at": "2024-01-01 13:00:00",
"deleted_at": null
}
]
[Adm.] Show
Show a single SharedItem
the user is allowed to administrate by uuid
.
Definition
GET
/api/administration/shared-items/{uuid}
Example Request
PHP
Copy $client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/shared-items/9ae33ff8-93b8-49b7-bbd6-7b44970c205f', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
Copy {
"uuid": "9ae33ff8-93b8-49b7-bbd6-7b44970c205f",
"user_id": 1,
"type": "form",
"redirect_type": "redirect",
"targetable_type": "form",
"targetable_id": 1,
"config": {},
"created_at": "2024-01-01 13:00:00",
"updated_at": "2024-01-01 13:00:00",
"deleted_at": null
}
[Adm.] Create
Create a new SharedItem
.
Definition
POST
/api/administration/shared-items
Request Keys
Key
Type
Default
Description
The morph type for the targetable
relation.
The morph ID for the targetable
relation.
The configuration for the SharedItem
. Available values depend on type
.
Keys with *
are required.
Example Request
PHP
Copy $client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/shared-items', [
'headers' => ['Authorization' => "Bearer {accessToken}"],
'json' => [
'type' => 'filemanagerDirectory',
'targetable_type' => 'filemanagerDirectory',
'targetable_id' => 1
]
]);
Example Response
Copy {
"status": "success",
"data": {
"uuid": "9ae0b789-7da8-46ae-b426-f9a410e04aed",
"user_id": 1,
"type": "filemanagerDirectory",
"redirect_type": "redirect",
"targetable_type": "filemanagerDirectory",
"targetable_id": 1,
"config": {
"show_subdirectories": false
},
"created_at": "2024-01-01 14:00:00",
"updated_at": "2024-01-01 14:00:00",
"deleted_at": null
}
}
[Adm.] Update
Update an existing SharedItem
by uuid
.
Definition
PUT
/api/administration/shared-items/{uuid}
Request Keys
Key
Type
Default
Description
The configuration for the SharedItem
. Available values depend on type
.
Example Request
PHP
Copy $client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/shared-items/9ae0b789-7da8-46ae-b426-f9a410e04aed', [
'headers' => ['Authorization' => "Bearer {accessToken}"],
'json' => [
'redirect_type' => 'redirectWithGrantToken',
'config' => [
'show_subdirectories' => true
]
]
]);
Example Response
Copy {
"status": "success",
"data": {
"uuid": "9ae0b789-7da8-46ae-b426-f9a410e04aed",
"user_id": 1,
"type": "filemanagerDirectory",
"redirect_type": "redirectWithGrantToken",
"targetable_type": "filemanagerDirectory",
"targetable_id": 1,
"config": {
"show_subdirectories": true
},
"created_at": "2024-01-01 14:00:00",
"updated_at": "2024-02-02 15:00:00",
"deleted_at": null
}
}
[Adm.] Delete
Delete an existing SharedItem
by uuid
.
Definition
DELETE
/api/administration/shared-items/{uuid}
Example Request
PHP
Copy $client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/administration/shared-items/9ae0b789-7da8-46ae-b426-f9a410e04aed', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
Copy {
"status": "success",
"data": null
}
Last updated 5 months ago