Folders

List

Get a list of all Folders.

Definition

GET /api/folders

Example Request

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

Example Response

[
  {
    "id": 1,
    "parent_folder_id": null,
    "type": "form",
    "name": "Folder 1",
    "sort_number": 1,
    "created_at": "2019-01-25 10:56:16",
    "updated_at": "2019-01-25 10:56:16",
    "folder": null
  },
  {
    "id": 2,
    "parent_folder_id": null,
    "type": "form",
    "name": "Folder 2",
    "sort_number": 2,
    "created_at": "2019-01-25 10:56:18",
    "updated_at": "2019-01-25 10:56:18",
    "folder": null
  }
]

List by type

Get a list of all Folders by type.

Definition

GET /api/folders/{type}

Example Request

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

Example Response

[
  {
    "id": 1,
    "parent_folder_id": null,
    "type": "form",
    "name": "Folder 1",
    "sort_number": 1,
    "created_at": "2019-01-25 10:56:16",
    "updated_at": "2019-01-25 10:56:16",
    "folder": null
  },
  {
    "id": 2,
    "parent_folder_id": null,
    "type": "form",
    "name": "Folder 2",
    "sort_number": 2,
    "created_at": "2019-01-25 10:56:18",
    "updated_at": "2019-01-25 10:56:18",
    "folder": null
  }
]

Create

Create a new Folder.

Definition

POST /api/folders

Request Keys

Keys with * are required.

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/folders', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'type' => 'form',
        'name' => 'Folder 3'
    ]
]);

Example Response

{
  "id": 3,
  "parent_folder_id": null,
  "type": "form",
  "name": "Folder 3",
  "sort_number": 3,
  "created_at": "2019-01-25 11:25:42",
  "updated_at": "2019-01-25 11:25:42",
  "folder": null
}

Update

Update an existing Folder by id.

Definition

PUT /api/folders/{id}

Request Keys

Example Request

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

Example Response

{
  "id": 3,
  "parent_folder_id": null,
  "type": "form",
  "name": "Folder3",
  "sort_number": 3,
  "created_at": "2019-01-25 11:25:42",
  "updated_at": "2019-01-25 11:26:05",
  "folder": null
}

Delete

Delete an existing Folder by id.

Definition

GET /api/folders/{id}

Example Request

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

Example Response

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

Last updated