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
  • Alias
  • Relations
  • Types
  • Redirect Types
  • Targetable URL Types
  • List
  • Show
  • [Adm.] List
  • [Adm.] Show
  • [Adm.] Create
  • [Adm.] Update
  • [Adm.] Delete
  1. API reference

SharedItems

PreviousFoldersNextUrlContext

Last updated 1 month ago

Introduction

SharedItems are used to share a targeted entity via a never-changing, unique URL.

Each SharedItem has a concrete 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 , when allowed by and .

Model Definition

Alias

sharedItem

Relations

Key
Relation
Type
Relation Field(s)

user

Belongs to

user_id

targetable

Targetable

Morph to

targetable_type, targetable_id

entityPermissions

Morph many

Types

  • calendarEvent - Share a .

  • filemanagerDirectory - Share a .

  • filemanagerFile - Share a .

  • form - Share a .

  • infoboardComment - Share a .

  • infoboardPost - Share a .

  • manualChapter - Share a .

  • manualEntry - Share a .

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

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

Example Response

[
  {
    "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

$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

{
  "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

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

Example Response

[
  {
    "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

$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

{
  "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

type *

string

-

redirect_type

string

Based on type

targetable_type

string

-

The morph type for the targetable relation.

targetable_id

integer, string

-

The morph ID for the targetable relation.

config

array

Based on type

The configuration for the SharedItem. Available values depend on type.

Keys with * are required.

Example Request

$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

{
  "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

redirect_type

string

Based on type

config

array

Based on type

The configuration for the SharedItem. Available values depend on type.

Example Request

$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

{
  "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

$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

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

The of the SharedItem.

The of the SharedItem.

The of the SharedItem.

EntityPermissions
CalendarEvent
FilemanagerDirectory
FilemanagerFile
Form
InfoboardComments
InfoboardPosts
ManualChapter
ManualEntry
type
type
redirect type
User
EntityPermissions
type
redirect type
redirect type