From 4223e59028fe61aacd9e35593ee97d3594263b15 Mon Sep 17 00:00:00 2001 From: Sanja Date: Wed, 11 Sep 2024 10:09:07 -0700 Subject: [PATCH] Initial Guided Template Performance Troubleshoot --- .../Controllers/Api/TemplateController.php | 101 +- .../Http/Controllers/ProcessController.php | 1 + ProcessMaker/Jobs/ImportV2.php | 10 +- ProcessMaker/Templates/ProcessTemplate.php | 328 +- .../mixins/wizardHelperProcessModal.js | 1 + storage/api-docs/api-docs.json | 7448 +++++++++++------ 6 files changed, 5224 insertions(+), 2665 deletions(-) diff --git a/ProcessMaker/Http/Controllers/Api/TemplateController.php b/ProcessMaker/Http/Controllers/Api/TemplateController.php index 0cb2426fa7..8684d829c4 100644 --- a/ProcessMaker/Http/Controllers/Api/TemplateController.php +++ b/ProcessMaker/Http/Controllers/Api/TemplateController.php @@ -273,41 +273,93 @@ private function checkIfAssetsExist($request) $template = ProcessTemplates::findOrFail($request->id); $payload = json_decode($template->manifest, true); - // Get assets form the template - $existingOptions = []; - - foreach ($payload['export'] as $key => $asset) { - if (Str::contains($asset['model'], 'CommentConfiguration') - ) { - unset($payload['export'][$key]); - continue; + // Collect all UUIDs form the payload that are not excluded + $uuids = array_filter( + array_keys($payload['export']), + function ($key) use ($payload) { + return !Str::contains($payload['export'][$key]['model'], 'CommentConfiguration') + && !Str::contains($payload['export'][$key]['type'], 'Category'); } - - if (!$asset['model']::where('uuid', $key)->exists() - || $payload['root'] === $asset['attributes']['uuid'] - || Str::contains($asset['type'], 'Category') - ) { - continue; - } - - $item = [ - 'type' => ($asset['type'] === 'Process') ? 'SubProcess' : $asset['type'], - 'uuid' => $key, - 'model' => $asset['model'], + ); + + // Retrieve all the models from the database in a single query + $models = collect($payload['export']) + ->filter(function ($asset, $key) use ($uuids, $payload) { + return in_array($key, $uuids) && !$this->isRootOrCategory($payload, $asset); + }) + ->mapWithKeys(function ($asset, $key) { + return [$key => $asset['model']]; + }); + // Fetch existing assets + $existingModels = collect($models)->mapWithKeys(function ($model, $uuid) { + return [$uuid => $model::where('uuid', $uuid)->exists()]; + }); + + // Prepare the result array + return $models->filter(function ($exists, $uuid) use ($existingModels) { + return $existingModels[$uuid]; + })->map(function ($model, $uuid) use ($payload) { + $asset = $payload['export'][$uuid]; + + return [ + 'type' => $asset['type'] === 'Process' ? 'SubProcess' : asset['type'], + 'uuid' => $uuid, + 'model' => $model, 'name' => $asset['name'], 'mode' => 'copy', ]; + })->values()->toArray(); + } - $existingOptions[] = $item; - } - - return $existingOptions; + private function isRootOrCategory($payload, $asset) + { + return $payload['root'] === $asset['attributes']['uuid'] + || Str::contains($asset['type'], 'Category'); } + // private function checkIfAssetsExist($request) + // { + // $template = ProcessTemplates::findOrFail($request->id); + // $payload = json_decode($template->manifest, true); + + // // Get assets form the template + // $existingOptions = []; + + // foreach ($payload['export'] as $key => $asset) { + // if (Str::contains($asset['model'], 'CommentConfiguration') + // ) { + // unset($payload['export'][$key]); + // continue; + // } + + // if (!$asset['model']::where('uuid', $key)->exists() + // || $payload['root'] === $asset['attributes']['uuid'] + // || Str::contains($asset['type'], 'Category') + // ) { + // continue; + // } + + // $item = [ + // 'type' => ($asset['type'] === 'Process') ? 'SubProcess' : $asset['type'], + // 'uuid' => $key, + // 'model' => $asset['model'], + // 'name' => $asset['name'], + // 'mode' => 'copy', + // ]; + + // $existingOptions[] = $item; + // } + + // return $existingOptions; + // } + protected function createProcess(Request $request) { + \Log::debug('==== CREATE PROCESS ====='); $request->validate(Template::rules($request->id, $this->types['process'][4])); + \Log::debug('==== CREATE PROCESS VALIDATION RAN ====='); $postOptions = $this->checkIfAssetsExist($request); + \Log::debug('==== CREATE PROCESS CHECK IF ASSETS EXIST COMPLETED =====', ['postOptions' => $postOptions]); if (!empty($postOptions)) { $response = [ @@ -317,6 +369,7 @@ protected function createProcess(Request $request) ]; } else { $response = $this->template->create('process', $request); + \Log::debug('==== CREATE PROCESS RESPONSE =====', ['response' => $response]); } if ($request->has('projects')) { diff --git a/ProcessMaker/Http/Controllers/ProcessController.php b/ProcessMaker/Http/Controllers/ProcessController.php index 74bb1600bd..8ec7e5dc54 100644 --- a/ProcessMaker/Http/Controllers/ProcessController.php +++ b/ProcessMaker/Http/Controllers/ProcessController.php @@ -229,6 +229,7 @@ public function import(Request $request, Process $process) return redirect()->route('processes.import'); } $importIsRunning = ImportV2::isRunning(); + \Log::debug("======== PROCESS CONTROLLER IMPORT IS RUNNING ================================="); return view('processes.import', compact('importIsRunning')); } diff --git a/ProcessMaker/Jobs/ImportV2.php b/ProcessMaker/Jobs/ImportV2.php index 8937976082..630f8a61fb 100644 --- a/ProcessMaker/Jobs/ImportV2.php +++ b/ProcessMaker/Jobs/ImportV2.php @@ -56,7 +56,8 @@ public function handle(): void if ($lock->get()) { $logger->clear(); - $this->runImport($logger); + $newId = $this->runImport($logger); + \Log::debug("++++++++++++++++ return new id", ['id' => $newId]); $lock->release(); } else { // Don't throw exception because that will unlock the running job @@ -68,8 +69,11 @@ private function runImport($logger) { $this->checkHash(); + \Log::debug("++++++++++++++ RUNNING IMPORT IMPORTV2"); + $payload = json_decode(Storage::get(self::FILE_PATH), true); + $options = []; if (!$this->isPreview) { $options = json_decode(Storage::get(self::OPTIONS_PATH), true); @@ -77,6 +81,7 @@ private function runImport($logger) try { $payload = Importer::handlePasswordDecrypt($payload, $this->password); + \Log::debug("++++++++++++++ RUNNING IMPORT IMPORTV2"); } catch (ImportPasswordException $e) { $logger->exception($e); @@ -94,7 +99,8 @@ private function runImport($logger) 'processVersion' => 2, ], 200); } else { - $importer->doImport(); + $manifest = $importer->doImport(); + return $manifest[$payload['root']]->log['newId']; } $logger->log('Done'); diff --git a/ProcessMaker/Templates/ProcessTemplate.php b/ProcessMaker/Templates/ProcessTemplate.php index 372074ad80..d99ad007fe 100644 --- a/ProcessMaker/Templates/ProcessTemplate.php +++ b/ProcessMaker/Templates/ProcessTemplate.php @@ -6,12 +6,14 @@ use Illuminate\Http\Request; use Illuminate\Support\Arr; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Storage; use ProcessMaker\Events\TemplateCreated; use ProcessMaker\Http\Controllers\Api\ExportController; use ProcessMaker\ImportExport\Exporter; use ProcessMaker\ImportExport\Exporters\ProcessExporter; use ProcessMaker\ImportExport\Importer; use ProcessMaker\ImportExport\Options; +use ProcessMaker\Jobs\ImportV2; use ProcessMaker\Models\Process; use ProcessMaker\Models\ProcessCategory; use ProcessMaker\Models\ProcessTemplates; @@ -205,103 +207,163 @@ public function save($request) : JsonResponse */ public function create($request) : JsonResponse { - $templateId = (int) $request->id; - $template = ProcessTemplates::where('id', $templateId)->firstOrFail(); + \Log::debug('======= CREATING PROCESS TEMPLATE ===='); + + // Retrieve and update the template + $template = ProcessTemplates::findOrFail((int) $request->id); $template->fill($request->except('id')); + $requestData = $request->existingAssets ? $request->toArray()['request'] : $request->all(); + + // Prepare the payload + $payload = $this->preparePayload($requestData, $template); + + // Handle the import process + $processId = $this->handleImport($request, $payload, $request->existingAssets); + + // Sync launchpad assets if necessary + $process = Process::findOrFail($processId); + // $this->syncLaunchpadAssets($request, $process); + + // Associate assets with projects + // $this->associateAssetsWithProjects($requestData['projects'], $processId); + + \Log::debug('======= COMPLETED PROCESS TEMPLATE CREATION ===='); + + return response()->json(['processId' => $processId, 'processName' => $process->name]); + } + + private function preparePayload($requestData, $template) + { $payload = json_decode($template->manifest, true); - // Check for existing assets - $existingAssets = $request->existingAssets; - $requestData = $existingAssets ? $request->toArray()['request'] : $request; - $payload['name'] = $requestData['name']; - $payload['description'] = $requestData['description']; + // $payload['name'] = $requestData['name']; + // $payload['description'] = $requestData['description']; - $postOptions = []; - foreach ($payload['export'] as $key => $asset) { - // Exclude the import of comment configurations to account for the unavailability - // of the comment configuration table in the database. - if ($asset['model'] === 'ProcessMaker\Package\PackageComments\Models\CommentConfiguration') { - unset($payload['export'][$key]); - continue; - } + // foreach ($payload['export'] as $key => $asset) { + // if ($this->shouldSkipAsset($asset, $key)) { + // unset($payload['export'][$key]); + // continue; + // } - // Exclude the import of process categories if the category already exists in the database - if ($asset['model'] === 'ProcessMaker\Models\ProcessCategory') { - $processCategory = ProcessCategory::where('uuid', $key)->first(); - if ($processCategory !== null) { - unset($payload['export'][$key]); - continue; - } - } + // $payload['export'][$key] = $this->updateAssetAttributes($asset, $requestData, $key, $payload['root']); + // } + + return $payload; + } + + private function shouldSkipAsset($asset, $key) + { + if ($asset['model'] === 'ProcessMaker\Package\PackageComments\Models\CommentConfiguration') { + return true; + } + + if ($asset['model'] === 'ProcessMaker\Models\ProcessCategory') { + return ProcessCategory::where('uuid', $key)->exists(); + } + + return false; + } + + private function updateAssetAttributes($asset, $requestData, $key, $rootKey) + { + if ($key === $rootKey) { + $asset['attributes']['name'] = $requestData['name']; + $asset['attributes']['description'] = $requestData['description']; + $asset['attributes']['process_category_id'] = $requestData['process_category_id']; + + $asset['attributes']['properties'] = $this->updateAssetProperties( + $asset['attributes']['properties'], + $requestData + ); + } + + if (in_array($asset['type'], ['Process', 'Screen', 'Scripts', 'Collections', 'DataConnector'])) { + $asset['attributes']['is_template'] = false; + $asset['is_template'] = false; + } + + return $asset; + } + + private function updateAssetProperties($properties, $requestData) + { + $propertiesArray = json_decode($properties, true); + + if (isset($requestData['wizardTemplateUuid'])) { + $propertiesArray['wizardTemplateUuid'] = $requestData['wizardTemplateUuid']; + } + + if (isset($requestData['helperProcessRequestId'])) { + $propertiesArray['helperProcessRequestId'] = $requestData['helperProcessRequestId']; + } + + return json_encode($propertiesArray); + } + private function handleImport(Request $request, $payload, $existingAssets) + { + // Original code + // $options = new Options($this->buildPostOptions($payload, $existingAssets)); + // $importer = new Importer($payload, $options); + // $manifest = $importer->doImport(null, true); + // return $manifest[$payload['root']]->log['newId']; + + $options = new Options($this->buildPostOptions($payload, $existingAssets)); + // define the file name and path + $directory = 'import'; + $fileName = 'payload.json'; + $filePath = $directory . '/' . $fileName; + + // Store the payload as a file + Storage::put($filePath, json_encode($payload)); + $hash = md5_file(Storage::path(ImportV2::FILE_PATH)); + $result = ImportV2::dispatchSync($request->user()->id, null, $hash, false); + + \Log::debug('IMPORTV2 JOB COMPLETED', ['result' => $result]); + } + + private function buildPostOptions($payload, $existingAssets) + { + $postOptions = []; + + foreach ($payload['export'] as $key => $asset) { $postOptions[$key] = [ - 'mode' => 'copy', + 'mode' => $this->determineAssetMode($existingAssets, $key), 'isTemplate' => false, 'saveAssetsMode' => 'saveAllAssets', ]; + } - if ($existingAssets) { - foreach ($existingAssets as $item) { - $uuid = $item['uuid']; - if (isset($postOptions[$uuid])) { - $postOptions[$uuid]['mode'] = $item['mode']; - } - } - } - - if ($payload['root'] === $key) { - // Set name and description for the new process - $payload['export'][$key]['attributes']['name'] = $requestData['name']; - $payload['export'][$key]['attributes']['description'] = $requestData['description']; - $payload['export'][$key]['attributes']['process_category_id'] = $requestData['process_category_id']; - // Store the wizard template uuid on the process to rerun the helper process - if (isset($requestData['wizardTemplateUuid'])) { - $properties = json_decode($payload['export'][$key]['attributes']['properties'], true); - $properties['wizardTemplateUuid'] = $requestData['wizardTemplateUuid']; - $payload['export'][$key]['attributes']['properties'] = json_encode($properties); - } - // Store the helper process request id that initiated the process creation - if (isset($requestData['helperProcessRequestId'])) { - $properties = json_decode($payload['export'][$key]['attributes']['properties'], true); - $properties['helperProcessRequestId'] = $requestData['helperProcessRequestId']; - $payload['export'][$key]['attributes']['properties'] = json_encode($properties); - } - - $payload['export'][$key]['name'] = $requestData['name']; - $payload['export'][$key]['description'] = $requestData['description']; - $payload['export'][$key]['process_category_id'] = $requestData['process_category_id']; + return $postOptions; + } - if (!isset($existingAssets)) { - $payload['export'][$key]['process_manager_id'] = $requestData['manager_id']; + private function determineAssetMode($existingAssets, $key) + { + if ($existingAssets) { + foreach ($existingAssets as $item) { + if ($item['uuid'] === $key) { + return $item['mode']; } } - if (in_array($asset['type'], ['Process', 'Screen', 'Scripts', 'Collections', 'DataConnector'])) { - $payload['export'][$key]['attributes']['is_template'] = false; - $payload['export'][$key]['is_template'] = false; - } } - $options = new Options($postOptions); - - $importer = new Importer($payload, $options); - $existingAssetsInDatabase = null; - $importingFromTemplate = true; - $manifest = $importer->doImport($existingAssetsInDatabase, $importingFromTemplate); - $rootLog = $manifest[$payload['root']]->log; - $processId = $rootLog['newId']; - $process = Process::findOrFail($processId); + return 'copy'; + } - $this->syncLaunchpadAssets($request, $process); + private function associateAssetsWithProjects($projects, $processId) + { + if (!class_exists(self::PROJECT_ASSET_MODEL_CLASS) || empty($projects)) { + return; + } - if (class_exists(self::PROJECT_ASSET_MODEL_CLASS) && !empty($requestData['projects'])) { - $manifest = $this->getManifest('process', $processId); + $manifest = $this->getManifest('process', $processId); - foreach (explode(',', $requestData['projects']) as $project) { - foreach ($manifest['export'] as $asset) { - $model = $asset['model']::find($asset['attributes']['id']); - $projectAsset = new (self::PROJECT_ASSET_MODEL_CLASS); - $projectAsset->create([ + foreach (explode(',', $projects) as $project) { + foreach ($manifest['export'] as $asset) { + $model = $asset['model']::find($asset['attributes']['id']); + if ($model) { + (new (self::PROJECT_ASSET_MODEL_CLASS))->create([ 'project_id' => $project, 'asset_id' => $model->id, 'asset_type' => get_class($model), @@ -309,9 +371,117 @@ public function create($request) : JsonResponse } } } - - return response()->json(['processId' => $processId, 'processName' => $process->name]); } + // public function create($request) : JsonResponse + // { + // \Log::debug("======= CREATING PROCESS TEMPLATE ===="); + // $templateId = (int) $request->id; + // $template = ProcessTemplates::where('id', $templateId)->firstOrFail(); + // $template->fill($request->except('id')); + + // $payload = json_decode($template->manifest, true); + // // Check for existing assets + // $existingAssets = $request->existingAssets; + // $requestData = $existingAssets ? $request->toArray()['request'] : $request; + + // $payload['name'] = $requestData['name']; + // $payload['description'] = $requestData['description']; + + // $postOptions = []; + // foreach ($payload['export'] as $key => $asset) { + // // Exclude the import of comment configurations to account for the unavailability + // // of the comment configuration table in the database. + // if ($asset['model'] === 'ProcessMaker\Package\PackageComments\Models\CommentConfiguration') { + // unset($payload['export'][$key]); + // continue; + // } + + // // Exclude the import of process categories if the category already exists in the database + // if ($asset['model'] === 'ProcessMaker\Models\ProcessCategory') { + // $processCategory = ProcessCategory::where('uuid', $key)->first(); + // if ($processCategory !== null) { + // unset($payload['export'][$key]); + // continue; + // } + // } + + // $postOptions[$key] = [ + // 'mode' => 'copy', + // 'isTemplate' => false, + // 'saveAssetsMode' => 'saveAllAssets', + // ]; + + // if ($existingAssets) { + // foreach ($existingAssets as $item) { + // $uuid = $item['uuid']; + // if (isset($postOptions[$uuid])) { + // $postOptions[$uuid]['mode'] = $item['mode']; + // } + // } + // } + + // if ($payload['root'] === $key) { + // // Set name and description for the new process + // $payload['export'][$key]['attributes']['name'] = $requestData['name']; + // $payload['export'][$key]['attributes']['description'] = $requestData['description']; + // $payload['export'][$key]['attributes']['process_category_id'] = $requestData['process_category_id']; + // // Store the wizard template uuid on the process to rerun the helper process + // if (isset($requestData['wizardTemplateUuid'])) { + // $properties = json_decode($payload['export'][$key]['attributes']['properties'], true); + // $properties['wizardTemplateUuid'] = $requestData['wizardTemplateUuid']; + // $payload['export'][$key]['attributes']['properties'] = json_encode($properties); + // } + // // Store the helper process request id that initiated the process creation + // if (isset($requestData['helperProcessRequestId'])) { + // $properties = json_decode($payload['export'][$key]['attributes']['properties'], true); + // $properties['helperProcessRequestId'] = $requestData['helperProcessRequestId']; + // $payload['export'][$key]['attributes']['properties'] = json_encode($properties); + // } + + // $payload['export'][$key]['name'] = $requestData['name']; + // $payload['export'][$key]['description'] = $requestData['description']; + // $payload['export'][$key]['process_category_id'] = $requestData['process_category_id']; + + // if (!isset($existingAssets)) { + // $payload['export'][$key]['process_manager_id'] = $requestData['manager_id']; + // } + // } + // if (in_array($asset['type'], ['Process', 'Screen', 'Scripts', 'Collections', 'DataConnector'])) { + // $payload['export'][$key]['attributes']['is_template'] = false; + // $payload['export'][$key]['is_template'] = false; + // } + // } + // $options = new Options($postOptions); + + // $importer = new Importer($payload, $options); + // $existingAssetsInDatabase = null; + // $importingFromTemplate = true; + // $manifest = $importer->doImport($existingAssetsInDatabase, $importingFromTemplate); + // $rootLog = $manifest[$payload['root']]->log; + // $processId = $rootLog['newId']; + + // $process = Process::findOrFail($processId); + + // $this->syncLaunchpadAssets($request, $process); + + // if (class_exists(self::PROJECT_ASSET_MODEL_CLASS) && !empty($requestData['projects'])) { + // $manifest = $this->getManifest('process', $processId); + + // foreach (explode(',', $requestData['projects']) as $project) { + // foreach ($manifest['export'] as $asset) { + // $model = $asset['model']::find($asset['attributes']['id']); + // $projectAsset = new (self::PROJECT_ASSET_MODEL_CLASS); + // $projectAsset->create([ + // 'project_id' => $project, + // 'asset_id' => $model->id, + // 'asset_type' => get_class($model), + // ]); + // } + // } + // } + // \Log::debug("======= COMPLETED CREATION PROCESS TEMPLATE ===="); + // return response()->json(['processId' => $processId, 'processName' => $process->name]); + // } /** * Update process template bpmn. diff --git a/resources/js/components/templates/mixins/wizardHelperProcessModal.js b/resources/js/components/templates/mixins/wizardHelperProcessModal.js index a7be3a36a7..60f7771234 100644 --- a/resources/js/components/templates/mixins/wizardHelperProcessModal.js +++ b/resources/js/components/templates/mixins/wizardHelperProcessModal.js @@ -104,6 +104,7 @@ export default { }); }, importProcessTemplate() { + console.log("importprocess template"); this.importingProcessTemplate = true; ProcessMaker.apiClient.post(`template/create/process/${this.template.process_template_id}`, { name: this.template.name, diff --git a/storage/api-docs/api-docs.json b/storage/api-docs/api-docs.json index 69c5c73edd..65d6947caf 100644 --- a/storage/api-docs/api-docs.json +++ b/storage/api-docs/api-docs.json @@ -18,54 +18,14 @@ } ], "paths": { - "/customize-ui": { - "post": { - "tags": [ - "CssSettings" - ], - "summary": "Create or update a new setting", - "description": "Create a new Settings css-override", - "operationId": "updateCssSetting", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "variables": { - "type": "string" - }, - "sansSerifFont": { - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "201": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/settings" - } - } - } - } - } - } - }, - "/environment_variables": { + "/collections": { "get": { "tags": [ - "Environment Variables" + "Collections" ], - "summary": "Returns all environmentVariables that the user has access to. For security, values are not included.", - "description": "Fetch a collection of variables based on paged request and filter if provided", - "operationId": "getEnvironmentVariables", + "summary": "Returns all collections that the user has access to", + "description": "Get a list of Collections.", + "operationId": "getCollections", "parameters": [ { "$ref": "#/components/parameters/filter" @@ -85,7 +45,7 @@ ], "responses": { "200": { - "description": "list of environmentVariables", + "description": "list of collections", "content": { "application/json": { "schema": { @@ -93,11 +53,11 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/EnvironmentVariable" + "$ref": "#/components/schemas/collections" } }, "meta": { - "type": "object" + "$ref": "#/components/schemas/metadata" } }, "type": "object" @@ -109,17 +69,17 @@ }, "post": { "tags": [ - "Environment Variables" + "Collections" ], - "summary": "Create a new environment variable", - "description": "Creates a new global Environment Variable in the system", - "operationId": "createEnvironmentVariable", + "summary": "Save a new collections", + "description": "Create a new Collection.", + "operationId": "createCollection", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentVariableEditable" + "$ref": "#/components/schemas/collectionsEditable" } } } @@ -130,7 +90,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentVariable" + "$ref": "#/components/schemas/collections" } } } @@ -138,32 +98,32 @@ } } }, - "/environment_variables/{environment_variable_id}": { + "/collections/{collection_id}": { "get": { "tags": [ - "Environment Variables" + "Collections" ], - "summary": "Get an environment variable by id. For security, the value is not included.", - "description": "Return an environment variable instance\nUsing implicit model binding, will automatically return 404 if variable now found", - "operationId": "getEnvironmentVariableById", + "summary": "Get single collections by ID", + "description": "Get a single Collection.", + "operationId": "getCollectionById", "parameters": [ { - "name": "environment_variable_id", + "name": "collection_id", "in": "path", - "description": "ID of environment_variables to return", + "description": "ID of collection to return", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { - "201": { - "description": "success", + "200": { + "description": "Successfully found the collections", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentVariable" + "$ref": "#/components/schemas/collections" } } } @@ -172,19 +132,19 @@ }, "put": { "tags": [ - "Environment Variables" + "Collections" ], - "summary": "Update an environment variable", - "description": "Update an environment variable", - "operationId": "updateEnvironmentVariable", + "summary": "Update a collection", + "description": "Update a Collection.", + "operationId": "updateCollection", "parameters": [ { - "name": "environment_variable_id", + "name": "collection_id", "in": "path", - "description": "ID of environment variables to update", + "description": "ID of collection to update", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], @@ -193,57 +153,167 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentVariableEditable" + "$ref": "#/components/schemas/collectionsEditable" } } } }, "responses": { - "200": { + "204": { + "description": "success" + } + } + }, + "delete": { + "tags": [ + "Collections" + ], + "summary": "Delete a collection", + "description": "Delete a Collection.", + "operationId": "deleteCollection", + "parameters": [ + { + "name": "collection_id", + "in": "path", + "description": "ID of collection to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "success" + } + } + } + }, + "/collections/{collection_id}/export": { + "post": { + "tags": [ + "Screens" + ], + "summary": "Trigger export collections job", + "description": "Export the specified collection.", + "operationId": "exportCollection", + "parameters": [ + { + "name": "collection_id", + "in": "path", + "description": "ID of the collection to export", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "202": { + "description": "success" + } + } + } + }, + "/collections/import": { + "post": { + "tags": [ + "Collections" + ], + "summary": "Import a new collection", + "description": "Import the specified collection.", + "operationId": "importCollection", + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "file" + ], + "properties": { + "file": { + "description": "file to upload", + "type": "file", + "format": "file" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentVariable" + "$ref": "#/components/schemas/collections" } } } + }, + "200": { + "description": "success" } } - }, + } + }, + "/collections/{collection_id}/truncate": { "delete": { "tags": [ - "Environment Variables" + "Collections" ], - "summary": "Delete an environment variable", - "operationId": "deleteEnvironmentVariable", + "summary": "Deletes all records in a collection", + "description": "Truncate a Collection.", + "operationId": "truncateCollection", "parameters": [ { - "name": "environment_variable_id", + "name": "collection_id", "in": "path", - "description": "ID of environment_variables to return", + "description": "ID of collection to truncate", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { - "200": { + "204": { "description": "success" } } } }, - "/files": { + "/collections/{collection_id}/records": { "get": { "tags": [ - "Files" + "Collections" ], - "summary": "Returns the list of files", - "description": "Display a listing of the resource.", - "operationId": "getFiles", + "summary": "Returns all records", + "description": "Get the list of records of a collection.", + "operationId": "getRecords", "parameters": [ + { + "name": "collection_id", + "in": "path", + "description": "ID of collection to get records for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pmql", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/per_page" + }, { "$ref": "#/components/parameters/filter" }, @@ -254,12 +324,12 @@ "$ref": "#/components/parameters/order_direction" }, { - "$ref": "#/components/parameters/per_page" + "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of files", + "description": "list of records of a collection", "content": { "application/json": { "schema": { @@ -267,7 +337,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/media" + "$ref": "#/components/schemas/records" } }, "meta": { @@ -283,87 +353,39 @@ }, "post": { "tags": [ - "Files" + "Collections" ], - "summary": "Save a new media file. Note: To upload files to a request, use createRequestFile in the RequestFile API", - "description": "Store a newly created resource in storage.", - "operationId": "createFile", + "summary": "Save a new record in a collection", + "description": "Create a new record in a Collection.", + "operationId": "createRecord", "parameters": [ { - "name": "model_id", - "in": "query", - "description": "ID of the model to which the file will be associated", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "model", - "in": "query", - "description": "Full namespaced class of the model to associate", + "name": "collection_id", + "in": "path", + "description": "ID of the collection", "required": true, "schema": { "type": "string" } - }, - { - "name": "data_name", - "in": "query", - "description": "Name of the variable used in a request", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection", - "in": "query", - "description": "Media collection name. For requests, use 'default'", - "required": false, - "schema": { - "type": "string" - } } ], "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "properties": { - "file": { - "description": "save a new media file", - "type": "string", - "format": "binary" - } - }, - "type": "object" + "$ref": "#/components/schemas/recordsEditable" } } } }, "responses": { - "200": { + "201": { "description": "success", "content": { "application/json": { "schema": { - "properties": { - "id": { - "type": "string" - }, - "model_id": { - "type": "string" - }, - "file_name": { - "type": "string" - }, - "mime_type": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/records" } } } @@ -371,118 +393,176 @@ } } }, - "/files/{file_id}": { + "/collections/{collection_id}/records/{record_id}": { "get": { "tags": [ - "Files" + "Collections" ], - "summary": "Get the metadata of a file. To actually fetch the file see Get File Contents", - "description": "Get a single media file.", - "operationId": "getFileById", + "summary": "Get single record of a collection", + "description": "Get a single record of a Collection.", + "operationId": "getRecordById", "parameters": [ { - "name": "file_id", + "name": "collection_id", "in": "path", - "description": "ID of the file to return", + "description": "ID of the collection", "required": true, "schema": { - "type": "integer" + "type": "string" } - } - ], + }, + { + "name": "record_id", + "in": "path", + "description": "ID of the record to return", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "Successfully found the file", + "description": "Successfully found the record", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/media" + "$ref": "#/components/schemas/records" } } } + } + } + }, + "put": { + "tags": [ + "Collections" + ], + "summary": "Update a record", + "description": "Update a record in a Collection.", + "operationId": "updateRecord", + "parameters": [ + { + "name": "collection_id", + "in": "path", + "description": "ID of collection", + "required": true, + "schema": { + "type": "string" + } }, - "404": { - "$ref": "#/components/responses/404" + { + "name": "record_id", + "in": "path", + "description": "ID of the record ", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/recordsEditable" + } + } + } + }, + "responses": { + "204": { + "description": "success" } } }, "delete": { "tags": [ - "Files" + "Collections" ], - "summary": "Delete a media file", - "description": "Remove the specified resource from storage.", - "operationId": "deleteFile", + "summary": "Delete a collection record", + "description": "Delete a record of a Collection.", + "operationId": "deleteRecord", "parameters": [ { - "name": "file_id", + "name": "collection_id", "in": "path", - "description": "ID of the file", + "description": "ID of collection", "required": true, "schema": { - "type": "integer" + "type": "string" + } + }, + { + "name": "record_id", + "in": "path", + "description": "ID of record in collection", + "required": true, + "schema": { + "type": "string" } } ], "responses": { "204": { "description": "success" - }, - "404": { - "$ref": "#/components/responses/404" } } - } - }, - "/files/{file_id}/contents": { - "get": { + }, + "patch": { "tags": [ - "Files" + "Collections" ], - "summary": "Get the contents of a file", - "description": "Display the specified resource.", - "operationId": "getFileContentsById", + "summary": "Partial update of a record", + "description": "Implements a partial update of a record in a Collection.", + "operationId": "patchRecord", "parameters": [ { - "name": "file_id", + "name": "collection_id", "in": "path", - "description": "ID of the file to return", + "description": "ID of collection ", "required": true, "schema": { - "type": "integer" + "type": "string" + } + }, + { + "name": "record_id", + "in": "path", + "description": "ID of the record ", + "required": true, + "schema": { + "type": "string" } } ], - "responses": { - "200": { - "description": "File stream", - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/collectionsEditable" } } - }, - "404": { - "$ref": "#/components/responses/404" + } + }, + "responses": { + "200": { + "description": "success" } } } }, - "/groups": { + "/data_source_categories": { "get": { "tags": [ - "Groups" + "DataSourcesCategories" ], - "summary": "Returns all groups that the user has access to", - "description": "Display a listing of the resource.", - "operationId": "getGroups", + "summary": "Returns all Data Connectors categories that the user has access to", + "description": "Display a listing of the Data Connector Categories.", + "operationId": "getDataSourceCategories", "parameters": [ - { - "$ref": "#/components/parameters/status" - }, { "$ref": "#/components/parameters/filter" }, @@ -494,14 +574,11 @@ }, { "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of groups", + "description": "list of Data Connectors categories", "content": { "application/json": { "schema": { @@ -509,11 +586,16 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/groups" + "$ref": "#/components/schemas/DataSourceCategory" } }, "meta": { - "$ref": "#/components/schemas/metadata" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/metadata" + } + ] } }, "type": "object" @@ -525,17 +607,17 @@ }, "post": { "tags": [ - "Groups" + "DataSourcesCategories" ], - "summary": "Save a new group", - "description": "Store a newly created resource in storage.", - "operationId": "createGroup", + "summary": "Save a new Data Connector Category", + "description": "Store a newly created Data Connector Category in storage", + "operationId": "createDataSourceCategory", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/groupsEditable" + "$ref": "#/components/schemas/dataSourceCategoryEditable" } } } @@ -546,67 +628,61 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/groups" + "$ref": "#/components/schemas/DataSourceCategory" } } } - }, - "422": { - "$ref": "#/components/responses/422" } } } }, - "/groups/{group_id}": { + "/data_source_categories/{data_source_category_id}": { "get": { "tags": [ - "Groups" + "DataSourcesCategories" ], - "summary": "Get single group by ID", - "description": "Display the specified resource.", - "operationId": "getGroupById", + "summary": "Get single Data Connector category by ID", + "description": "Display the specified data Source category.", + "operationId": "getDatasourceCategoryById", "parameters": [ { - "name": "group_id", + "name": "data_source_category_id", "in": "path", - "description": "ID of group to return", + "description": "ID of Data Connector category to return", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { "200": { - "description": "Successfully found the group", + "description": "Successfully found the Data Connector", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/groups" + "$ref": "#/components/schemas/DataSourceCategory" } } } - }, - "404": { - "$ref": "#/components/responses/404" } } }, "put": { "tags": [ - "Groups" + "DataSourcesCategories" ], - "summary": "Update a group", - "description": "Update a user", - "operationId": "updateGroup", + "summary": "Update a Data Connector Category", + "description": "Updates the current element", + "operationId": "updateDatasourceCategory", "parameters": [ { - "name": "group_id", + "name": "data_source_category_id", "in": "path", - "description": "ID of group to return", + "description": "ID of Data Connector category to return", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], @@ -615,79 +691,77 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/groupsEditable" + "$ref": "#/components/schemas/dataSourceCategoryEditable" } } } }, "responses": { - "204": { - "description": "success" - }, - "404": { - "$ref": "#/components/responses/404" + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataSourceCategory" + } + } + } } } }, "delete": { "tags": [ - "Groups" + "DataSourcesCategories" ], - "summary": "Delete a group", - "description": "Delete a user", - "operationId": "deleteGroup", + "summary": "Delete a Data Connector category", + "description": "Remove the specified resource from storage.", + "operationId": "deleteDataSourceCategory", "parameters": [ { - "name": "group_id", + "name": "data_source_category_id", "in": "path", - "description": "ID of group to return", + "description": "ID of Data Connector category to return", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { "204": { "description": "success" - }, - "404": { - "$ref": "#/components/responses/404" } } } }, - "/groups/{group_id}/users": { + "/data_sources": { "get": { "tags": [ - "Groups" + "DataSources" ], - "summary": "Returns all users of a group", - "description": "Display the list of users in a group", - "operationId": "getGroupUsers", + "summary": "Returns all Data Connectors that the user has access to", + "description": "Get the list of records of a Data Connector", + "operationId": "getDataSources", "parameters": [ { - "name": "group_id", - "in": "path", - "description": "ID of group", - "required": true, - "schema": { - "type": "integer" - } + "$ref": "#/components/parameters/filter" }, { - "$ref": "#/components/parameters/filter" + "$ref": "#/components/parameters/order_by" }, { "$ref": "#/components/parameters/order_direction" }, { "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of members of a group", + "description": "list of Data Connectors", "content": { "application/json": { "schema": { @@ -695,11 +769,16 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/users" + "$ref": "#/components/schemas/dataSource" } }, "meta": { - "$ref": "#/components/schemas/metadata" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/metadata" + } + ] } }, "type": "object" @@ -708,131 +787,179 @@ } } } + }, + "post": { + "tags": [ + "DataSources" + ], + "summary": "Save a new Data Connector", + "description": "Create a new Data Connector.", + "operationId": "createDataSource", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dataSourceEditable" + } + } + } + }, + "responses": { + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dataSource" + } + } + } + } + } } }, - "/groups/{group_id}/groups": { + "/data_sources/{data_source_id}": { "get": { "tags": [ - "Groups" + "DataSources" ], - "summary": "Returns all users of a group", - "description": "Display the list of groups in a group", - "operationId": "getGroupGroupss", + "summary": "Get single Data Connector by ID", + "description": "Get a single Data Connector.", + "operationId": "getDataSourceById", "parameters": [ { - "name": "group_id", + "name": "data_source_id", "in": "path", - "description": "ID of group", + "description": "ID of Data Connector to return", "required": true, "schema": { - "type": "integer" + "type": "string" } - }, - { - "$ref": "#/components/parameters/filter" - }, - { - "$ref": "#/components/parameters/order_direction" - }, - { - "$ref": "#/components/parameters/per_page" } ], "responses": { "200": { - "description": "list of members of a group", + "description": "Successfully found the Data Connector", "content": { "application/json": { "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/groups" - } - }, - "meta": { - "$ref": "#/components/schemas/metadata" - } - }, - "type": "object" + "$ref": "#/components/schemas/dataSource" } } } } } - } - }, - "/group_members": { - "get": { + }, + "put": { "tags": [ - "Group Members" + "DataSources" ], - "summary": "Returns all groups for a given member", - "description": "Display a listing of the resource.", - "operationId": "getGroupMembers", + "summary": "Update a Data Connector", + "description": "Update a Data Connector.", + "operationId": "updateDataSource", "parameters": [ { - "$ref": "#/components/parameters/member_id" - }, - { - "$ref": "#/components/parameters/order_by" - }, - { - "$ref": "#/components/parameters/order_direction" - }, - { - "$ref": "#/components/parameters/per_page" + "name": "data_source_id", + "in": "path", + "description": "ID of Data Connector to return", + "required": true, + "schema": { + "type": "string" + } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dataSourceEditable" + } + } + } + }, "responses": { - "200": { - "description": "list of group_members", + "204": { + "description": "success", "content": { "application/json": { "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/groupMembers" - } - }, - "meta": { - "$ref": "#/components/schemas/metadata" - } - }, - "type": "object" + "$ref": "#/components/schemas/dataSource" } } } } } }, + "delete": { + "tags": [ + "DataSources" + ], + "summary": "Delete a Data Connector", + "description": "Delete a Data Connector.", + "operationId": "deleteDataSource", + "parameters": [ + { + "name": "data_source_id", + "in": "path", + "description": "ID of Data Connector to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dataSource" + } + } + } + } + } + } + }, + "/data_sources/{data_source_id}/test": { "post": { "tags": [ - "Group Members" + "DataSources" + ], + "summary": "Send a Data Connector request", + "description": "Send a Data Connector request.", + "operationId": "sendDataSource", + "parameters": [ + { + "name": "data_source_id", + "in": "path", + "description": "ID of Data Connector to return", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Save a new group member", - "description": "Store a newly created resource in storage.", - "operationId": "createGroupMember", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/groupMembersEditable" + "$ref": "#/components/schemas/dataSourceEditable" } } } }, "responses": { - "201": { + "204": { "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/createGroupMembers" + "$ref": "#/components/schemas/dataSource" } } } @@ -840,121 +967,147 @@ } } }, - "/group_members/{group_member_id}": { - "get": { + "/requests/{request_id}/data_sources/{data_source_id}": { + "post": { "tags": [ - "Group Members" + "DataSources" ], - "summary": "Get single group member by ID", - "description": "Display the specified resource.", - "operationId": "getGroupMemberById", + "summary": "execute Data Source", + "description": "Execute a data Source endpoint", + "operationId": "executeDataSourceForRequest", "parameters": [ { - "name": "group_member_id", + "name": "request_id", "in": "path", - "description": "ID of group members to return", + "description": "ID of the request in whose context the datasource will be executed", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "data_source_id", + "in": "path", + "description": "ID of DataSource to be run", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "config": { + "$ref": "#/components/schemas/DataSourceCallParameters" + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { - "description": "Successfully found the group members", + "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/getGroupMembersById" + "$ref": "#/components/schemas/DataSourceResponse" } } } } } - }, - "delete": { + } + }, + "/requests/data_sources/{data_source_id}": { + "post": { "tags": [ - "Group Members" + "DataSources" ], - "summary": "Delete a group member", - "description": "Delete a group membership", - "operationId": "deleteGroupMember", + "summary": "execute Data Source", + "operationId": "executeDataSource", "parameters": [ { - "name": "group_member_id", + "name": "data_source_id", "in": "path", - "description": "ID of group_members to return", + "description": "ID of DataSource to be run", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "config": { + "$ref": "#/components/schemas/DataSourceCallParameters" + }, + "data": { + "type": "object" + } + }, + "type": "object" + } + } + } + }, "responses": { - "204": { - "description": "success" + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataSourceResponse" + } + } + } } } } }, - "/group_members_available": { - "get": { + "/requests/data_sources/{data_source_id}/resources/{endpoint}/data": { + "post": { "tags": [ - "Group Members" + "DataSources" ], - "summary": "Returns all groups available for a given member", - "description": "Display a listing of groups available", - "operationId": "getGroupMembersAvailable", + "summary": "Get Data from Data Source", + "operationId": "getDataFromDataSource", "parameters": [ { - "name": "member_id", + "name": "data_source_id", "in": "path", - "description": "ID of group member to return", + "description": "ID of DataSource to be run", "required": true, "schema": { "type": "string" } }, { - "name": "member_type", + "name": "endpoint", "in": "path", - "description": "type of group member to return", + "description": "Endpoint of the data source", "required": true, "schema": { "type": "string" } - }, - { - "$ref": "#/components/parameters/filter" - }, - { - "$ref": "#/components/parameters/order_by" - }, - { - "$ref": "#/components/parameters/order_direction" - }, - { - "$ref": "#/components/parameters/per_page" } ], "responses": { "200": { - "description": "list of groups available to be assigned as member", + "description": "success", "content": { "application/json": { "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/availableGroupMembers" - } - }, - "meta": { - "$ref": "#/components/schemas/metadata" - } - }, - "type": "object" + "$ref": "#/components/schemas/DataSourceResponse" } } } @@ -962,30 +1115,30 @@ } } }, - "/user_members_available": { + "/saved-searches/{saved_search_id}/charts": { "get": { "tags": [ - "Group Members" + "SavedSearchCharts" ], - "summary": "Returns all users available for a given group", - "description": "Display a listing of users available", - "operationId": "getUserMembersAvailable", + "summary": "Returns all saved search charts that the user has access to", + "description": "Get a list of SavedSearchCharts.", + "operationId": "getSavedSearchCharts", "parameters": [ { - "name": "group_id", - "in": "path", - "description": "ID of group to return", - "required": true, - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/filter" }, { - "name": "filter", + "name": "type", "in": "query", - "description": "Filter results by string. Searches Name. Can be a substring.", + "description": "Only return saved searches by type", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "request", + "task", + "collection" + ] } }, { @@ -996,11 +1149,14 @@ }, { "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of users available to be assigned as member", + "description": "list of saved search charts", "content": { "application/json": { "schema": { @@ -1008,11 +1164,16 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/users" + "$ref": "#/components/schemas/SavedSearchChart" } }, "meta": { - "$ref": "#/components/schemas/metadata" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/metadata" + } + ] } }, "type": "object" @@ -1021,77 +1182,68 @@ } } } - } - }, - "/notifications": { - "get": { + }, + "put": { "tags": [ - "Notifications" + "SavedSearchCharts" ], - "summary": "Returns all notifications that the user has access to", - "description": "Display a listing of the resource.", - "operationId": "getNotifications", + "summary": "Update several saved search charts at once", + "description": "Batch update several SavedSearchCharts.", + "operationId": "batchUpdateSavedSearchCharts", "parameters": [ { - "name": "status", - "in": "query", - "description": "Only return notifications by status (unread, all, etc.)", - "required": false, + "name": "saved_search_id", + "in": "path", + "description": "ID of saved search to which these charts will be saved", + "required": true, "schema": { "type": "string" } - }, - { - "$ref": "#/components/parameters/filter" - }, - { - "$ref": "#/components/parameters/order_by" - }, - { - "$ref": "#/components/parameters/order_direction" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/include" } ], - "responses": { - "200": { - "description": "list of notifications", - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Notification" - } - }, - "meta": {} - }, - "type": "object" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SavedSearchChart" } } } } + }, + "responses": { + "204": { + "description": "success" + } } }, "post": { "tags": [ - "Notifications" + "SavedSearchCharts" + ], + "summary": "Save a new saved search chart", + "description": "Create a new SavedSearchChart.", + "operationId": "createSavedSearchChart", + "parameters": [ + { + "name": "saved_search_id", + "in": "path", + "description": "ID of saved search to which this chart will be saved", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Save a new notifications", - "description": "Store a newly created resource in storage.", - "operationId": "createNotification", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationEditable" + "$ref": "#/components/schemas/SavedSearchChartEditable" } } } @@ -1102,7 +1254,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Notification" + "$ref": "#/components/schemas/SavedSearchChart" } } } @@ -1110,19 +1262,19 @@ } } }, - "/notifications/{notification_id}": { + "/saved-searches/charts/{chart_id}": { "get": { "tags": [ - "Notifications" + "SavedSearchCharts" ], - "summary": "Get single notification by ID", - "description": "Display the specified resource.", - "operationId": "getNotificationById", + "summary": "Get single saved search chart by ID", + "description": "Get a single SavedSearchChart.", + "operationId": "getSavedSearchChartById", "parameters": [ { - "name": "notification_id", + "name": "chart_id", "in": "path", - "description": "ID of notification to return", + "description": "ID of chart to return", "required": true, "schema": { "type": "string" @@ -1131,11 +1283,11 @@ ], "responses": { "200": { - "description": "Successfully found the notification", + "description": "Successfully found the saved search chart", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Notification" + "$ref": "#/components/schemas/SavedSearchChart" } } } @@ -1144,16 +1296,16 @@ }, "put": { "tags": [ - "Notifications" + "SavedSearchCharts" ], - "summary": "Update a notification", - "description": "Update a user", - "operationId": "updateNotification", + "summary": "Update a saved search chart", + "description": "Update a SavedSearchChart.", + "operationId": "updateSavedSearchChart", "parameters": [ { - "name": "notification_id", + "name": "chart_id", "in": "path", - "description": "ID of notification to return", + "description": "ID of chart to return", "required": true, "schema": { "type": "string" @@ -1165,29 +1317,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationEditable" + "$ref": "#/components/schemas/SavedSearchChartEditable" } } } }, "responses": { - "204": { - "description": "success" + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedSearchChart" + } + } + } } } }, "delete": { "tags": [ - "Notifications" + "SavedSearchCharts" ], - "summary": "Delete a notification", - "description": "Delete a notification", - "operationId": "deleteNotification", + "summary": "Delete a saved search chart", + "description": "Delete a SavedSearchChart.", + "operationId": "deleteSavedSearchChart", "parameters": [ { - "name": "notification_id", + "name": "chart_id", "in": "path", - "description": "ID of notification to return", + "description": "ID of chart to return", "required": true, "schema": { "type": "string" @@ -1201,184 +1360,150 @@ } } }, - "/read_notifications": { - "put": { + "/saved-searches/charts/{chart_id}/fields": { + "get": { "tags": [ - "Notifications" + "SavedSearchCharts" ], - "summary": "Mark notifications as read by the user", - "description": "Update notification as read", - "operationId": "markNotificationAsRead", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "message_ids": { - "description": "list of message ids that will be marked as read", - "type": "array", - "items": { - "type": "string" - } - }, - "routes": { - "description": "all messages that has an url that is in this list will be marked as read", - "type": "array", - "items": { - "type": "string" - } - } - }, - "type": "object" - } + "summary": "Get available chart fields for a Saved Search by ID", + "description": "Get available chart fields for a Saved Search.", + "operationId": "getSavedSearchFieldsById", + "parameters": [ + { + "name": "chart_id", + "in": "path", + "description": "ID of Saved Search to return", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { - "description": "success" + "200": { + "description": "Successfully found the saved search", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedSearch" + } + } + } } } } }, - "/unread_notifications": { - "put": { + "/saved-searches/reports": { + "post": { "tags": [ - "Notifications" + "Reports" ], - "summary": "Mark notifications as unread by the user", - "description": "Update notifications as unread", - "operationId": "markNotificationAsUnread", + "summary": "Save a new report", + "operationId": "createReport", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "message_ids": { - "description": "list of message ids that will be marked as read", - "type": "array", - "items": { - "type": "string" - } - }, - "routes": { - "description": "all messages that has an url that is in this list will be marked as read", - "type": "array", - "items": { - "type": "string" - } - } - }, - "type": "object" + "$ref": "#/components/schemas/ReportEditable" } } } }, "responses": { "201": { - "description": "success" + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Report" + } + } + } } } } }, - "/read_all_notifications": { + "/saved-searches/reports/{reportId}": { "put": { "tags": [ - "Notifications" + "SavedSearches" ], - "summary": "Mark notifications as read by id and type", - "description": "Update all notification as read.", - "operationId": "markAllAsRead", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "id": { - "description": "Polymorphic relation id", - "type": "integer" - }, - "type": { - "description": "Polymorphic relation type", - "type": "string" - } - }, - "type": "object" - } + "summary": "Update a saved search", + "description": "Update a Report", + "operationId": "updateReport", + "parameters": [ + { + "name": "reportId", + "in": "path", + "description": "ID of report", + "required": true, + "schema": { + "type": "string" } } - }, - "responses": { - "201": { - "description": "success" - } - } - } - }, - "/permissions": { - "put": { - "tags": [ - "Permissions" ], - "summary": "Update the permissions of a user", - "description": "Update permissions", - "operationId": "51b3555fb753f44324bf5c3880e01454", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "user_id": { - "description": "ID of the user whose permissions are configured", - "type": "integer" - }, - "group_id": { - "description": "ID of the group whose permissions are configured", - "type": "integer" - }, - "is_administrator": { - "description": "Whether the user should have Super Admin privileges", - "type": "boolean", - "default": false - }, - "permission_names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "type": "object" + "$ref": "#/components/schemas/SavedSearchEditable" } } } }, "responses": { - "204": { - "description": "success" + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedSearch" + } + } + } } } } }, - "/process_categories": { + "/saved-searches": { "get": { "tags": [ - "Process Categories" + "SavedSearches" ], - "summary": "Returns all processes categories that the user has access to", - "description": "Display a listing of the Process Categories.", - "operationId": "getProcessCategories", + "summary": "Returns all saved searches that the user has access to", + "description": "Get a list of SavedSearches.", + "operationId": "getSavedSearches", "parameters": [ { - "name": "filter", - "in": "query", - "description": "Filter results by string. Searches Name and Status. All fields must match exactly.", + "$ref": "#/components/parameters/filter" + }, + { + "name": "type", + "in": "query", + "description": "Only return saved searches by type", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "request", + "task", + "collection" + ] + } + }, + { + "name": "subset", + "in": "query", + "description": "Only return saved searches that are yours or those that have been shared with you", + "required": false, + "schema": { + "type": "string", + "enum": [ + "mine", + "shared" + ] } }, { @@ -1389,11 +1514,14 @@ }, { "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of processes categories", + "description": "list of saved searches", "content": { "application/json": { "schema": { @@ -1401,11 +1529,16 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ProcessCategory" + "$ref": "#/components/schemas/SavedSearch" } }, "meta": { - "type": "object" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/metadata" + } + ] } }, "type": "object" @@ -1417,17 +1550,17 @@ }, "post": { "tags": [ - "Process Categories" + "SavedSearches" ], - "summary": "Save a new process Category", - "description": "Store a newly created Process Category in storage", - "operationId": "createProcessCategory", + "summary": "Save a new saved search", + "description": "Create a new SavedSearch.", + "operationId": "createSavedSearch", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProcessCategoryEditable" + "$ref": "#/components/schemas/SavedSearchEditable" } } } @@ -1438,7 +1571,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProcessCategory" + "$ref": "#/components/schemas/SavedSearch" } } } @@ -1446,32 +1579,32 @@ } } }, - "/process_categories/{process_category_id}": { + "/saved-searches/{savedSearchId}": { "get": { "tags": [ - "Process Categories" + "SavedSearches" ], - "summary": "Get single process category by ID", - "description": "Display the specified Process category.", - "operationId": "getProcessCategoryById", + "summary": "Get single saved searches by ID", + "description": "Get a single SavedSearch.", + "operationId": "getSavedSearchById", "parameters": [ { - "name": "process_category_id", + "name": "savedSearchId", "in": "path", - "description": "ID of process category to return", + "description": "ID of saved search to return", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { "200": { - "description": "Successfully found the process", + "description": "Successfully found the saved search", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProcessCategory" + "$ref": "#/components/schemas/SavedSearch" } } } @@ -1480,19 +1613,19 @@ }, "put": { "tags": [ - "Process Categories" + "SavedSearches" ], - "summary": "Update a process Category", - "description": "Updates the current element", - "operationId": "updateProcessCategory", + "summary": "Update a saved search", + "description": "Update a SavedSearch.", + "operationId": "updateSavedSearch", "parameters": [ { - "name": "process_category_id", + "name": "savedSearchId", "in": "path", - "description": "ID of process category to return", + "description": "ID of saved search to return", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], @@ -1501,7 +1634,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProcessCategoryEditable" + "$ref": "#/components/schemas/SavedSearchEditable" } } } @@ -1512,38 +1645,84 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProcessCategory" + "$ref": "#/components/schemas/SavedSearch" } } } } } - }, - "delete": { + } + }, + "/saved-searches/{savedSearchId}/columns": { + "get": { "tags": [ - "Process Categories" + "SavedSearches" ], - "summary": "Delete a process category", - "description": "Remove the specified resource from storage.", - "operationId": "deleteProcessCategory", + "summary": "Returns all columns associated with a Saved Search", + "description": "Display a listing of columns.", + "operationId": "getSavedSearchColumns", "parameters": [ { - "name": "process_category_id", + "name": "savedSearchId", "in": "path", - "description": "ID of process category to return", + "description": "ID of saved search to return", "required": true, "schema": { - "type": "integer" + "type": "string" + } + }, + { + "name": "include", + "in": "query", + "description": "Include specific categories. Comma separated list.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "current", + "default", + "available", + "data" + ] + }, + "uniqueItems": false } } ], "responses": { - "204": { - "description": "success", + "200": { + "description": "Categorized list of columns", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Process" + "properties": { + "current": { + "type": "array", + "items": { + "$ref": "#/components/schemas/columns" + } + }, + "default": { + "type": "array", + "items": { + "$ref": "#/components/schemas/columns" + } + }, + "available": { + "type": "array", + "items": { + "$ref": "#/components/schemas/columns" + } + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/columns" + } + } + }, + "type": "object" } } } @@ -1551,17 +1730,31 @@ } } }, - "/processes": { + "/saved-searches/{savedSearchId}/users": { "get": { "tags": [ - "Processes" + "Users" ], - "summary": "Returns all processes that the user has access to", - "description": "Get list Process", - "operationId": "getProcesses", + "summary": "Returns all users", + "description": "Display a listing of the resource.", + "operationId": "getSavedSearchUsers", "parameters": [ { - "$ref": "#/components/parameters/filter" + "name": "savedSearchId", + "in": "path", + "description": "ID of saved search to return", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter results by string. Searches First Name, Last Name, Email and Username.", + "schema": { + "type": "string" + } }, { "$ref": "#/components/parameters/order_by" @@ -1572,16 +1765,13 @@ { "$ref": "#/components/parameters/per_page" }, - { - "$ref": "#/components/parameters/status" - }, { "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of processes", + "description": "list of users", "content": { "application/json": { "schema": { @@ -1589,7 +1779,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Process" + "$ref": "#/components/schemas/users" } }, "meta": { @@ -1602,129 +1792,71 @@ } } } - }, - "post": { - "tags": [ - "Processes" - ], - "summary": "Save a new process", - "description": "Store a newly created resource in storage.", - "operationId": "createProcess", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessEditable" - } - } - } - }, - "responses": { - "201": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Process" - } - } - } - } - } } }, - "/processes/{processId}": { + "/saved-searches/{savedSearchId}/groups": { "get": { "tags": [ - "Processes" + "Groups" ], - "summary": "Get single process by ID", - "description": "Display the specified resource.", - "operationId": "getProcessById", + "summary": "Returns all groups that the user has access to", + "description": "Display a listing of the resource.", + "operationId": "getSavedSearchGroups", "parameters": [ { - "name": "processId", - "in": "path", - "description": "ID of process to return", - "required": true, - "schema": { - "type": "integer" - } + "$ref": "#/components/parameters/order_by" }, { - "$ref": "#/components/parameters/include" - } - ], - "responses": { - "200": { - "description": "Successfully found the process", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Process" - } - } - } - } - } - }, - "put": { - "tags": [ - "Processes" - ], - "summary": "Update a process", - "description": "Updates the current element.", - "operationId": "updateProcess", - "parameters": [ + "$ref": "#/components/parameters/order_direction" + }, { - "name": "processId", - "in": "path", - "description": "ID of process to return", - "required": true, - "schema": { - "type": "integer" - } + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessEditable" - } - } - } - }, "responses": { "200": { - "description": "success", + "description": "list of groups", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Process" + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/groups" + } + }, + "meta": { + "$ref": "#/components/schemas/metadata" + } + }, + "type": "object" } } } } } - }, + } + }, + "/saved-searches/{saved_search_id}": { "delete": { "tags": [ - "Processes" + "SavedSearches" ], - "summary": "Delete a process", - "description": "Remove the specified resource from storage.", - "operationId": "deleteProcess", + "summary": "Delete a saved search", + "description": "Delete a SavedSearch.", + "operationId": "deleteSavedSearch", "parameters": [ { - "name": "processId", + "name": "saved_search_id", "in": "path", - "description": "ID of process to return", + "description": "ID of saved search to return", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], @@ -1735,31 +1867,22 @@ } } }, - "/processes/{processId}/start_events": { + "/saved-searches/icons": { "get": { "tags": [ - "Processes" + "SavedSearches" ], - "summary": "Get start events of a process by Id", - "description": "Display the specified resource.", - "operationId": "getStartEventsProcessById", + "summary": "Returns all icons for saved searches", + "description": "Get a list of icons available for SavedSearches.", + "operationId": "getSavedSearchesIcons", "parameters": [ { - "name": "processId", - "in": "path", - "description": "ID of process to return", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "$ref": "#/components/parameters/include" + "$ref": "#/components/parameters/per_page" } ], "responses": { "200": { - "description": "Successfully found the start events process", + "description": "list of icons for saved searches", "content": { "application/json": { "schema": { @@ -1767,11 +1890,16 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ProcessStartEvents" + "$ref": "#/components/schemas/SavedSearchIcon" } }, "meta": { - "$ref": "#/components/schemas/metadata" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/metadata" + } + ] } }, "type": "object" @@ -1782,42 +1910,39 @@ } } }, - "/processes/{processId}/draft": { - "put": { + "/customize-ui": { + "post": { "tags": [ - "Processes" - ], - "summary": "Update a draft process", - "description": "Update draft process.", - "operationId": "updateDraftProcess", - "parameters": [ - { - "name": "processId", - "in": "path", - "description": "ID of process to return", - "required": true, - "schema": { - "type": "integer" - } - } + "CssSettings" ], + "summary": "Create or update a new setting", + "description": "Create a new Settings css-override", + "operationId": "updateCssSetting", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProcessEditable" + "properties": { + "variables": { + "type": "string" + }, + "sansSerifFont": { + "type": "string" + } + }, + "type": "object" } } } }, "responses": { - "200": { + "201": { "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Process" + "$ref": "#/components/schemas/settings" } } } @@ -1825,14 +1950,14 @@ } } }, - "/start_processes": { + "/environment_variables": { "get": { "tags": [ - "Processes" + "Environment Variables" ], - "summary": "Returns the list of processes that the user can start", - "description": "Returns the list of processes that the user can start.", - "operationId": "startProcesses", + "summary": "Returns all environmentVariables that the user has access to. For security, values are not included.", + "description": "Fetch a collection of variables based on paged request and filter if provided", + "operationId": "getEnvironmentVariables", "parameters": [ { "$ref": "#/components/parameters/filter" @@ -1848,20 +1973,11 @@ }, { "$ref": "#/components/parameters/include" - }, - { - "name": "without_event_definitions", - "in": "path", - "description": "If true return only processes that haven't start event definitions", - "required": false, - "schema": { - "type": "boolean" - } } ], "responses": { "200": { - "description": "list of processes that the user can start", + "description": "list of environmentVariables", "content": { "application/json": { "schema": { @@ -1869,11 +1985,11 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ProcessWithStartEvents" + "$ref": "#/components/schemas/EnvironmentVariable" } }, "meta": { - "$ref": "#/components/schemas/metadata" + "type": "object" } }, "type": "object" @@ -1882,34 +1998,31 @@ } } } - } - }, - "/processes/{processId}/restore": { - "put": { + }, + "post": { "tags": [ - "Processes" + "Environment Variables" ], - "summary": "Restore an inactive process", - "description": "Reverses the soft delete of the element.", - "operationId": "restoreProcess", - "parameters": [ - { - "name": "processId", - "in": "path", - "description": "ID of process to return", - "required": true, - "schema": { - "type": "integer" + "summary": "Create a new environment variable", + "description": "Creates a new global Environment Variable in the system", + "operationId": "createEnvironmentVariable", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableEditable" + } } } - ], + }, "responses": { - "200": { + "201": { "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Process" + "$ref": "#/components/schemas/EnvironmentVariable" } } } @@ -1917,19 +2030,19 @@ } } }, - "/processes/{processId}/export": { - "post": { + "/environment_variables/{environment_variable_id}": { + "get": { "tags": [ - "Processes" + "Environment Variables" ], - "summary": "Export a single process by ID and return a URL to download it", - "description": "Export the specified process.", - "operationId": "exportProcess", + "summary": "Get an environment variable by id. For security, the value is not included.", + "description": "Return an environment variable instance\nUsing implicit model binding, will automatically return 404 if variable now found", + "operationId": "getEnvironmentVariableById", "parameters": [ { - "name": "processId", + "name": "environment_variable_id", "in": "path", - "description": "ID of process to export", + "description": "ID of environment_variables to return", "required": true, "schema": { "type": "integer" @@ -1937,84 +2050,42 @@ } ], "responses": { - "200": { - "description": "Successfully built the process for export", + "201": { + "description": "success", "content": { "application/json": { "schema": { - "properties": { - "url": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/EnvironmentVariable" } } } } } - } - }, - "/processes/import/validation": { - "post": { + }, + "put": { "tags": [ - "Processes" + "Environment Variables" ], - "summary": "Validate a import", - "description": "Validate the specified process before importing.", - "operationId": "validateImport", - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "properties": { - "file": { - "description": "file to import", - "type": "string", - "format": "binary" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessImport" - } - } + "summary": "Update an environment variable", + "description": "Update an environment variable", + "operationId": "updateEnvironmentVariable", + "parameters": [ + { + "name": "environment_variable_id", + "in": "path", + "description": "ID of environment variables to update", + "required": true, + "schema": { + "type": "integer" } } - } - } - }, - "/processes/import": { - "post": { - "tags": [ - "Processes" ], - "summary": "Import a new process", - "description": "Import the specified process.", - "operationId": "importProcess", "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "properties": { - "file": { - "description": "file to import", - "type": "string", - "format": "binary" - } - }, - "type": "object" + "$ref": "#/components/schemas/EnvironmentVariableEditable" } } } @@ -2025,27 +2096,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProcessImport" + "$ref": "#/components/schemas/EnvironmentVariable" } } } } } - } - }, - "/processes/{processId}/bpmn": { - "get": { + }, + "delete": { "tags": [ - "Processes" + "Environment Variables" ], - "summary": "Download the BPMN definition of a process", - "description": "Download the BPMN definition of a process", - "operationId": "processBpmn", + "summary": "Delete an environment variable", + "operationId": "deleteEnvironmentVariable", "parameters": [ { - "name": "processId", + "name": "environment_variable_id", "in": "path", - "description": "ID of process", + "description": "ID of environment_variables to return", "required": true, "schema": { "type": "integer" @@ -2054,51 +2122,48 @@ ], "responses": { "200": { - "description": "Successfully built the process for export", - "content": { - "application/json": { - "schema": { - "properties": { - "url": { - "type": "string" - } - }, - "type": "object" - } - } - } + "description": "success" } } } }, - "/processes/import/{code}/is_ready": { - "head": { + "/files": { + "get": { "tags": [ - "Processes" + "Files" ], - "summary": "Check if the import is ready", - "description": "Check if the import is ready", - "operationId": "6a131993b7c879ddcd3d3a291dd8380f", + "summary": "Returns the list of files", + "description": "Display a listing of the resource.", + "operationId": "getFiles", "parameters": [ { - "name": "code", - "in": "path", - "description": "Import code", - "required": true, - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" } ], "responses": { "200": { - "description": "check is import is ready", + "description": "list of files", "content": { "application/json": { "schema": { "properties": { - "ready": { - "type": "boolean" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/media" + } + }, + "meta": { + "$ref": "#/components/schemas/metadata" } }, "type": "object" @@ -2107,78 +2172,64 @@ } } } - } - }, - "/processes/{process_id}/import/assignments": { + }, "post": { "tags": [ - "Processes" + "Files" ], - "summary": "Update assignments after import", - "description": "Import Assignments of process.", - "operationId": "assignmentProcess", + "summary": "Save a new media file. Note: To upload files to a request, use createRequestFile in the RequestFile API", + "description": "Store a newly created resource in storage.", + "operationId": "createFile", "parameters": [ { - "name": "process_id", - "in": "path", - "description": "ID of process to return", + "name": "model_id", + "in": "query", + "description": "ID of the model to which the file will be associated", "required": true, "schema": { "type": "integer" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessAssignments" - } - } - } - }, - "responses": { - "204": { - "description": "success" - } - } - } - }, - "/process_events/{process_id}": { - "post": { - "tags": [ - "Processes" - ], - "summary": "Start a new process", - "description": "Trigger an start event within a process.", - "operationId": "triggerStartEvent", - "parameters": [ + }, { - "name": "process_id", - "in": "path", - "description": "ID of process to return", + "name": "model", + "in": "query", + "description": "Full namespaced class of the model to associate", "required": true, "schema": { - "type": "integer" + "type": "string" } }, { - "name": "event", + "name": "data_name", "in": "query", - "description": "Node ID of the start event", - "required": true, + "description": "Name of the variable used in a request", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "collection", + "in": "query", + "description": "Media collection name. For requests, use 'default'", + "required": false, "schema": { "type": "string" } } ], "requestBody": { - "description": "data that will be stored as part of the created request", - "required": false, + "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { + "properties": { + "file": { + "description": "save a new media file", + "type": "string", + "format": "binary" + } + }, "type": "object" } } @@ -2187,72 +2238,21 @@ "responses": { "200": { "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/processRequest" - } - } - } - } - } - } - }, - "/requests": { - "get": { - "tags": [ - "Process Requests" - ], - "summary": "Returns all process Requests that the user has access to", - "description": "Display a listing of the resource.", - "operationId": "getProcessesRequests", - "parameters": [ - { - "name": "type", - "in": "query", - "description": "Only return requests by type (all|in_progress|completed)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "all", - "in_progress", - "completed", - "started_me" - ] - } - }, - { - "$ref": "#/components/parameters/filter" - }, - { - "$ref": "#/components/parameters/order_by" - }, - { - "$ref": "#/components/parameters/order_direction" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/include" - } - ], - "responses": { - "200": { - "description": "list of processes", "content": { "application/json": { "schema": { "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/processRequest" - } + "id": { + "type": "string" }, - "meta": { - "$ref": "#/components/schemas/metadata" + "model_id": { + "type": "string" + }, + "file_name": { + "type": "string" + }, + "mime_type": { + "type": "string" } }, "type": "object" @@ -2263,35 +2263,32 @@ } } }, - "/requests/{process_request_id}": { + "/files/{file_id}": { "get": { "tags": [ - "Process Requests" + "Files" ], - "summary": "Get single process request by ID", - "description": "Display the specified resource.", - "operationId": "getProcessRequestById", + "summary": "Get the metadata of a file. To actually fetch the file see Get File Contents", + "description": "Get a single media file.", + "operationId": "getFileById", "parameters": [ { - "name": "process_request_id", + "name": "file_id", "in": "path", - "description": "ID of process request to return", + "description": "ID of the file to return", "required": true, "schema": { "type": "integer" } - }, - { - "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "Successfully found the process", + "description": "Successfully found the file", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/processRequest" + "$ref": "#/components/schemas/media" } } } @@ -2301,34 +2298,24 @@ } } }, - "put": { + "delete": { "tags": [ - "Process Requests" + "Files" ], - "summary": "Update a process request", - "description": "Update a request", - "operationId": "updateProcessRequest", + "summary": "Delete a media file", + "description": "Remove the specified resource from storage.", + "operationId": "deleteFile", "parameters": [ { - "name": "process_request_id", + "name": "file_id", "in": "path", - "description": "ID of process request to return", + "description": "ID of the file", "required": true, "schema": { "type": "integer" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/processRequestEditable" - } - } - } - }, "responses": { "204": { "description": "success" @@ -2337,19 +2324,21 @@ "$ref": "#/components/responses/404" } } - }, - "delete": { + } + }, + "/files/{file_id}/contents": { + "get": { "tags": [ - "Process Requests" + "Files" ], - "summary": "Delete a process request", - "description": "Delete a request", - "operationId": "deleteProcessRequest", + "summary": "Get the contents of a file", + "description": "Display the specified resource.", + "operationId": "getFileContentsById", "parameters": [ { - "name": "process_request_id", + "name": "file_id", "in": "path", - "description": "ID of process request to return", + "description": "ID of the file to return", "required": true, "schema": { "type": "integer" @@ -2357,12 +2346,13 @@ } ], "responses": { - "204": { - "description": "success", + "200": { + "description": "File stream", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/processRequest" + "type": "string", + "format": "binary" } } } @@ -2373,50 +2363,18 @@ } } }, - "/requests/{process_request_id}/events/{event_id}": { - "post": { - "tags": [ - "Process Requests" - ], - "summary": "Update a process request event", - "description": "Trigger a intermediate catch event", - "operationId": "updateProcessRequestEvent", - "parameters": [ - { - "name": "process_request_id", - "in": "path", - "description": "ID of process request to return", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "event_id", - "in": "path", - "description": "ID of process event to return", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "success" - } - } - } - }, - "/requests/{request_id}/files": { + "/groups": { "get": { "tags": [ - "Request Files" + "Groups" ], - "summary": "Returns the list of files associated with a request", + "summary": "Returns all groups that the user has access to", "description": "Display a listing of the resource.", - "operationId": "getRequestFiles", + "operationId": "getGroups", "parameters": [ + { + "$ref": "#/components/parameters/status" + }, { "$ref": "#/components/parameters/filter" }, @@ -2430,18 +2388,12 @@ "$ref": "#/components/parameters/per_page" }, { - "name": "request_id", - "in": "path", - "description": "ID of the request", - "required": true, - "schema": { - "type": "integer" - } + "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of files", + "description": "list of groups", "content": { "application/json": { "schema": { @@ -2449,16 +2401,11 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/media" + "$ref": "#/components/schemas/groups" } }, "meta": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/metadata" - } - ] + "$ref": "#/components/schemas/metadata" } }, "type": "object" @@ -2470,92 +2417,51 @@ }, "post": { "tags": [ - "Request Files" + "Groups" ], - "summary": "Save a new media file to a request", + "summary": "Save a new group", "description": "Store a newly created resource in storage.", - "operationId": "createRequestFile", - "parameters": [ - { - "name": "request_id", - "in": "path", - "description": "ID of the request", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "data_name", - "in": "query", - "description": "Variable name in the request data to use for the file name", - "required": false, - "schema": { - "type": "string" - } - } - ], + "operationId": "createGroup", "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "properties": { - "file": { - "description": "save a new media file", - "type": "string", - "format": "binary" - } - }, - "type": "object" + "$ref": "#/components/schemas/groupsEditable" } } } }, "responses": { - "200": { + "201": { "description": "success", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - }, - "fileUploadId": { - "type": "integer" - } - }, - "type": "object" + "$ref": "#/components/schemas/groups" } } } + }, + "422": { + "$ref": "#/components/responses/422" } } } }, - "/requests/{request_id}/files/{file_id}": { + "/groups/{group_id}": { "get": { "tags": [ - "Request Files" + "Groups" ], - "summary": "Get a file uploaded to a request", + "summary": "Get single group by ID", "description": "Display the specified resource.", - "operationId": "getRequestFilesById", + "operationId": "getGroupById", "parameters": [ { - "name": "request_id", - "in": "path", - "description": "ID of the request", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "file_id", + "name": "group_id", "in": "path", - "description": "ID of the file to return", + "description": "ID of group to return", "required": true, "schema": { "type": "integer" @@ -2564,12 +2470,11 @@ ], "responses": { "200": { - "description": "File stream", + "description": "Successfully found the group", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/groups" } } } @@ -2579,30 +2484,58 @@ } } }, - "delete": { + "put": { "tags": [ - "Request Files" + "Groups" ], - "summary": "Delete all media associated with a request", - "description": "Remove the specified resource from storage.", - "operationId": "deleteRequestFile", + "summary": "Update a group", + "description": "Update a user", + "operationId": "updateGroup", "parameters": [ { - "name": "file_id", + "name": "group_id", "in": "path", - "description": "ID of the file", + "description": "ID of group to return", "required": true, "schema": { "type": "integer" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/groupsEditable" + } + } + } + }, + "responses": { + "204": { + "description": "success" }, + "404": { + "$ref": "#/components/responses/404" + } + } + }, + "delete": { + "tags": [ + "Groups" + ], + "summary": "Delete a group", + "description": "Delete a user", + "operationId": "deleteGroup", + "parameters": [ { - "name": "request_id", + "name": "group_id", "in": "path", - "description": "ID of the request", + "description": "ID of group to return", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], @@ -2616,25 +2549,26 @@ } } }, - "/screen_categories": { + "/groups/{group_id}/users": { "get": { "tags": [ - "Screen Categories" + "Groups" ], - "summary": "Returns all screens categories that the user has access to", - "description": "Display a listing of the Screen Categories.", - "operationId": "getScreenCategories", + "summary": "Returns all users of a group", + "description": "Display the list of users in a group", + "operationId": "getGroupUsers", "parameters": [ { - "name": "filter", - "in": "query", - "description": "Filter results by string. Searches Name, Description, and Status. All fields must match exactly.", + "name": "group_id", + "in": "path", + "description": "ID of group", + "required": true, "schema": { - "type": "string" + "type": "integer" } }, { - "$ref": "#/components/parameters/order_by" + "$ref": "#/components/parameters/filter" }, { "$ref": "#/components/parameters/order_direction" @@ -2645,7 +2579,7 @@ ], "responses": { "200": { - "description": "list of screens categories", + "description": "list of members of a group", "content": { "application/json": { "schema": { @@ -2653,11 +2587,11 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ScreenCategory" + "$ref": "#/components/schemas/users" } }, "meta": { - "type": "object" + "$ref": "#/components/schemas/metadata" } }, "type": "object" @@ -2666,147 +2600,72 @@ } } } - }, - "post": { - "tags": [ - "Screen Categories" - ], - "summary": "Save a new Screen Category", - "description": "Store a newly created Screen Category in storage", - "operationId": "createScreenCategory", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScreenCategoryEditable" - } - } - } - }, - "responses": { - "201": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScreenCategory" - } - } - } - } - } } }, - "/screen_categories/{screen_category_id}": { + "/groups/{group_id}/groups": { "get": { "tags": [ - "Screen Categories" + "Groups" ], - "summary": "Get single screen category by ID", - "description": "Display the specified screen category.", - "operationId": "getScreenCategoryById", + "summary": "Returns all users of a group", + "description": "Display the list of groups in a group", + "operationId": "getGroupGroupss", "parameters": [ { - "name": "screen_category_id", + "name": "group_id", "in": "path", - "description": "ID of screen category to return", + "description": "ID of group", "required": true, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successfully found the screen", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScreenCategory" - } - } + "type": "integer" } - } - } - }, - "put": { - "tags": [ - "Screen Categories" - ], - "summary": "Update a screen Category", - "description": "Updates the current element", - "operationId": "updateScreenCategory", - "parameters": [ + }, { - "name": "screen_category_id", - "in": "path", - "description": "ID of screen category to return", - "required": true, - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScreenCategoryEditable" - } - } - } - }, "responses": { "200": { - "description": "success", + "description": "list of members of a group", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScreenCategory" + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/groups" + } + }, + "meta": { + "$ref": "#/components/schemas/metadata" + } + }, + "type": "object" } } } } } - }, - "delete": { - "tags": [ - "Screen Categories" - ], - "summary": "Delete a screen category", - "description": "Remove the specified resource from storage.", - "operationId": "deleteScreenCategory", - "parameters": [ - { - "name": "screen_category_id", - "in": "path", - "description": "ID of screen category to return", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "success" - } - } } }, - "/screens": { + "/group_members": { "get": { "tags": [ - "Screens" + "Group Members" ], - "summary": "Returns all screens that the user has access to", - "description": "Get a list of Screens.", - "operationId": "getScreens", + "summary": "Returns all groups for a given member", + "description": "Display a listing of the resource.", + "operationId": "getGroupMembers", "parameters": [ { - "$ref": "#/components/parameters/filter" + "$ref": "#/components/parameters/member_id" }, { "$ref": "#/components/parameters/order_by" @@ -2816,23 +2675,11 @@ }, { "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/include" - }, - { - "name": "exclude", - "in": "query", - "description": "Comma separated list of fields to exclude from the response", - "schema": { - "type": "string", - "default": "" - } } ], "responses": { "200": { - "description": "list of screens", + "description": "list of group_members", "content": { "application/json": { "schema": { @@ -2840,11 +2687,11 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/screens" + "$ref": "#/components/schemas/groupMembers" } }, "meta": { - "type": "object" + "$ref": "#/components/schemas/metadata" } }, "type": "object" @@ -2856,17 +2703,17 @@ }, "post": { "tags": [ - "Screens" + "Group Members" ], - "summary": "Save a new screens", - "description": "Create a new Screen.", - "operationId": "createScreen", + "summary": "Save a new group member", + "description": "Store a newly created resource in storage.", + "operationId": "createGroupMember", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/screensEditable" + "$ref": "#/components/schemas/groupMembersEditable" } } } @@ -2877,7 +2724,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/screens" + "$ref": "#/components/schemas/createGroupMembers" } } } @@ -2885,19 +2732,19 @@ } } }, - "/screens/{screens_id}": { + "/group_members/{group_member_id}": { "get": { "tags": [ - "Screens" + "Group Members" ], - "summary": "Get single screens by ID", - "description": "Get a single Screen.", - "operationId": "getScreensById", + "summary": "Get single group member by ID", + "description": "Display the specified resource.", + "operationId": "getGroupMemberById", "parameters": [ { - "name": "screens_id", + "name": "group_member_id", "in": "path", - "description": "ID of screens to return", + "description": "ID of group members to return", "required": true, "schema": { "type": "string" @@ -2906,63 +2753,29 @@ ], "responses": { "200": { - "description": "Successfully found the screen", + "description": "Successfully found the group members", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/screens" + "$ref": "#/components/schemas/getGroupMembersById" } } } } } }, - "put": { - "tags": [ - "Screens" - ], - "summary": "Update a screen", - "description": "Update a Screen.", - "operationId": "updateScreen", - "parameters": [ - { - "name": "screens_id", - "in": "path", - "description": "ID of screen to return", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/screensEditable" - } - } - } - }, - "responses": { - "204": { - "description": "success" - } - } - }, "delete": { "tags": [ - "Screens" + "Group Members" ], - "summary": "Delete a screen", - "description": "Delete a Screen.", - "operationId": "deleteScreen", + "summary": "Delete a group member", + "description": "Delete a group membership", + "operationId": "deleteGroupMember", "parameters": [ { - "name": "screens_id", + "name": "group_member_id", "in": "path", - "description": "ID of screen to return", + "description": "ID of group_members to return", "required": true, "schema": { "type": "string" @@ -2976,78 +2789,64 @@ } } }, - "/screens/{screens_id}/draft": { - "put": { + "/group_members_available": { + "get": { "tags": [ - "Screens" + "Group Members" ], - "summary": "Update a draft screen", - "description": "Update a draft Screen.", - "operationId": "updateDraftScreen", + "summary": "Returns all groups available for a given member", + "description": "Display a listing of groups available", + "operationId": "getGroupMembersAvailable", "parameters": [ { - "name": "screens_id", + "name": "member_id", "in": "path", - "description": "ID of screen to return", + "description": "ID of group member to return", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/screensEditable" - } - } - } - }, - "responses": { - "204": { - "description": "success" - } - } - } - }, - "/screens/{screens_id}/duplicate": { - "put": { - "tags": [ - "Screens" - ], - "summary": "duplicate a screen", - "description": "duplicate a Screen.", - "operationId": "duplicateScreen", - "parameters": [ + }, { - "name": "screens_id", + "name": "member_type", "in": "path", - "description": "ID of screen to return", + "description": "type of group member to return", "required": true, "schema": { "type": "string" } + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/screensEditable" - } - } - } - }, + ], "responses": { - "201": { - "description": "success", + "200": { + "description": "list of groups available to be assigned as member", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/screens" + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/availableGroupMembers" + } + }, + "meta": { + "$ref": "#/components/schemas/metadata" + } + }, + "type": "object" } } } @@ -3055,73 +2854,57 @@ } } }, - "/screens/{screensId}/export": { - "post": { + "/user_members_available": { + "get": { "tags": [ - "Screens" + "Group Members" ], - "summary": "Export a single screen by ID", - "description": "Export the specified screen.", - "operationId": "exportScreen", + "summary": "Returns all users available for a given group", + "description": "Display a listing of users available", + "operationId": "getUserMembersAvailable", "parameters": [ { - "name": "screensId", + "name": "group_id", "in": "path", - "description": "ID of screen to return", + "description": "ID of group to return", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "Successfully exported the screen", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/screenExported" - } - } + }, + { + "name": "filter", + "in": "query", + "description": "Filter results by string. Searches Name. Can be a substring.", + "schema": { + "type": "string" } + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" } - } - } - }, - "/screens/import": { - "post": { - "tags": [ - "Screens" ], - "summary": "Import a new screen", - "description": "Import the specified screen.", - "operationId": "importScreen", - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "properties": { - "file": { - "description": "file to import", - "type": "string", - "format": "binary" - } - }, - "type": "object" - } - } - } - }, "responses": { - "201": { - "description": "success", + "200": { + "description": "list of users available to be assigned as member", "content": { "application/json": { "schema": { "properties": { - "status": { - "type": "object" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/users" + } + }, + "meta": { + "$ref": "#/components/schemas/metadata" } }, "type": "object" @@ -3132,69 +2915,27 @@ } } }, - "/screens/preview": { - "post": { - "tags": [ - "Screens" - ], - "summary": "Preview a screen", - "description": "Get preview a screen", - "operationId": "preview", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "config": { - "type": "object" - }, - "watchers": { - "type": "object" - }, - "computed": { - "type": "object" - }, - "custom_css": { - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "description": "Successfully found the screen", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/screens" - } - } - } - } - } - } - }, - "/script_categories": { + "/notifications": { "get": { "tags": [ - "Script Categories" + "Notifications" ], - "summary": "Returns all scripts categories that the user has access to", - "description": "Display a listing of the Script Categories.", - "operationId": "getScriptCategories", + "summary": "Returns all notifications that the user has access to", + "description": "Display a listing of the resource.", + "operationId": "getNotifications", "parameters": [ { - "name": "filter", + "name": "status", "in": "query", - "description": "Filter results by string. Searches Name, Description, and Status. All fields must match exactly.", + "description": "Only return notifications by status (unread, all, etc.)", + "required": false, "schema": { "type": "string" } }, + { + "$ref": "#/components/parameters/filter" + }, { "$ref": "#/components/parameters/order_by" }, @@ -3203,11 +2944,14 @@ }, { "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of scripts categories", + "description": "list of notifications", "content": { "application/json": { "schema": { @@ -3215,12 +2959,10 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ScriptCategory" + "$ref": "#/components/schemas/Notification" } }, - "meta": { - "type": "object" - } + "meta": {} }, "type": "object" } @@ -3231,17 +2973,17 @@ }, "post": { "tags": [ - "Script Categories" + "Notifications" ], - "summary": "Save a new Script Category", - "description": "Store a newly created Script Category in storage", - "operationId": "createScriptCategory", + "summary": "Save a new notifications", + "description": "Store a newly created resource in storage.", + "operationId": "createNotification", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScriptCategoryEditable" + "$ref": "#/components/schemas/NotificationEditable" } } } @@ -3252,7 +2994,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScriptCategory" + "$ref": "#/components/schemas/Notification" } } } @@ -3260,19 +3002,19 @@ } } }, - "/script_categories/{script_category_id}": { + "/notifications/{notification_id}": { "get": { "tags": [ - "Script Categories" + "Notifications" ], - "summary": "Get single script category by ID", - "description": "Display the specified script category.", - "operationId": "getScriptCategoryById", + "summary": "Get single notification by ID", + "description": "Display the specified resource.", + "operationId": "getNotificationById", "parameters": [ { - "name": "script_category_id", + "name": "notification_id", "in": "path", - "description": "ID of script category to return", + "description": "ID of notification to return", "required": true, "schema": { "type": "string" @@ -3281,11 +3023,11 @@ ], "responses": { "200": { - "description": "Successfully found the script", + "description": "Successfully found the notification", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScriptCategory" + "$ref": "#/components/schemas/Notification" } } } @@ -3294,16 +3036,16 @@ }, "put": { "tags": [ - "Script Categories" + "Notifications" ], - "summary": "Update a script Category", - "description": "Updates the current element", - "operationId": "updateScriptCategory", + "summary": "Update a notification", + "description": "Update a user", + "operationId": "updateNotification", "parameters": [ { - "name": "script_category_id", + "name": "notification_id", "in": "path", - "description": "ID of script category to return", + "description": "ID of notification to return", "required": true, "schema": { "type": "string" @@ -3315,36 +3057,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScriptCategoryEditable" + "$ref": "#/components/schemas/NotificationEditable" } } } }, "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScriptCategory" - } - } - } + "204": { + "description": "success" } } }, "delete": { "tags": [ - "Script Categories" + "Notifications" ], - "summary": "Delete a script category", - "description": "Remove the specified resource from storage.", - "operationId": "deleteScriptCategory", + "summary": "Delete a notification", + "description": "Delete a notification", + "operationId": "deleteNotification", "parameters": [ { - "name": "script_category_id", + "name": "notification_id", "in": "path", - "description": "ID of script category to return", + "description": "ID of notification to return", "required": true, "schema": { "type": "string" @@ -3358,126 +3093,74 @@ } } }, - "/scripts": { - "get": { - "tags": [ - "Scripts" - ], - "summary": "Returns all scripts that the user has access to", - "description": "Get a list of scripts in a process.", - "operationId": "getScripts", - "parameters": [ - { - "$ref": "#/components/parameters/filter" - }, - { - "$ref": "#/components/parameters/order_by" - }, - { - "$ref": "#/components/parameters/order_direction" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/include" - } - ], - "responses": { - "200": { - "description": "list of scripts", - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/scripts" - } - }, - "meta": { - "type": "object" - } - }, - "type": "object" - } - } - } - } - } - }, - "post": { + "/read_notifications": { + "put": { "tags": [ - "Scripts" + "Notifications" ], - "summary": "Save a new script", - "description": "Create a new script in a process.", - "operationId": "createScript", + "summary": "Mark notifications as read by the user", + "description": "Update notification as read", + "operationId": "markNotificationAsRead", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/scriptsEditable" + "properties": { + "message_ids": { + "description": "list of message ids that will be marked as read", + "type": "array", + "items": { + "type": "string" + } + }, + "routes": { + "description": "all messages that has an url that is in this list will be marked as read", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" } } } }, "responses": { "201": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/scripts" - } - } - } + "description": "success" } } } }, - "/scripts/{script_id}/preview": { - "post": { + "/unread_notifications": { + "put": { "tags": [ - "Scripts" - ], - "summary": "Test script code without saving it", - "description": "Previews executing a script, with sample data/config data", - "operationId": "previewScript", - "parameters": [ - { - "name": "script_id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } + "Notifications" ], + "summary": "Mark notifications as unread by the user", + "description": "Update notifications as unread", + "operationId": "markNotificationAsUnread", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "properties": { - "data": { + "message_ids": { + "description": "list of message ids that will be marked as read", "type": "array", "items": { - "type": "object" + "type": "string" } }, - "config": { + "routes": { + "description": "all messages that has an url that is in this list will be marked as read", "type": "array", "items": { - "type": "object" + "type": "string" } - }, - "code": { - "type": "string" - }, - "nonce": { - "type": "string" } }, "type": "object" @@ -3486,45 +3169,78 @@ } }, "responses": { - "200": { - "description": "success if the script was queued" + "201": { + "description": "success" } } } }, - "/scripts/execute/{script_id}": { - "post": { + "/read_all_notifications": { + "put": { "tags": [ - "Scripts" + "Notifications" ], - "summary": "Execute script", - "description": "Executes a script, with sample data/config data", - "operationId": "executeScript", - "parameters": [ - { - "name": "script_id", - "in": "path", - "required": true, - "schema": { - "type": "integer" + "summary": "Mark notifications as read by id and type", + "description": "Update all notification as read.", + "operationId": "markAllAsRead", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "description": "Polymorphic relation id", + "type": "integer" + }, + "type": { + "description": "Polymorphic relation type", + "type": "string" + } + }, + "type": "object" + } } } + }, + "responses": { + "201": { + "description": "success" + } + } + } + }, + "/permissions": { + "put": { + "tags": [ + "Permissions" ], + "summary": "Update the permissions of a user", + "description": "Update permissions", + "operationId": "51b3555fb753f44324bf5c3880e01454", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "properties": { - "data": { - "type": "array", - "items": { - "type": "object" - } + "user_id": { + "description": "ID of the user whose permissions are configured", + "type": "integer" }, - "config": { + "group_id": { + "description": "ID of the group whose permissions are configured", + "type": "integer" + }, + "is_administrator": { + "description": "Whether the user should have Super Admin privileges", + "type": "boolean", + "default": false + }, + "permission_names": { "type": "array", "items": { - "type": "object" + "type": "string" } } }, @@ -3534,156 +3250,141 @@ } }, "responses": { - "200": { - "description": "success if the script was queued", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/scriptsPreview" - } - } - } + "204": { + "description": "success" } } } }, - "/scripts/execution/{key}": { + "/process_categories": { "get": { "tags": [ - "Scripts" + "Process Categories" ], - "summary": "Get the response of a script execution by execution key", - "description": "Get the response of a script execution", - "operationId": "getScriptExecutionResponse", + "summary": "Returns all processes categories that the user has access to", + "description": "Display a listing of the Process Categories.", + "operationId": "getProcessCategories", "parameters": [ { - "name": "key", - "in": "path", - "required": true, + "name": "filter", + "in": "query", + "description": "Filter results by string. Searches Name and Status. All fields must match exactly.", "schema": { "type": "string" } + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" } ], "responses": { "200": { - "description": "response of a script execution", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/scripts/{script_id}": { - "get": { - "tags": [ - "Scripts" - ], - "summary": "Get single script by ID", - "description": "Get a single script in a process.", - "operationId": "getScriptsById", - "parameters": [ - { - "name": "script_id", - "in": "path", - "description": "ID of script to return", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successfully found the script", + "description": "list of processes categories", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/scripts" + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessCategory" + } + }, + "meta": { + "type": "object" + } + }, + "type": "object" } } } } } }, - "put": { + "post": { "tags": [ - "Scripts" - ], - "summary": "Update a script", - "description": "Update a script in a process.", - "operationId": "updateScript", - "parameters": [ - { - "name": "script_id", - "in": "path", - "description": "ID of script to return", - "required": true, - "schema": { - "type": "string" - } - } + "Process Categories" ], + "summary": "Save a new process Category", + "description": "Store a newly created Process Category in storage", + "operationId": "createProcessCategory", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/scriptsEditable" + "$ref": "#/components/schemas/ProcessCategoryEditable" } } } }, "responses": { - "204": { - "description": "success" + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessCategory" + } + } + } } } - }, - "delete": { + } + }, + "/process_categories/{process_category_id}": { + "get": { "tags": [ - "Scripts" + "Process Categories" ], - "summary": "Delete a script", - "description": "Delete a script in a process.", - "operationId": "deleteScript", + "summary": "Get single process category by ID", + "description": "Display the specified Process category.", + "operationId": "getProcessCategoryById", "parameters": [ { - "name": "script_id", + "name": "process_category_id", "in": "path", - "description": "ID of script to return", + "description": "ID of process category to return", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], "responses": { - "204": { - "description": "success" + "200": { + "description": "Successfully found the process", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessCategory" + } + } + } } } - } - }, - "/scripts/{script_id}/draft": { + }, "put": { "tags": [ - "Scripts" + "Process Categories" ], - "summary": "Update a draft script", - "description": "Update a draft script.", - "operationId": "updateDraftScript", + "summary": "Update a process Category", + "description": "Updates the current element", + "operationId": "updateProcessCategory", "parameters": [ { - "name": "script_id", + "name": "process_category_id", "in": "path", - "description": "ID of script to return", + "description": "ID of process category to return", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], @@ -3692,54 +3393,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/scriptsEditable" + "$ref": "#/components/schemas/ProcessCategoryEditable" } } } }, "responses": { - "204": { - "description": "success" + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessCategory" + } + } + } } } - } - }, - "/scripts/{scripts_id}/duplicate": { - "put": { + }, + "delete": { "tags": [ - "Scripts" + "Process Categories" ], - "summary": "duplicate a script", - "description": "Duplicate a Script.", - "operationId": "duplicateScript", + "summary": "Delete a process category", + "description": "Remove the specified resource from storage.", + "operationId": "deleteProcessCategory", "parameters": [ { - "name": "scripts_id", + "name": "process_category_id", "in": "path", - "description": "ID of script to return", + "description": "ID of process category to return", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/scriptsEditable" - } - } - } - }, "responses": { - "201": { + "204": { "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/scripts" + "$ref": "#/components/schemas/Process" } } } @@ -3747,14 +3443,14 @@ } } }, - "/script-executors": { + "/processes": { "get": { "tags": [ - "Rebuild Script Executors" + "Processes" ], - "summary": "Returns all script executors that the user has access to", - "description": "Get a list of script executors.", - "operationId": "getScriptExecutors", + "summary": "Returns all processes that the user has access to", + "description": "Get list Process", + "operationId": "getProcesses", "parameters": [ { "$ref": "#/components/parameters/filter" @@ -3767,11 +3463,17 @@ }, { "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/status" + }, + { + "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of script executors", + "description": "list of processes", "content": { "application/json": { "schema": { @@ -3779,11 +3481,11 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/scriptExecutors" + "$ref": "#/components/schemas/Process" } }, "meta": { - "type": "object" + "$ref": "#/components/schemas/metadata" } }, "type": "object" @@ -3795,36 +3497,28 @@ }, "post": { "tags": [ - "Rebuild Script Executors" + "Processes" ], - "summary": "Create a script executor", - "description": "Create a script executor", - "operationId": "createScriptExecutor", + "summary": "Save a new process", + "description": "Store a newly created resource in storage.", + "operationId": "createProcess", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/scriptExecutorsEditable" + "$ref": "#/components/schemas/ProcessEditable" } } } }, "responses": { - "200": { + "201": { "description": "success", "content": { "application/json": { "schema": { - "properties": { - "status": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/Process" } } } @@ -3832,109 +3526,65 @@ } } }, - "/script-executors/{script_executor}": { - "put": { + "/processes/{processId}": { + "get": { "tags": [ - "Rebuild Script Executors" + "Processes" ], - "summary": "Update script executor", - "description": "Update and rebuild the script executor", - "operationId": "updateScriptExecutor", + "summary": "Get single process by ID", + "description": "Display the specified resource.", + "operationId": "getProcessById", "parameters": [ { - "name": "script_executor", + "name": "processId", "in": "path", - "description": "ID of script executor to return", + "description": "ID of process to return", "required": true, "schema": { - "type": "string" + "type": "integer" } + }, + { + "$ref": "#/components/parameters/include" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/scriptExecutorsEditable" - } - } - } - }, "responses": { "200": { - "description": "success", + "description": "Successfully found the process", "content": { "application/json": { "schema": { - "properties": { - "status": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/Process" } } } } } }, - "delete": { + "put": { "tags": [ - "Rebuild Script Executors" + "Processes" ], - "summary": "Delete a script executor", - "description": "Delete a script executor", - "operationId": "deleteScriptExecutor", + "summary": "Update a process", + "description": "Updates the current element.", + "operationId": "updateProcess", "parameters": [ { - "name": "script_executor", + "name": "processId", "in": "path", - "description": "ID of script executor to return", + "description": "ID of process to return", "required": true, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "success", - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "type": "string" - } - }, - "type": "object" - } - } + "type": "integer" } } - } - } - }, - "/script-executors/cancel": { - "post": { - "tags": [ - "Rebuild Script Executors" ], - "summary": "Cancel a script executor", - "description": "Cancel a script executor", - "operationId": "cancelScriptExecutor", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "pidFile": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/ProcessEditable" } } } @@ -3945,94 +3595,63 @@ "content": { "application/json": { "schema": { - "properties": { - "status": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/Process" } } } } } - } - }, - "/script-executors/available-languages": { - "get": { + }, + "delete": { "tags": [ - "Rebuild Script Executors" + "Processes" ], - "summary": "Returns all available languages", - "description": "Get a list of available languages.", - "operationId": "getAvailableLanguages", + "summary": "Delete a process", + "description": "Remove the specified resource from storage.", + "operationId": "deleteProcess", "parameters": [ { - "$ref": "#/components/parameters/filter" - }, - { - "$ref": "#/components/parameters/order_by" - }, - { - "$ref": "#/components/parameters/order_direction" - }, - { - "$ref": "#/components/parameters/per_page" + "name": "processId", + "in": "path", + "description": "ID of process to return", + "required": true, + "schema": { + "type": "integer" + } } ], "responses": { - "200": { - "description": "list of available languages", - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/availableLanguages" - } - }, - "meta": { - "type": "object" - } - }, - "type": "object" - } - } - } + "204": { + "description": "success" } } } }, - "/security-logs": { + "/processes/{processId}/start_events": { "get": { "tags": [ - "Security Logs" + "Processes" ], - "summary": "Returns all security logs", - "description": "Get a list of Security Logs.", - "operationId": "getSecurityLogs", + "summary": "Get start events of a process by Id", + "description": "Display the specified resource.", + "operationId": "getStartEventsProcessById", "parameters": [ { - "$ref": "#/components/parameters/filter" - }, - { - "$ref": "#/components/parameters/order_by" - }, - { - "$ref": "#/components/parameters/order_direction" + "name": "processId", + "in": "path", + "description": "ID of process to return", + "required": true, + "schema": { + "type": "integer" + } }, { - "$ref": "#/components/parameters/per_page" + "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of security logs", + "description": "Successfully found the start events process", "content": { "application/json": { "schema": { @@ -4040,11 +3659,11 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/securityLog" + "$ref": "#/components/schemas/ProcessStartEvents" } }, "meta": { - "type": "object" + "$ref": "#/components/schemas/metadata" } }, "type": "object" @@ -4055,40 +3674,42 @@ } } }, - "/security-logs/{securityLog}": { - "get": { + "/processes/{processId}/draft": { + "put": { "tags": [ - "Security Logs" + "Processes" ], - "summary": "Get single security log by ID", - "description": "Display the specified resource.", - "operationId": "getSecurityLog", + "summary": "Update a draft process", + "description": "Update draft process.", + "operationId": "updateDraftProcess", "parameters": [ { - "name": "securityLog", + "name": "processId", "in": "path", - "description": "ID of security log to return", + "description": "ID of process to return", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessEditable" + } + } + } + }, "responses": { "200": { - "description": "Successfully found the security log", + "description": "success", "content": { "application/json": { "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/securityLog" - } - } - }, - "type": "object" + "$ref": "#/components/schemas/Process" } } } @@ -4096,14 +3717,14 @@ } } }, - "/settings": { + "/start_processes": { "get": { "tags": [ - "Settings" + "Processes" ], - "summary": "Returns all settings", - "description": "Display a listing of the resource.", - "operationId": "getSettings", + "summary": "Returns the list of processes that the user can start", + "description": "Returns the list of processes that the user can start.", + "operationId": "startProcesses", "parameters": [ { "$ref": "#/components/parameters/filter" @@ -4119,11 +3740,20 @@ }, { "$ref": "#/components/parameters/include" + }, + { + "name": "without_event_definitions", + "in": "path", + "description": "If true return only processes that haven't start event definitions", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { "200": { - "description": "list of settings", + "description": "list of processes that the user can start", "content": { "application/json": { "schema": { @@ -4131,7 +3761,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/settings" + "$ref": "#/components/schemas/ProcessWithStartEvents" } }, "meta": { @@ -4146,85 +3776,67 @@ } } }, - "/settings/{setting_id}": { + "/processes/{processId}/restore": { "put": { "tags": [ - "Settings" + "Processes" ], - "summary": "Update a setting", - "description": "Update a setting", - "operationId": "updateSetting", + "summary": "Restore an inactive process", + "description": "Reverses the soft delete of the element.", + "operationId": "restoreProcess", "parameters": [ { - "name": "setting_id", + "name": "processId", "in": "path", - "description": "ID of setting to return", + "description": "ID of process to return", "required": true, "schema": { "type": "integer" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/settingsEditable" + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Process" + } } } } - }, - "responses": { - "204": { - "description": "success" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" - } } } }, - "/signals": { - "get": { + "/processes/{processId}/export": { + "post": { "tags": [ - "Signals" + "Processes" ], - "summary": "Returns all signals", - "description": "Display a listing of the resource.", - "operationId": "getSignals", + "summary": "Export a single process by ID and return a URL to download it", + "description": "Export the specified process.", + "operationId": "exportProcess", "parameters": [ { - "$ref": "#/components/parameters/filter" - }, - { - "$ref": "#/components/parameters/order_by" - }, - { - "$ref": "#/components/parameters/order_direction" - }, - { - "$ref": "#/components/parameters/per_page" + "name": "processId", + "in": "path", + "description": "ID of process to export", + "required": true, + "schema": { + "type": "integer" + } } ], "responses": { "200": { - "description": "list of signals", + "description": "Successfully built the process for export", "content": { "application/json": { "schema": { "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/signals" - } - }, - "meta": { - "type": "object" + "url": { + "type": "string" } }, "type": "object" @@ -4233,31 +3845,40 @@ } } } - }, + } + }, + "/processes/import/validation": { "post": { "tags": [ - "Signals" + "Processes" ], - "summary": "Creates a new Global Signal", - "description": "Creates a new global signal", - "operationId": "createSignal", + "summary": "Validate a import", + "description": "Validate the specified process before importing.", + "operationId": "validateImport", "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/signalsEditable" + "properties": { + "file": { + "description": "file to import", + "type": "string", + "format": "binary" + } + }, + "type": "object" } } } }, "responses": { - "201": { + "200": { "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/signals" + "$ref": "#/components/schemas/ProcessImport" } } } @@ -4265,139 +3886,111 @@ } } }, - "/signals/{signal_id}": { - "get": { + "/processes/import": { + "post": { "tags": [ - "Signals" + "Processes" ], - "summary": "Get a single signal by ID", - "description": "Display the specified resource.", - "operationId": "getSignalsById", - "parameters": [ - { - "name": "signal_id", - "in": "path", - "description": "signal id", - "required": true, - "schema": { - "type": "string" + "summary": "Import a new process", + "description": "Import the specified process.", + "operationId": "importProcess", + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "file": { + "description": "file to import", + "type": "string", + "format": "binary" + } + }, + "type": "object" + } } } - ], + }, "responses": { "200": { "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/signals" + "$ref": "#/components/schemas/ProcessImport" } } } } } - }, - "put": { + } + }, + "/processes/{processId}/bpmn": { + "get": { "tags": [ - "Signals" + "Processes" ], - "summary": "Update a signal", - "operationId": "updateSignal", + "summary": "Download the BPMN definition of a process", + "description": "Download the BPMN definition of a process", + "operationId": "processBpmn", "parameters": [ { - "name": "signal_id", + "name": "processId", "in": "path", - "description": "ID of signal to update", + "description": "ID of process", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/signalsEditable" - } - } - } - }, "responses": { "200": { - "description": "success", + "description": "Successfully built the process for export", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/signals" + "properties": { + "url": { + "type": "string" + } + }, + "type": "object" } } } } } - }, - "delete": { + } + }, + "/processes/import/{code}/is_ready": { + "head": { "tags": [ - "Signals" + "Processes" ], - "summary": "Delete a signal", - "operationId": "deleteSignal", + "summary": "Check if the import is ready", + "description": "Check if the import is ready", + "operationId": "6a131993b7c879ddcd3d3a291dd8380f", "parameters": [ { - "name": "signal_id", + "name": "code", "in": "path", - "description": "ID of signal to delete", + "description": "Import code", "required": true, "schema": { "type": "string" } } ], - "responses": { - "204": { - "description": "success" - } - } - } - }, - "/task_assignments": { - "get": { - "tags": [ - "Task Assignments" - ], - "summary": "Returns all task assignments", - "description": "Display a listing of the resource.", - "operationId": "getTaskAssignments", - "parameters": [ - { - "$ref": "#/components/parameters/filter" - }, - { - "$ref": "#/components/parameters/order_by" - }, - { - "$ref": "#/components/parameters/order_direction" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], "responses": { "200": { - "description": "list of task assignments", + "description": "check is import is ready", "content": { "application/json": { "schema": { "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/taskAssignments" - } - }, - "meta": { - "type": "object" + "ready": { + "type": "boolean" } }, "type": "object" @@ -4406,54 +3999,21 @@ } } } - }, - "post": { - "tags": [ - "Task Assignments" - ], - "summary": "Save a new Task Assignment", - "description": "Store a newly created task assignment in storage.", - "operationId": "createTaskAssignments", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/taskAssignmentsEditable" - } - } - } - }, - "responses": { - "201": { - "description": "success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/taskAssignments" - } - } - } - }, - "422": { - "$ref": "#/components/responses/422" - } - } } }, - "/task_assignments/{task_assignment}": { - "put": { + "/processes/{process_id}/import/assignments": { + "post": { "tags": [ - "Task Assignments" + "Processes" ], - "summary": "Update a Task Assignment", - "description": "Update a task assignment", - "operationId": "updateTaskAssignments", + "summary": "Update assignments after import", + "description": "Import Assignments of process.", + "operationId": "assignmentProcess", "parameters": [ { - "name": "task_assignment", + "name": "process_id", "in": "path", - "description": "ID of task assignment to update", + "description": "ID of process to return", "required": true, "schema": { "type": "integer" @@ -4465,7 +4025,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/taskAssignmentsEditable" + "$ref": "#/components/schemas/ProcessAssignments" } } } @@ -4473,66 +4033,85 @@ "responses": { "204": { "description": "success" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } } - }, - "delete": { + } + }, + "/process_events/{process_id}": { + "post": { "tags": [ - "Task Assignments" + "Processes" ], - "summary": "Delete a Task Assignment", - "description": "Remove an assignment", - "operationId": "deleteTaskAssignments", + "summary": "Start a new process", + "description": "Trigger an start event within a process.", + "operationId": "triggerStartEvent", "parameters": [ { - "name": "task_assignment", + "name": "process_id", "in": "path", - "description": "ID of task assignment to delete", + "description": "ID of process to return", "required": true, "schema": { "type": "integer" } + }, + { + "name": "event", + "in": "query", + "description": "Node ID of the start event", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { - "required": true, + "description": "data that will be stored as part of the created request", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/taskAssignmentsEditable" + "type": "object" } } } }, "responses": { "200": { - "description": "success" + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/processRequest" + } + } + } } } } }, - "/tasks": { + "/requests": { "get": { "tags": [ - "Tasks" + "Process Requests" ], - "summary": "Returns all tasks that the user has access to", + "summary": "Returns all process Requests that the user has access to", "description": "Display a listing of the resource.", - "operationId": "getTasks", + "operationId": "getProcessesRequests", "parameters": [ { - "name": "process_request_id", + "name": "type", "in": "query", - "description": "Process request id", + "description": "Only return requests by type (all|in_progress|completed)", "required": false, "schema": { - "type": "integer" + "type": "string", + "enum": [ + "all", + "in_progress", + "completed", + "started_me" + ] } }, { @@ -4544,13 +4123,16 @@ { "$ref": "#/components/parameters/order_direction" }, + { + "$ref": "#/components/parameters/per_page" + }, { "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "list of tasks", + "description": "list of processes", "content": { "application/json": { "schema": { @@ -4558,7 +4140,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/processRequestToken" + "$ref": "#/components/schemas/processRequest" } }, "meta": { @@ -4573,41 +4155,35 @@ } } }, - "/tasks/{task_id}": { + "/requests/{process_request_id}": { "get": { "tags": [ - "Tasks" + "Process Requests" ], - "summary": "Get a single task by ID", + "summary": "Get single process request by ID", "description": "Display the specified resource.", - "operationId": "getTasksById", + "operationId": "getProcessRequestById", "parameters": [ { - "name": "task_id", + "name": "process_request_id", "in": "path", - "description": "task id", + "description": "ID of process request to return", "required": true, "schema": { "type": "integer" } }, { - "name": "include", - "in": "query", - "description": "include", - "required": false, - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/include" } ], "responses": { "200": { - "description": "success", + "description": "Successfully found the process", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/processRequestToken" + "$ref": "#/components/schemas/processRequest" } } } @@ -4619,16 +4195,16 @@ }, "put": { "tags": [ - "Tasks" + "Process Requests" ], - "summary": "Update a task", - "description": "Updates the current element", - "operationId": "updateTask", + "summary": "Update a process request", + "description": "Update a request", + "operationId": "updateProcessRequest", "parameters": [ { - "name": "task_id", + "name": "process_request_id", "in": "path", - "description": "ID of task to update", + "description": "ID of process request to return", "required": true, "schema": { "type": "integer" @@ -4640,63 +4216,101 @@ "content": { "application/json": { "schema": { - "required": [ - "status", - "data" - ], - "properties": { - "status": { - "type": "string", - "example": "COMPLETED" - }, - "data": { - "type": "object" - } - }, - "type": "object" + "$ref": "#/components/schemas/processRequestEditable" } } } }, "responses": { - "200": { + "204": { + "description": "success" + }, + "404": { + "$ref": "#/components/responses/404" + } + } + }, + "delete": { + "tags": [ + "Process Requests" + ], + "summary": "Delete a process request", + "description": "Delete a request", + "operationId": "deleteProcessRequest", + "parameters": [ + { + "name": "process_request_id", + "in": "path", + "description": "ID of process request to return", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/processRequestToken" + "$ref": "#/components/schemas/processRequest" } } } }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } } } }, - "/users": { - "get": { + "/requests/{process_request_id}/events/{event_id}": { + "post": { "tags": [ - "Users" + "Process Requests" ], - "summary": "Returns all users", - "description": "Display a listing of the resource.", - "operationId": "getUsers", + "summary": "Update a process request event", + "description": "Trigger a intermediate catch event", + "operationId": "updateProcessRequestEvent", "parameters": [ { - "$ref": "#/components/parameters/status" + "name": "process_request_id", + "in": "path", + "description": "ID of process request to return", + "required": true, + "schema": { + "type": "string" + } }, { - "name": "filter", - "in": "query", - "description": "Filter results by string. Searches First Name, Last Name, Email and Username.", + "name": "event_id", + "in": "path", + "description": "ID of process event to return", + "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "success" + } + } + } + }, + "/requests/{request_id}/files": { + "get": { + "tags": [ + "Request Files" + ], + "summary": "Returns the list of files associated with a request", + "description": "Display a listing of the resource.", + "operationId": "getRequestFiles", + "parameters": [ + { + "$ref": "#/components/parameters/filter" }, { "$ref": "#/components/parameters/order_by" @@ -4708,21 +4322,18 @@ "$ref": "#/components/parameters/per_page" }, { - "$ref": "#/components/parameters/include" - }, - { - "name": "exclude_ids", - "in": "query", - "description": "Comma separated list of IDs to exclude from the response", + "name": "request_id", + "in": "path", + "description": "ID of the request", + "required": true, "schema": { - "type": "string", - "default": "" + "type": "integer" } } ], "responses": { "200": { - "description": "list of users", + "description": "list of files", "content": { "application/json": { "schema": { @@ -4730,11 +4341,16 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/users" + "$ref": "#/components/schemas/media" } }, "meta": { - "$ref": "#/components/schemas/metadata" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/metadata" + } + ] } }, "type": "object" @@ -4746,51 +4362,92 @@ }, "post": { "tags": [ - "Users" + "Request Files" ], - "summary": "Save a new users", + "summary": "Save a new media file to a request", "description": "Store a newly created resource in storage.", - "operationId": "createUser", + "operationId": "createRequestFile", + "parameters": [ + { + "name": "request_id", + "in": "path", + "description": "ID of the request", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "data_name", + "in": "query", + "description": "Variable name in the request data to use for the file name", + "required": false, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/usersEditable" + "properties": { + "file": { + "description": "save a new media file", + "type": "string", + "format": "binary" + } + }, + "type": "object" } } } }, "responses": { - "201": { + "200": { "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/users" - } + "properties": { + "message": { + "type": "string" + }, + "fileUploadId": { + "type": "integer" + } + }, + "type": "object" + } } } - }, - "422": { - "$ref": "#/components/responses/422" } } } }, - "/users/{user_id}": { + "/requests/{request_id}/files/{file_id}": { "get": { "tags": [ - "Users" + "Request Files" ], - "summary": "Get single user by ID", + "summary": "Get a file uploaded to a request", "description": "Display the specified resource.", - "operationId": "getUserById", + "operationId": "getRequestFilesById", "parameters": [ { - "name": "user_id", + "name": "request_id", "in": "path", - "description": "ID of user to return", + "description": "ID of the request", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "file_id", + "in": "path", + "description": "ID of the file to return", "required": true, "schema": { "type": "integer" @@ -4799,11 +4456,12 @@ ], "responses": { "200": { - "description": "Successfully found the process", + "description": "File stream", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/users" + "type": "string", + "format": "binary" } } } @@ -4813,126 +4471,172 @@ } } }, - "put": { + "delete": { "tags": [ - "Users" + "Request Files" ], - "summary": "Update a user", - "description": "Update a user", - "operationId": "updateUser", + "summary": "Delete all media associated with a request", + "description": "Remove the specified resource from storage.", + "operationId": "deleteRequestFile", "parameters": [ { - "name": "user_id", + "name": "file_id", "in": "path", - "description": "ID of user to return", + "description": "ID of the file", "required": true, "schema": { "type": "integer" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/usersEditable" - } + }, + { + "name": "request_id", + "in": "path", + "description": "ID of the request", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "204": { "description": "success" }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } } - }, - "delete": { + } + }, + "/screen_categories": { + "get": { "tags": [ - "Users" + "Screen Categories" ], - "summary": "Delete a user", - "description": "Delete a user", - "operationId": "deleteUser", + "summary": "Returns all screens categories that the user has access to", + "description": "Display a listing of the Screen Categories.", + "operationId": "getScreenCategories", "parameters": [ { - "name": "user_id", - "in": "path", - "description": "ID of user to delete", - "required": true, + "name": "filter", + "in": "query", + "description": "Filter results by string. Searches Name, Description, and Status. All fields must match exactly.", "schema": { - "type": "integer" + "type": "string" } + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" } ], "responses": { - "204": { - "description": "success" - }, - "404": { - "$ref": "#/components/responses/404" + "200": { + "description": "list of screens categories", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScreenCategory" + } + }, + "meta": { + "type": "object" + } + }, + "type": "object" + } + } + } + } + } + }, + "post": { + "tags": [ + "Screen Categories" + ], + "summary": "Save a new Screen Category", + "description": "Store a newly created Screen Category in storage", + "operationId": "createScreenCategory", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScreenCategoryEditable" + } + } + } + }, + "responses": { + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScreenCategory" + } + } + } } } } }, - "/users/{user_id}/get_pinned_controls": { + "/screen_categories/{screen_category_id}": { "get": { "tags": [ - "Users" + "Screen Categories" ], - "summary": "Get the pinned BPMN elements of a specific user", - "description": "Return the user's pinned nodes.", - "operationId": "getPinnnedControls", + "summary": "Get single screen category by ID", + "description": "Display the specified screen category.", + "operationId": "getScreenCategoryById", "parameters": [ { - "name": "user_id", + "name": "screen_category_id", "in": "path", - "description": "ID of user to return the pinned nodes of", + "description": "ID of screen category to return", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { "200": { - "description": "Pinned nodes returned succesfully", + "description": "Successfully found the screen", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/users" + "$ref": "#/components/schemas/ScreenCategory" } } } - }, - "404": { - "$ref": "#/components/responses/404" } } - } - }, - "/users/{user_id}/update_pinned_controls": { + }, "put": { "tags": [ - "Users" + "Screen Categories" ], - "summary": "Update a user's pinned BPMN elements on Modeler", - "description": "Update a user's pinned BPMN elements on Modeler", - "operationId": "updatePinnedControls", + "summary": "Update a screen Category", + "description": "Updates the current element", + "operationId": "updateScreenCategory", "parameters": [ { - "name": "user_id", + "name": "screen_category_id", "in": "path", - "description": "ID of user to return", + "description": "ID of screen category to return", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], @@ -4941,53 +4645,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/usersEditable" + "$ref": "#/components/schemas/ScreenCategoryEditable" } } } }, "responses": { - "204": { - "description": "success" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScreenCategory" + } + } + } } } - } - }, - "/users/{user_id}/groups": { - "put": { + }, + "delete": { "tags": [ - "Users" + "Screen Categories" ], - "summary": "Set the groups a users belongs to", - "description": "Update a user's groups", - "operationId": "updateUserGroups", + "summary": "Delete a screen category", + "description": "Remove the specified resource from storage.", + "operationId": "deleteScreenCategory", "parameters": [ { - "name": "user_id", + "name": "screen_category_id", "in": "path", - "description": "ID of user", + "description": "ID of screen category to return", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/updateUserGroups" - } - } - } - }, "responses": { "204": { "description": "success" @@ -4995,126 +4688,43 @@ } } }, - "/users/restore": { - "put": { - "tags": [ - "Users" - ], - "summary": "Restore a soft deleted user", - "description": "Reverses the soft delete of a user", - "operationId": "restoreUser", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/restoreUser" - } - } - } - }, - "responses": { - "200": { - "description": "success" - } - } - } - }, - "/users/get_filter_configuration/{name}": { + "/screens": { "get": { "tags": [ - "Users" + "Screens" ], - "summary": "Get filter configuration by name", - "description": "Get filter configuration.", - "operationId": "getFilterConfiguration", + "summary": "Returns all screens that the user has access to", + "description": "Get a list of Screens.", + "operationId": "getScreens", "parameters": [ { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/users" - } - } - } + "$ref": "#/components/parameters/filter" }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/users/store_filter_configuration/{name}": { - "get": { - "tags": [ - "Users" - ], - "summary": "Store filter configuration by name", - "description": "Store filter configuration.", - "operationId": "storeFilterConfiguration", - "parameters": [ { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/users" - } - } - } + "$ref": "#/components/parameters/order_by" }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/users/{user_id}/tokens": { - "get": { - "tags": [ - "Personal Tokens" - ], - "summary": "Display listing of access tokens for the specified user.", - "description": "Display listing of access tokens for the specified user.", - "operationId": "getTokens", - "parameters": [ { - "name": "user_id", - "in": "path", - "description": "User id", - "required": true, - "schema": { - "type": "integer" - } + "$ref": "#/components/parameters/order_direction" }, { "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include" + }, + { + "name": "exclude", + "in": "query", + "description": "Comma separated list of fields to exclude from the response", + "schema": { + "type": "string", + "default": "" + } } ], "responses": { "200": { - "description": "List of tokens.", + "description": "list of screens", "content": { "application/json": { "schema": { @@ -5122,11 +4732,11 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/UserToken" + "$ref": "#/components/schemas/screens" } }, "meta": { - "$ref": "#/components/schemas/metadata" + "type": "object" } }, "type": "object" @@ -5138,44 +4748,28 @@ }, "post": { "tags": [ - "Personal Tokens" - ], - "summary": "Create new token for a specific user", - "description": "Create a new personal access token for the user.", - "operationId": "createTokens", - "parameters": [ - { - "name": "user_id", - "in": "path", - "description": "User id", - "required": true, - "schema": { - "type": "integer" - } - } + "Screens" ], + "summary": "Save a new screens", + "description": "Create a new Screen.", + "operationId": "createScreen", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "name": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/screensEditable" } } } }, "responses": { "201": { - "description": "New token instance", + "description": "success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserToken" + "$ref": "#/components/schemas/screens" } } } @@ -5183,28 +4777,19 @@ } } }, - "/users/{user_id}/tokens/{token_id}": { + "/screens/{screens_id}": { "get": { "tags": [ - "Personal Tokens" + "Screens" ], - "summary": "Get single token by ID", - "description": "Show a personal access token for the user", - "operationId": "getTokenById", + "summary": "Get single screens by ID", + "description": "Get a single Screen.", + "operationId": "getScreensById", "parameters": [ { - "name": "user_id", - "in": "path", - "description": "ID of user", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "token_id", + "name": "screens_id", "in": "path", - "description": "ID of token to return", + "description": "ID of screens to return", "required": true, "schema": { "type": "string" @@ -5213,38 +4798,63 @@ ], "responses": { "200": { - "description": "Successfully found the token", + "description": "Successfully found the screen", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserToken" + "$ref": "#/components/schemas/screens" } } } } } }, - "delete": { + "put": { "tags": [ - "Personal Tokens" + "Screens" ], - "summary": "Delete a token", - "description": "Delete the given token for a user", - "operationId": "deleteToken", + "summary": "Update a screen", + "description": "Update a Screen.", + "operationId": "updateScreen", "parameters": [ { - "name": "user_id", + "name": "screens_id", "in": "path", - "description": "User ID", + "description": "ID of screen to return", "required": true, "schema": { - "type": "integer" + "type": "string" } - }, + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/screensEditable" + } + } + } + }, + "responses": { + "204": { + "description": "success" + } + } + }, + "delete": { + "tags": [ + "Screens" + ], + "summary": "Delete a screen", + "description": "Delete a Screen.", + "operationId": "deleteScreen", + "parameters": [ { - "name": "token_id", + "name": "screens_id", "in": "path", - "description": "Token ID", + "description": "ID of screen to return", "required": true, "schema": { "type": "string" @@ -5257,17 +4867,2735 @@ } } } - } - }, - "components": { - "schemas": { - "DateTime": { - "properties": { - "date": { - "type": "string" - } - }, - "type": "object" + }, + "/screens/{screens_id}/draft": { + "put": { + "tags": [ + "Screens" + ], + "summary": "Update a draft screen", + "description": "Update a draft Screen.", + "operationId": "updateDraftScreen", + "parameters": [ + { + "name": "screens_id", + "in": "path", + "description": "ID of screen to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/screensEditable" + } + } + } + }, + "responses": { + "204": { + "description": "success" + } + } + } + }, + "/screens/{screens_id}/duplicate": { + "put": { + "tags": [ + "Screens" + ], + "summary": "duplicate a screen", + "description": "duplicate a Screen.", + "operationId": "duplicateScreen", + "parameters": [ + { + "name": "screens_id", + "in": "path", + "description": "ID of screen to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/screensEditable" + } + } + } + }, + "responses": { + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/screens" + } + } + } + } + } + } + }, + "/screens/{screensId}/export": { + "post": { + "tags": [ + "Screens" + ], + "summary": "Export a single screen by ID", + "description": "Export the specified screen.", + "operationId": "exportScreen", + "parameters": [ + { + "name": "screensId", + "in": "path", + "description": "ID of screen to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successfully exported the screen", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/screenExported" + } + } + } + } + } + } + }, + "/screens/import": { + "post": { + "tags": [ + "Screens" + ], + "summary": "Import a new screen", + "description": "Import the specified screen.", + "operationId": "importScreen", + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "file": { + "description": "file to import", + "type": "string", + "format": "binary" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "type": "object" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/screens/preview": { + "post": { + "tags": [ + "Screens" + ], + "summary": "Preview a screen", + "description": "Get preview a screen", + "operationId": "preview", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "config": { + "type": "object" + }, + "watchers": { + "type": "object" + }, + "computed": { + "type": "object" + }, + "custom_css": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully found the screen", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/screens" + } + } + } + } + } + } + }, + "/script_categories": { + "get": { + "tags": [ + "Script Categories" + ], + "summary": "Returns all scripts categories that the user has access to", + "description": "Display a listing of the Script Categories.", + "operationId": "getScriptCategories", + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filter results by string. Searches Name, Description, and Status. All fields must match exactly.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "list of scripts categories", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScriptCategory" + } + }, + "meta": { + "type": "object" + } + }, + "type": "object" + } + } + } + } + } + }, + "post": { + "tags": [ + "Script Categories" + ], + "summary": "Save a new Script Category", + "description": "Store a newly created Script Category in storage", + "operationId": "createScriptCategory", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScriptCategoryEditable" + } + } + } + }, + "responses": { + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScriptCategory" + } + } + } + } + } + } + }, + "/script_categories/{script_category_id}": { + "get": { + "tags": [ + "Script Categories" + ], + "summary": "Get single script category by ID", + "description": "Display the specified script category.", + "operationId": "getScriptCategoryById", + "parameters": [ + { + "name": "script_category_id", + "in": "path", + "description": "ID of script category to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successfully found the script", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScriptCategory" + } + } + } + } + } + }, + "put": { + "tags": [ + "Script Categories" + ], + "summary": "Update a script Category", + "description": "Updates the current element", + "operationId": "updateScriptCategory", + "parameters": [ + { + "name": "script_category_id", + "in": "path", + "description": "ID of script category to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScriptCategoryEditable" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScriptCategory" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Script Categories" + ], + "summary": "Delete a script category", + "description": "Remove the specified resource from storage.", + "operationId": "deleteScriptCategory", + "parameters": [ + { + "name": "script_category_id", + "in": "path", + "description": "ID of script category to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "success" + } + } + } + }, + "/scripts": { + "get": { + "tags": [ + "Scripts" + ], + "summary": "Returns all scripts that the user has access to", + "description": "Get a list of scripts in a process.", + "operationId": "getScripts", + "parameters": [ + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include" + } + ], + "responses": { + "200": { + "description": "list of scripts", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/scripts" + } + }, + "meta": { + "type": "object" + } + }, + "type": "object" + } + } + } + } + } + }, + "post": { + "tags": [ + "Scripts" + ], + "summary": "Save a new script", + "description": "Create a new script in a process.", + "operationId": "createScript", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scriptsEditable" + } + } + } + }, + "responses": { + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scripts" + } + } + } + } + } + } + }, + "/scripts/{script_id}/preview": { + "post": { + "tags": [ + "Scripts" + ], + "summary": "Test script code without saving it", + "description": "Previews executing a script, with sample data/config data", + "operationId": "previewScript", + "parameters": [ + { + "name": "script_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "type": "object" + } + }, + "config": { + "type": "array", + "items": { + "type": "object" + } + }, + "code": { + "type": "string" + }, + "nonce": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "success if the script was queued" + } + } + } + }, + "/scripts/execute/{script_id}": { + "post": { + "tags": [ + "Scripts" + ], + "summary": "Execute script", + "description": "Executes a script, with sample data/config data", + "operationId": "executeScript", + "parameters": [ + { + "name": "script_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "type": "object" + } + }, + "config": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "success if the script was queued", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scriptsPreview" + } + } + } + } + } + } + }, + "/scripts/execution/{key}": { + "get": { + "tags": [ + "Scripts" + ], + "summary": "Get the response of a script execution by execution key", + "description": "Get the response of a script execution", + "operationId": "getScriptExecutionResponse", + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "response of a script execution", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/scripts/{script_id}": { + "get": { + "tags": [ + "Scripts" + ], + "summary": "Get single script by ID", + "description": "Get a single script in a process.", + "operationId": "getScriptsById", + "parameters": [ + { + "name": "script_id", + "in": "path", + "description": "ID of script to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successfully found the script", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scripts" + } + } + } + } + } + }, + "put": { + "tags": [ + "Scripts" + ], + "summary": "Update a script", + "description": "Update a script in a process.", + "operationId": "updateScript", + "parameters": [ + { + "name": "script_id", + "in": "path", + "description": "ID of script to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scriptsEditable" + } + } + } + }, + "responses": { + "204": { + "description": "success" + } + } + }, + "delete": { + "tags": [ + "Scripts" + ], + "summary": "Delete a script", + "description": "Delete a script in a process.", + "operationId": "deleteScript", + "parameters": [ + { + "name": "script_id", + "in": "path", + "description": "ID of script to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "success" + } + } + } + }, + "/scripts/{script_id}/draft": { + "put": { + "tags": [ + "Scripts" + ], + "summary": "Update a draft script", + "description": "Update a draft script.", + "operationId": "updateDraftScript", + "parameters": [ + { + "name": "script_id", + "in": "path", + "description": "ID of script to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scriptsEditable" + } + } + } + }, + "responses": { + "204": { + "description": "success" + } + } + } + }, + "/scripts/{scripts_id}/duplicate": { + "put": { + "tags": [ + "Scripts" + ], + "summary": "duplicate a script", + "description": "Duplicate a Script.", + "operationId": "duplicateScript", + "parameters": [ + { + "name": "scripts_id", + "in": "path", + "description": "ID of script to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scriptsEditable" + } + } + } + }, + "responses": { + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scripts" + } + } + } + } + } + } + }, + "/script-executors": { + "get": { + "tags": [ + "Rebuild Script Executors" + ], + "summary": "Returns all script executors that the user has access to", + "description": "Get a list of script executors.", + "operationId": "getScriptExecutors", + "parameters": [ + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "list of script executors", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/scriptExecutors" + } + }, + "meta": { + "type": "object" + } + }, + "type": "object" + } + } + } + } + } + }, + "post": { + "tags": [ + "Rebuild Script Executors" + ], + "summary": "Create a script executor", + "description": "Create a script executor", + "operationId": "createScriptExecutor", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scriptExecutorsEditable" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/script-executors/{script_executor}": { + "put": { + "tags": [ + "Rebuild Script Executors" + ], + "summary": "Update script executor", + "description": "Update and rebuild the script executor", + "operationId": "updateScriptExecutor", + "parameters": [ + { + "name": "script_executor", + "in": "path", + "description": "ID of script executor to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/scriptExecutorsEditable" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Rebuild Script Executors" + ], + "summary": "Delete a script executor", + "description": "Delete a script executor", + "operationId": "deleteScriptExecutor", + "parameters": [ + { + "name": "script_executor", + "in": "path", + "description": "ID of script executor to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/script-executors/cancel": { + "post": { + "tags": [ + "Rebuild Script Executors" + ], + "summary": "Cancel a script executor", + "description": "Cancel a script executor", + "operationId": "cancelScriptExecutor", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "pidFile": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/script-executors/available-languages": { + "get": { + "tags": [ + "Rebuild Script Executors" + ], + "summary": "Returns all available languages", + "description": "Get a list of available languages.", + "operationId": "getAvailableLanguages", + "parameters": [ + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "list of available languages", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/availableLanguages" + } + }, + "meta": { + "type": "object" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/security-logs": { + "get": { + "tags": [ + "Security Logs" + ], + "summary": "Returns all security logs", + "description": "Get a list of Security Logs.", + "operationId": "getSecurityLogs", + "parameters": [ + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "list of security logs", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/securityLog" + } + }, + "meta": { + "type": "object" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/security-logs/{securityLog}": { + "get": { + "tags": [ + "Security Logs" + ], + "summary": "Get single security log by ID", + "description": "Display the specified resource.", + "operationId": "getSecurityLog", + "parameters": [ + { + "name": "securityLog", + "in": "path", + "description": "ID of security log to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successfully found the security log", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/securityLog" + } + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/settings": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Returns all settings", + "description": "Display a listing of the resource.", + "operationId": "getSettings", + "parameters": [ + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include" + } + ], + "responses": { + "200": { + "description": "list of settings", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/settings" + } + }, + "meta": { + "$ref": "#/components/schemas/metadata" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/settings/{setting_id}": { + "put": { + "tags": [ + "Settings" + ], + "summary": "Update a setting", + "description": "Update a setting", + "operationId": "updateSetting", + "parameters": [ + { + "name": "setting_id", + "in": "path", + "description": "ID of setting to return", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/settingsEditable" + } + } + } + }, + "responses": { + "204": { + "description": "success" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + } + } + }, + "/signals": { + "get": { + "tags": [ + "Signals" + ], + "summary": "Returns all signals", + "description": "Display a listing of the resource.", + "operationId": "getSignals", + "parameters": [ + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "list of signals", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/signals" + } + }, + "meta": { + "type": "object" + } + }, + "type": "object" + } + } + } + } + } + }, + "post": { + "tags": [ + "Signals" + ], + "summary": "Creates a new Global Signal", + "description": "Creates a new global signal", + "operationId": "createSignal", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/signalsEditable" + } + } + } + }, + "responses": { + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/signals" + } + } + } + } + } + } + }, + "/signals/{signal_id}": { + "get": { + "tags": [ + "Signals" + ], + "summary": "Get a single signal by ID", + "description": "Display the specified resource.", + "operationId": "getSignalsById", + "parameters": [ + { + "name": "signal_id", + "in": "path", + "description": "signal id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/signals" + } + } + } + } + } + }, + "put": { + "tags": [ + "Signals" + ], + "summary": "Update a signal", + "operationId": "updateSignal", + "parameters": [ + { + "name": "signal_id", + "in": "path", + "description": "ID of signal to update", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/signalsEditable" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/signals" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Signals" + ], + "summary": "Delete a signal", + "operationId": "deleteSignal", + "parameters": [ + { + "name": "signal_id", + "in": "path", + "description": "ID of signal to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "success" + } + } + } + }, + "/task_assignments": { + "get": { + "tags": [ + "Task Assignments" + ], + "summary": "Returns all task assignments", + "description": "Display a listing of the resource.", + "operationId": "getTaskAssignments", + "parameters": [ + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "list of task assignments", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/taskAssignments" + } + }, + "meta": { + "type": "object" + } + }, + "type": "object" + } + } + } + } + } + }, + "post": { + "tags": [ + "Task Assignments" + ], + "summary": "Save a new Task Assignment", + "description": "Store a newly created task assignment in storage.", + "operationId": "createTaskAssignments", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/taskAssignmentsEditable" + } + } + } + }, + "responses": { + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/taskAssignments" + } + } + } + }, + "422": { + "$ref": "#/components/responses/422" + } + } + } + }, + "/task_assignments/{task_assignment}": { + "put": { + "tags": [ + "Task Assignments" + ], + "summary": "Update a Task Assignment", + "description": "Update a task assignment", + "operationId": "updateTaskAssignments", + "parameters": [ + { + "name": "task_assignment", + "in": "path", + "description": "ID of task assignment to update", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/taskAssignmentsEditable" + } + } + } + }, + "responses": { + "204": { + "description": "success" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + } + }, + "delete": { + "tags": [ + "Task Assignments" + ], + "summary": "Delete a Task Assignment", + "description": "Remove an assignment", + "operationId": "deleteTaskAssignments", + "parameters": [ + { + "name": "task_assignment", + "in": "path", + "description": "ID of task assignment to delete", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/taskAssignmentsEditable" + } + } + } + }, + "responses": { + "200": { + "description": "success" + } + } + } + }, + "/tasks": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Returns all tasks that the user has access to", + "description": "Display a listing of the resource.", + "operationId": "getTasks", + "parameters": [ + { + "name": "process_request_id", + "in": "query", + "description": "Process request id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/filter" + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/include" + } + ], + "responses": { + "200": { + "description": "list of tasks", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/processRequestToken" + } + }, + "meta": { + "$ref": "#/components/schemas/metadata" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/tasks/{task_id}": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get a single task by ID", + "description": "Display the specified resource.", + "operationId": "getTasksById", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "include", + "in": "query", + "description": "include", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/processRequestToken" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404" + } + } + }, + "put": { + "tags": [ + "Tasks" + ], + "summary": "Update a task", + "description": "Updates the current element", + "operationId": "updateTask", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "ID of task to update", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "status", + "data" + ], + "properties": { + "status": { + "type": "string", + "example": "COMPLETED" + }, + "data": { + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/processRequestToken" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + } + } + }, + "/users": { + "get": { + "tags": [ + "Users" + ], + "summary": "Returns all users", + "description": "Display a listing of the resource.", + "operationId": "getUsers", + "parameters": [ + { + "$ref": "#/components/parameters/status" + }, + { + "name": "filter", + "in": "query", + "description": "Filter results by string. Searches First Name, Last Name, Email and Username.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/order_by" + }, + { + "$ref": "#/components/parameters/order_direction" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include" + }, + { + "name": "exclude_ids", + "in": "query", + "description": "Comma separated list of IDs to exclude from the response", + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "list of users", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/users" + } + }, + "meta": { + "$ref": "#/components/schemas/metadata" + } + }, + "type": "object" + } + } + } + } + } + }, + "post": { + "tags": [ + "Users" + ], + "summary": "Save a new users", + "description": "Store a newly created resource in storage.", + "operationId": "createUser", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/usersEditable" + } + } + } + }, + "responses": { + "201": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/users" + } + } + } + }, + "422": { + "$ref": "#/components/responses/422" + } + } + } + }, + "/users/{user_id}": { + "get": { + "tags": [ + "Users" + ], + "summary": "Get single user by ID", + "description": "Display the specified resource.", + "operationId": "getUserById", + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "ID of user to return", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successfully found the process", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/users" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404" + } + } + }, + "put": { + "tags": [ + "Users" + ], + "summary": "Update a user", + "description": "Update a user", + "operationId": "updateUser", + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "ID of user to return", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/usersEditable" + } + } + } + }, + "responses": { + "204": { + "description": "success" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + } + }, + "delete": { + "tags": [ + "Users" + ], + "summary": "Delete a user", + "description": "Delete a user", + "operationId": "deleteUser", + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "ID of user to delete", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "success" + }, + "404": { + "$ref": "#/components/responses/404" + } + } + } + }, + "/users/{user_id}/get_pinned_controls": { + "get": { + "tags": [ + "Users" + ], + "summary": "Get the pinned BPMN elements of a specific user", + "description": "Return the user's pinned nodes.", + "operationId": "getPinnnedControls", + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "ID of user to return the pinned nodes of", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Pinned nodes returned succesfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/users" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404" + } + } + } + }, + "/users/{user_id}/update_pinned_controls": { + "put": { + "tags": [ + "Users" + ], + "summary": "Update a user's pinned BPMN elements on Modeler", + "description": "Update a user's pinned BPMN elements on Modeler", + "operationId": "updatePinnedControls", + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "ID of user to return", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/usersEditable" + } + } + } + }, + "responses": { + "204": { + "description": "success" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + } + } + }, + "/users/{user_id}/groups": { + "put": { + "tags": [ + "Users" + ], + "summary": "Set the groups a users belongs to", + "description": "Update a user's groups", + "operationId": "updateUserGroups", + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "ID of user", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/updateUserGroups" + } + } + } + }, + "responses": { + "204": { + "description": "success" + } + } + } + }, + "/users/restore": { + "put": { + "tags": [ + "Users" + ], + "summary": "Restore a soft deleted user", + "description": "Reverses the soft delete of a user", + "operationId": "restoreUser", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/restoreUser" + } + } + } + }, + "responses": { + "200": { + "description": "success" + } + } + } + }, + "/users/get_filter_configuration/{name}": { + "get": { + "tags": [ + "Users" + ], + "summary": "Get filter configuration by name", + "description": "Get filter configuration.", + "operationId": "getFilterConfiguration", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/users" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404" + } + } + } + }, + "/users/store_filter_configuration/{name}": { + "get": { + "tags": [ + "Users" + ], + "summary": "Store filter configuration by name", + "description": "Store filter configuration.", + "operationId": "storeFilterConfiguration", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/users" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404" + } + } + } + }, + "/users/{user_id}/tokens": { + "get": { + "tags": [ + "Personal Tokens" + ], + "summary": "Display listing of access tokens for the specified user.", + "description": "Display listing of access tokens for the specified user.", + "operationId": "getTokens", + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "User id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "List of tokens.", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserToken" + } + }, + "meta": { + "$ref": "#/components/schemas/metadata" + } + }, + "type": "object" + } + } + } + } + } + }, + "post": { + "tags": [ + "Personal Tokens" + ], + "summary": "Create new token for a specific user", + "description": "Create a new personal access token for the user.", + "operationId": "createTokens", + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "User id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "New token instance", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserToken" + } + } + } + } + } + } + }, + "/users/{user_id}/tokens/{token_id}": { + "get": { + "tags": [ + "Personal Tokens" + ], + "summary": "Get single token by ID", + "description": "Show a personal access token for the user", + "operationId": "getTokenById", + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "ID of user", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "token_id", + "in": "path", + "description": "ID of token to return", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successfully found the token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserToken" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Personal Tokens" + ], + "summary": "Delete a token", + "description": "Delete the given token for a user", + "operationId": "deleteToken", + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "User ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "token_id", + "in": "path", + "description": "Token ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "success" + } + } + } + } + }, + "components": { + "schemas": { + "DateTime": { + "properties": { + "date": { + "type": "string" + } + }, + "type": "object" + }, + "collectionsEditable": { + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "custom_title": { + "type": "string" + }, + "create_screen_id": { + "type": "string", + "format": "id" + }, + "read_screen_id": { + "type": "string", + "format": "id" + }, + "update_screen_id": { + "type": "string", + "format": "id" + }, + "signal_create": { + "type": "boolean" + }, + "signal_update": { + "type": "boolean" + }, + "signal_delete": { + "type": "boolean" + } + }, + "type": "object" + }, + "collections": { + "allOf": [ + { + "$ref": "#/components/schemas/collectionsEditable" + }, + { + "properties": { + "id": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_by_id": { + "type": "string", + "format": "id" + }, + "updated_by_id": { + "type": "string", + "format": "id" + }, + "columns": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" + } + ] + }, + "recordsEditable": { + "properties": { + "data": { + "type": "object" + } + }, + "type": "object" + }, + "records": { + "allOf": [ + { + "$ref": "#/components/schemas/recordsEditable" + }, + { + "properties": { + "id": { + "type": "integer" + }, + "collection_id": { + "type": "string", + "format": "id" + } + }, + "type": "object" + } + ] + }, + "DataSourceCallParameters": { + "properties": { + "endpoint": { + "type": "string" + }, + "dataMapping": { + "type": "array", + "items": { + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + } + }, + "outboundConfig": { + "type": "array", + "items": { + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "DataSourceResponse": { + "properties": { + "status": { + "type": "integer" + }, + "response": { + "type": "object" + } + }, + "type": "object" + }, + "dataSourceEditable": { + "properties": { + "id": { + "description": "Class DataSource", + "type": "string", + "format": "id" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "endpoints": { + "type": "string" + }, + "mappings": { + "type": "string" + }, + "authtype": { + "type": "string" + }, + "credentials": { + "type": "string" + }, + "status": { + "type": "string" + }, + "data_source_category_id": { + "type": "string" + } + }, + "type": "object" + }, + "dataSource": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/dataSourceEditable" + }, + { + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "type": "object" + } + ] + }, + "dataSourceCategoryEditable": { + "properties": { + "name": { + "description": "Represents a business data Source category definition.", + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE" + ] + } + }, + "type": "object" + }, + "DataSourceCategory": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/dataSourceCategoryEditable" + }, + { + "properties": { + "id": { + "type": "string", + "format": "id" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "type": "object" + } + ] + }, + "SavedSearchEditable": { + "properties": { + "meta": { + "description": "Represents an Eloquent model of a Saved Search.", + "type": "object", + "additionalProperties": "true" + }, + "pmql": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "task", + "request" + ] + }, + "advanced_filter": { + "type": "object", + "additionalProperties": "true" + } + }, + "type": "object" + }, + "SavedSearch": { + "allOf": [ + { + "properties": { + "id": { + "type": "string", + "format": "id" + }, + "user_id": { + "type": "string", + "format": "id" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/SavedSearchEditable" + } + ] + }, + "SavedSearchIcon": { + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "SavedSearchChartEditable": { + "properties": { + "title": { + "description": "Represents an Eloquent model of a Saved Search Chart.", + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "bar", + "bar-vertical", + "line", + "pie", + "doughnut" + ] + }, + "config": { + "type": "object", + "additionalProperties": "true" + }, + "sort": { + "type": "integer" + } + }, + "type": "object" + }, + "SavedSearchChart": { + "allOf": [ + { + "properties": { + "id": { + "type": "string", + "format": "id" + }, + "saved_search_id": { + "type": "string", + "format": "id" + }, + "user_id": { + "type": "string", + "format": "id" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "deleted_at": { + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/SavedSearchChartEditable" + } + ] + }, + "ReportEditable": { + "properties": { + "type": { + "type": "string", + "enum": [ + "adhoc", + "scheduled" + ] + }, + "format": { + "type": "string", + "enum": [ + "csv", + "xlsx" + ] + }, + "saved_search_id": { + "type": "integer" + }, + "config": { + "type": "object", + "additionalProperties": "true" + }, + "to": { + "type": "array", + "items": { + "type": "string" + } + }, + "subject": { + "type": "string" + }, + "body": { + "type": "string" + } + }, + "type": "object" + }, + "Report": { + "allOf": [ + { + "properties": { + "id": { + "type": "string", + "format": "id" + }, + "user_id": { + "type": "string", + "format": "id" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/SavedSearchEditable" + } + ] }, "updateUserGroups": { "properties": { @@ -7187,9 +9515,9 @@ "description": "Laravel passport oauth2 security.", "flows": { "authorizationCode": { - "authorizationUrl": "http://localhost/oauth/authorize", - "tokenUrl": "http://localhost/oauth/token", - "refreshUrl": "http://localhost/token/refresh", + "authorizationUrl": "https://processmaker.test/oauth/authorize", + "tokenUrl": "https://processmaker.test/oauth/token", + "refreshUrl": "https://processmaker.test/token/refresh", "scopes": {} } }